function SymError()
{
  return true;
}

window.onerror = SymError;


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function getXMLHttpRequest() {
	if (window.ActiveXObject) {
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e1) { return null; }
		}
	} else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else {
		return null;
	}
}
var httpRequest = null;

function sendRequest(url, params, callback, method) {
	httpRequest = getXMLHttpRequest();
	var httpMethod = method ? method : 'GET';
	if (httpMethod != 'GET' && httpMethod != 'POST') {
		httpMethod = 'GET';
	}
	var httpParams = (params == null || params == '') ? null : params;
	var httpUrl = url;
	if (httpMethod == 'GET' && httpParams != null) {
		httpUrl = httpUrl + "?" + httpParams;
	}
	httpRequest.open(httpMethod, httpUrl, true);
	httpRequest.setRequestHeader(
		'Content-Type', 'application/x-www-form-urlencoded');
	httpRequest.onreadystatechange = callback;
	httpRequest.send(httpMethod == 'POST' ? httpParams : null);
}


function ConvertHex(input){
	var strHex,length_price,char2; 
	strHex = "";
	for (i=0; i < input.length; i++) {
		char2 = input.charCodeAt(i); 
		strHex = strHex + char2.toString(16);

	} 

	return strHex;
}

function checkKoAndEngOnly( koreanChar ) {

   if ( koreanChar == null ) return false ;
   
   for(var i=0; i < koreanChar.value.length; i++){ 

     var c=koreanChar.value.charCodeAt(i); 
     //( 0xAC00 <= c && c <= 0xD7A3 ) ?Áß?¼º? ¸ðÀÎ ÇÑ±ÛÀÚ 
     //( 0x3131 <= c && c <= 0x318E ) ÀÚ? ¸ð? 

     if( !( ( 0xAC00 <= c && c <= 0xD7A3 ) || ( 0x3131 <= c && c <= 0x318E ) || (40 <= c && c <= 41) || (  0x61 <= c && c <= 0x7A ) || ( 0x41 <= c && c <= 0x5A ) || (  0x30 <= c && c <= 0x39 ) || c == 32 ) ) {      
        return false ; 
     }
   }  
   return true ;
}

function checkKoAndEng( input ) {
	
	if(!checkKoAndEngOnly(input)){
		alert("ÇÑ±Û/¿µ¹®/¼ýÀÚ¸¸ »ç¿ë°¡´É ÇÕ´Ï´Ù.");
		input.value="";
		input.focus();
		return false;
	}
}

function validateemail(email) {
		var num="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@._-";
			email.returnValue = true;
		for (var i=0;i < email.value.length;i++) {
			if (-1 == num.indexOf(email.value.charAt(i)) || email.value.indexOf("@",0) == -1 || email.value.indexOf(".",0) == -1)
			 { email.returnValue = false; }
			if (!email.returnValue) 
			{email.className="badvalue"; }
			else { email.className="";}		
		}
	
	}
	
		
	function checkemail(addr){
		 if ( addr.value == "" ) return false ;
		validateemail(addr);
		if(addr.className !=""){
			alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼Ò ÀÔ´Ï´Ù.");
			addr.value="";
			addr.focus();
			return false;
			}
		}

function checkNumber( input ) {
	
	if(checkDigitOnly(input)==false){
		alert("Please use only the Number.");
		input.value="";
		input.focus();
		return false;
	}
}

// ¼ýÀÚ ?¿ÜÀÇ Ä³¸¯ÅÍ? ??°æ¿ì false 

function checkDigitOnly( digitChar ) {  
    
    if ( digitChar == null ) return false ;

    for(var i=0;i<digitChar.value.length;i++){          
       var c=digitChar.value.charCodeAt(i);      
       if( !(  0x30 <= c && c <= 0x39 ) ) {         
        return false ;       
       }
	}      
    return true ;
     
}

function checkEnglish( input ) {
	
	if(checkEnglishOnly(input)==false){
		alert("Please use only the English.");
		input.value="";
		input.focus();
		return false;
	}
}

function checkDigitandEngOnly( digitChar ) {  
    
    if ( digitChar == null ) return false ;

    for(var i=0;i<digitChar.value.length;i++){          
       var c=digitChar.value.charCodeAt(i);  

       if( !((  0x30 <= c && c <= 0x39 )||(  0x61 <= c && c <= 0x7A ) || ( 0x41 <= c && c <= 0x5A )  || c == 32 ) ) {         
        return false ;       
       }
	}      
    return true ;
     
}

// ¼ýÀÚ ¿µ? ?¿ÜÀÇ Ä³¸¯ÅÍ? ??°æ¿ì false 
function checkEnglishAndDigit( input ) {
	
	if(checkDigitandEngOnly(input)==false){
		alert("Please use only the English and Arabic numbers.");
		input.value="";
		input.focus();
		return false;
	}
}

// ¿µ? ?¿ÜÀÇ Ä³¸¯ÅÍ? ??°æ¿ì false 

function checkEnglishOnly( englishChar ) {  
    
    if ( englishChar == null ) return false ;
       
    for( var i=0; i < englishChar.value.length;i++){          
       var c=englishChar.value.charCodeAt(i);       
       if( !( (  0x61 <= c && c <= 0x7A ) || ( 0x41 <= c && c <= 0x5A ) ) ) {         
        return false ;       
       }
     }      
    return true ;
     
} 

function checkKorean( input ) {
	
	if(checkKoreanOnly(input)==false){
		alert("ÇÑ±Û¸¸ »ç¿ë°¡´É ÇÕ´Ï´Ù.");
		input.value="";
		input.focus();
		return false;
	}
}

// ÇÑ±Û?¿ÜÀÇ Ä³¸¯ÅÍ? ??°æ¿ì false 
// ÇÑÀÚ³ª ¼ýÀÚ ¿µ?ÀÇ °æ¿ì false 

function checkKoreanOnly( koreanChar ) {

   if ( koreanChar == null ) return false ;
   
   for(var i=0; i < koreanChar.value.length; i++){ 

     var c=koreanChar.value.charCodeAt(i); 
     //( 0xAC00 <= c && c <= 0xD7A3 ) ?Áß?¼º? ¸ðÀÎ ÇÑ±ÛÀÚ 
     //( 0x3131 <= c && c <= 0x318E ) ÀÚ? ¸ð? 

     if( !( ( 0xAC00 <= c && c <= 0xD7A3 ) || ( 0x3131 <= c && c <= 0x318E ) || (40 <= c && c <= 41) || c == 32 ) ) {      
        return false ; 
     }
   }  
   return true ;
}

function URLEncode (clearString) {

  var output = '';
  var hexoutput = '';
	if(clearString.length == 0) { return ""; }

  for (i = 0; i < clearString.length; i++){   // scan the source
        s = clearString.charAt(i);
		
       output += "H"+strAscii(s);

    }

  return output;
}

function kh_location(code){
	var loca_;
	if(code == 'FA'){
		loca_ = "HOME &gt; NEWS &gt; <strong>NATIONAL</strong>";
	}else if(code == "FB"){
		loca_ = "HOME &gt; NEWS &gt; <strong>BUSINESS</strong>";
	}else if(code == "FD"){
		loca_ = "HOME &gt; NEWS &gt; <strong>CULTURE</strong>";
	}else if(code == "FEB"){
		loca_ = "HOME &gt; NEWS &gt; <strong>OPINION</strong>";
	}else if(code == "FEC"){
		loca_ = "HOME &gt; NEWS &gt; <strong>EDITORIAL</strong>";
	}else if(code == "FF"){
		loca_ = "HOME &gt; NEWS &gt; <strong>SPECIAL</strong>";
	}else if(code == "FG"){
		loca_ = "HOME &gt; NEWS &gt; <strong>SPORTS</strong>";
	}else if(code == "FH"){
		loca_ = "HOME &gt; <strong>WEEKENDER</strong>";
	}else if(code == "FM"){
		loca_ = "HOME &gt; <strong>ANNOUNCEMENT</strong>";
	}else if(code == "FP"){
		loca_ = "HOME &gt; NEWS &gt; <strong>ANALYSIS</strong>";
	}else if(code == "FU"){
		loca_ = "HOME &gt; NEWS &gt; <strong>WORLD</strong>";
	}else if(code == "FUA"){
		loca_ = "HOME &gt; NEWS &gt; <strong>WORLD</strong>";
	}else if(code == "FVA"){
		loca_ = "HOME &gt; <strong>EXPAT LIVING</strong>";
	}else if(code == "FVB"){
		loca_ = "HOME &gt; <strong>PEOPLE</strong>";
	}else if(code == "FVC"){
		loca_ = "HOME &gt; <strong>REDISCOVER SEOUL</strong>";
	}else if(code == "FVD"){
		loca_ = "HOME &gt; <strong>MEET THE CEO</strong>";
	}else if(code == "FVE"){
		loca_ = "HOME &gt; <strong>AUTO MODE</strong>";
	}else if(code == "FVF"){
		loca_ = "HOME &gt; <strong>DIPLOMATIC CIRCUIT</strong>";
	}else if(code == "LOG1"){
		loca_ = "HOME &gt; <strong>LOGIN</strong>";
	}else if(code == "MYK1"){
		loca_ = "HOME &gt; My Profile &gt; <strong>È¸¿øÁ¤º¸ ¼öÁ¤</strong>";
	}else if(code == "MYK2"){
		loca_ = "HOME &gt; My Profile &gt; <strong>ºñ¹Ð¹øÈ£º¯°æ</strong>";
	}else if(code == "MYK3"){
		loca_ = "HOME &gt; My Profile &gt; <strong>¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã£±â</strong>";
	}else if(code == "MYK4"){
		loca_ = "HOME &gt; My Profile &gt; <strong>À¯·áÈ¸¿øÀüÈ¯</strong>";
	}else if(code == "MYK5"){
		loca_ = "HOME &gt; My Profile &gt; <strong>È¸¿øÅ»Åð</strong>";
	}else if(code == "MYK6"){
		loca_ = "HOME &gt; My Profile &gt; <strong>°³ÀÎÁ¤º¸º¸È£Á¤Ã¥</strong>";
	}else if(code == "MYF1"){
		loca_ = "HOME &gt; My Profile &gt; <strong>Membership profile</strong>";
	}else if(code == "MYF2"){
		loca_ = "HOME &gt; My Profile &gt; <strong>Change password</strong>";
	}else if(code == "MYF3"){
		loca_ = "HOME &gt; My Profile &gt; <strong>Search ID/PW</strong>";
	}else if(code == "RG"){
		loca_ = "HOME &gt;  <strong>Register</strong>";
	}else if(code == "RGK1"){
		loca_ = "HOME &gt;  <strong>½Ç¸íÀÎÁõ</strong> ";
	}else if(code == "RGK2_1"){
		loca_ = "HOME &gt;  <strong>À¯·áÈ¸¿ø °¡ÀÔ</strong> ";
	}else if(code == "RGK2_2"){
		loca_ = "HOME &gt;  <strong>¹«·áÈ¸¿ø °¡ÀÔ</strong> ";
	}else if(code == "RGK3"){
		loca_ = "HOME &gt;  <strong>À¯·áÈ¸¿ø °¡ÀÔ</strong> ";
	}else if(code == "RGK4"){
		loca_ = "HOME &gt;  <strong>È¸¿ø°¡ÀÔ ¿Ï·á</strong> ";
	}else if(code == "RGF1"){
		loca_ = "HOME &gt;  <strong>Register </strong> ";
	}else if(code == "RGF2"){
		loca_ = "HOME &gt;  Register  &gt; <strong>Membership  registration </strong>  ";
	}else if(code == "LC_skt"){
		loca_ = "HOME &gt;  LEADERSCLUB  &gt; <strong>SKT </strong>  ";
	}else if(code == "LC_shinhan"){
		loca_ = "HOME &gt;  LEADERSCLUB  &gt; <strong>SHINHAN </strong>  ";
	}else if(code == "LC_POSCO"){
		loca_ = "HOME &gt;  LEADERSCLUB  &gt; <strong>POSCO </strong>  ";
	}else if(code == "MAP"){
		loca_ = "HOME &gt;  <strong>SITEMAP</strong> ";
	}else if(code == "service1"){
		loca_ = "HOME &gt;  <strong>»ý»ý¿µ¾î´º½º</strong> ";
	}else if(code == "TRNA"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>¹ø¿ªºÐ¾ß</strong>";
	}else if(code == "TRNB"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>ÁøÇà°øÁ¤</strong>";
	}else if(code == "TRNC"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>ÀÎ·ÂÇöÈ²</strong>";
	}else if(code == "TRND"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>ÁÖ¿ä½ÇÀû</strong>";
	}else if(code == "TRNE"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>ÁÖ¿ä°í°´</strong>";
	}else if(code == "FOC"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>News Service</strong>";
	}else if(code == "FOCA"){
		loca_ = "HOME &gt; Professional Translation Services  &gt; News Service &gt; <strong>Seoul</strong>";
	}else if(code == "FOCB"){
		loca_ = "HOME &gt; Professional Translation Services  &gt; News Service &gt; <strong>Changwon</strong>";
	}else if(code == "FOCC"){
		loca_ = "HOME &gt; Professional Translation Services  &gt; News Service &gt; <strong>Kisti</strong>";
	}else if(code == "TRNG"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>Æ÷Æ®Æú¸®¿À º¸±â</strong>";
	}else if(code == "TRNA"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>¹ø¿ªºÐ¾ß</strong>";
	}else if(code == "TRNH"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>E-Brochure</strong>";
	}else if(code == "TRNI"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>Åë¹ø¿ª ½Ã½ºÅÛ</strong>";
	}else if(code == "TRNJ"){
		loca_ = "HOME &gt; Professional Translation Services &gt; <strong>°ßÀûÀÇ·Ú</strong>";
	
	
	}else{
		loca_ = "HOME &gt; NEWS &gt; <strong>SPECIAL</strong>";
	}

	return loca_;
}

function link(kind)
{
	if(kind == 'column'){
			document.location.href = "/"+kind+"/column_index.asp"; 
	}else if(kind == 'community_01'){
			document.location.href = "/khcommunity/job_index.asp"; 
	}else if(kind == 'community_02'){
			document.location.href = "/khcommunity/tak_index.asp"; 
	}else if(kind == 'community_03'){
			document.location.href = "/khcommunity/exp_index.asp"; 
	}else if(kind == 'community_04'){
			document.location.href = "/khcommunity/fom_index.asp"; 
	}else if(kind == 'community_05'){
			document.location.href = "/khcommunity/reu_index.asp"; 
	}else if(kind == 'community_06'){
			document.location.href = "/khcommunity/dailykorean_T.asp"; 
	}else if(kind == 'community_07'){
			document.location.href = "/ssomi&hobo/ssomi.asp"; 
	
	}else if(kind == 'archives'){
			document.location.href = "/"+kind+"/result_detail.asp"; 
	}else if(kind == 'aboutus_01'){
			document.location.href = "/aboutus/private.asp"; 
	}else if(kind == 'Copyright'){
			document.location.href = "/khetc/copyright.asp"; 
	}else if(kind == 'weekly_01'){
			document.location.href = "/weekly/Education/herald.asp"; 
	}else if(kind == 'weekly_02'){
			document.location.href = "/weekly/People/herald.asp"; 
	}else if(kind == 'weekly_03'){
			document.location.href = "/weekly/DiplomaticCircuit/herald.asp"; 
	}else if(kind == 'weekly_04'){
			document.location.href = "/weekly/ExpatLiving/herald.asp"; 
	}else if(kind == 'weekly_05'){
			document.location.href = "/weekly/CorporateWorld/herald.asp"; 
	}else if(kind == 'weekly_06'){
			document.location.href = "/weekly/Multinationals/herald.asp"; 
	}else if(kind == 'weekly_07'){
			document.location.href = "/weekly/PeopleSociety/herald.asp"; 
	}else if(kind == 'ombudsman'){
			document.location.href = "/khetc/ombudsman.asp"; 
	}else if(kind == 'sitemap'){
			document.location.href = "/khetc/map_index.asp"; 
	}else if(kind == 'contact'){
			document.location.href = "/khetc/con_index.asp"; 
	}else if(kind == 'register'){
			document.location.href = "/member/register.asp"; 
	}else if(kind == 'register01'){
			document.location.href = "/member/register_k_01.asp?charge=Y"; 
	}else if(kind == 'register02'){
			document.location.href = "/member/register_k_01.asp?charge=N"; 
	}else if(kind == 'register03'){
			document.location.href = "/member/register_f_01.asp?charge=Y"; 
	}else if(kind == 'register04'){
			document.location.href = "/member/register_f_01.asp?charge=N"; 
	}else if(kind == 'register05'){
			document.location.href = "/member/fori_agreement.htm"; 
	}else if(kind == 'register06'){
			document.location.href = "/member/fori_agreement2.htm"; 
	}else if(kind == 'special_01'){
			document.location.href = "/special/Korea-US_FTA/index.asp"; 
	}else if(kind == 'special_02'){
			document.location.href = "/special/InsightintoKorea/index.asp"; 
	}else if(kind == 'special_03'){
			document.location.href = "/special/Inter-KoreanSummit/index.asp"; 
	}else if(kind == 'special_04'){
			document.location.href = "/special/CivilsocietyinKorea/index.asp"; 
	}else if(kind == 'special_05'){
			document.location.href = "/special/jherald/herald.asp"; 
	}else if(kind == 'special_06'){
			document.location.href = "/special/Eyeonkorea/index.asp"; 
	}else if(kind == 'leadersclub'){
			document.location.href = "/Leadersclub/skt_index.asp"; 
	}else if(kind == 'leadersclub_01'){
			document.location.href = "/Leadersclub/shinhan/index.asp"; 
	}else if(kind == 'PrivacyStatement'){
			document.location.href = "/member/PrivacyStatement.asp"; 
	}else if(kind.substring(0,3) == 'FOC'){
			document.location.href = "/service/heraldtrans/main.asp"; 
	}else if(kind == 'bestbrand'){
			document.location.href = "/service/bestbrand/bestbrand.asp"; 
	}else if(kind == 'vancouver'){
			document.location.href = "/special/VancouverOlympics/"; 
	}else{
		document.location.href = "/"+kind+"/herald.asp"; 
	}
}

function trans_link(kind)
{
	if(kind == 'FOCA'){
			document.location.href = "/service/heraldtrans/seoul/"; 
	}else if(kind == 'FOCB'){
		document.location.href = "/service/heraldtrans/changwon/"; 
	}else{
		document.location.href = "/service/heraldtrans/kisti/"; 
	}
}

function link2(kind)
{
	document.sendform.khscode.value = kind ;
	document.sendform.action = '/service/redirectSection2.asp';
//	document.sendform.target = 'mainFrame';
	document.sendform.submit() ;
}

function link3(kind)
{
	
	document.sendform.khscode.value = kind ;
	document.sendform.action = '/service/list.asp';
//	document.sendform.target = 'mainFrame';
	document.sendform.submit() ;
	
}



function link4(kind)
{
	document.sendform.kh_bbs_kind.value = kind ;
	document.sendform.action = '/khcommunity/bbs/board.asp';
//	document.sendform.target = 'mainFrame';
	document.sendform.submit() ;
}

function link5(bbs_topSeq,bbs_degree,bbs_board_idx)
{
	document.bbsview.bbs_topSeq.value = bbs_topSeq ;
	document.bbsview.bbs_degree.value = bbs_degree ;
	document.bbsview.bbs_board_idx.value = bbs_board_idx ;
//	document.bbsview.target = 'mainFrame';
	document.bbsview.submit() ;
}

function link6(art_id)
{
	if(art_id == "200807250058"){

		document.sendform.action = 'http://img.heraldbiz.com/img/2008/07/main.html';
		document.sendform.method = 'GET';
//		document.sendform.target = 'new';
		document.sendform.submit() ;
	}else{
		var mainurl = "/NEWKHSITE/data/html_dir/";
		var gourl = mainurl+ art_id.substring(0,4)+"/"+art_id.substring(4,6)+"/"+art_id.substring(6,8)+"/"+art_id+".asp";

//		document.sendform.action = gourl;
	//	document.sendform.target = 'mainFrame';
//		document.sendform.submit() ;
		document.location.href = gourl;
	}

}

function link7(kh_id,kh_query)
{
	document.bbsview.kh_id.value = kh_id ;
	document.bbsview.kh_query.value = kh_query ;
//	document.bbsview.target = 'mainFrame';
	document.bbsview.submit() ;
}

function link8(kind)
{
	
	document.sendform.khscode.value = kind ;
	document.sendform.action = '/service/list_anno.asp';
//	document.sendform.target = 'mainFrame';
	document.sendform.submit() ;
	
}


function pagelink(cP)
{
	
	document.bbsread.cP.value = cP ;
//	document.bbsread.target = 'mainFrame';
	document.bbsread.submit() ;
	
}

function bbswlink()
{
//	document.bbswrite.target = 'mainFrame';
	document.bbswrite.submit() ;
}

function goPlink(code)
{
	
	document.formp.art_code= code;
	document.formp.action = 'http://www.heraldcampus.co.kr/join/JoinHerald.asp';
	document.formp.submit() ;
}


function onComSubmit(formobj)
{
   
   formobj.submit();
}


var cntm =1;
function print_article(sname,imgsrc,newsid) {
// window.open("http://admin.koreaherald.co.kr:8080/servlet/cms.article.view?tpl=print&sname="+sname+"&img="+imgsrc+"&id="+newsid, "print", "width=600, height=720,toolbar=no,menubar=no,scrollbars=yes");
window.open("/service/print.asp?tpl=print&sname="+sname+"&img="+imgsrc+"&id="+newsid, "print", "width=600, height=720,toolbar=no,menubar=no,scrollbars=yes");
}

function mail_article(newsid,atitle) {
 window.open("/mail/mail.asp?newsid="+newsid+"&title="+atitle, "print", "width=550, height=600,toolbar=no,menubar=no,scrollbars=yes");
// alert("ÀÛ?Áß??´Ù.");
}

function tts(newsid,sex) {

 window.open("/tts/tts.asp?id="+newsid+sex, "tts", "width=200, height=200, toolbar=no,menubar=no,scrollbars=no");
}

function koreanvoice(voice) {

 window.open("/tts/koreanvoice.asp?koreanvoice="+voice, "koreanvoice", "width=200, height=200, toolbar=no,menubar=no,scrollbars=no");
}

function popup1() {
 window.open("/img/pic/1024/1024-popup.html", "popup_1", "width=470, height=580, left=3000, top=3000, toolbar=no,menubar=no,scrollbars=no");
}

function dic(){
	var a;
a = window.open('http://endic.naver.com/endicsm.php', 'small', 'width=358,height=450,marginwidth=0,marginheight=0,resizable=1,scrollbars=yes');
}

var fontSize = 11;
var lineHeight = 20;

function fontPlus() {
	if (fontSize < 17) {
		fontSize = fontSize + 2;
		setFaceSize();
	}
}

function fontMinus() {
	if (fontSize >= 11) {
		fontSize = fontSize - 2;
		setFaceSize();
	}
}

function setFaceSize() {
	lineHeight = fontSize+Math.round(1.1*fontSize);

	obj = document.getElementById("font_kh");
	obj.style.fontSize = fontSize+"pt";
	obj.style.lineHeight = lineHeight+"px";
}

function show(elementId) {
	var element = document.getElementById(elementId);
	if (element) {
		element.style.display = '';
	}
}
function hide(elementId) {
	var element = document.getElementById(elementId);
	if (element) {
		element.style.display = 'none';
	}
}

function multipleDiv(){
	var element = multipleDiv.arguments;
  
	 for(i=0;i < element.length;i++){
			if(i == 0){
				show(element[i]);
			}else{
				hide(element[i]);
			}
	 }
}

function inputOpinion(kind,seq){
	var comment = document.form1.comment.value;
	var art_id = document.form1.art_id.value;
	var kind_code = document.form1.kind_code.value;
	var user_id = document.form1.user_id.value;

	if(user_id.length == 0){
			alert("·Î±×ÀÎ ÇÏ¼¼¿ä!!!");
			return;
	}
	if(comment.length == 0){
			alert("ÀÔ·Â ÇÏ¼¼¿ä!!!");
			document.form1.comment.focus();
			return;
	}

	if(art_id.length == 0){
			alert("±â»ç ¾ÆÀÌµð°¡ Á¸Àç ÇÏÁö ¾Ê½À´Ï´Ù.");
			return;
	}

		
	if(kind == 'I'){	
		sendInputOpinion(comment, user_id , kind_code , art_id,"1",kind);
	}else if(kind == 'D'){
		sendDeleteOpinion(seq, user_id ,art_id, kind_code , "1",kind);
	}
	
}

function sendInputOpinion(comment, user_id , kind_code , art_id,Cp,strType) {
			blnList = false;
			var params = "comment="+escape(comment)+"&user_id="+user_id+"&kind_code="+kind_code+"&art_id="+art_id+"&Cp="+Cp+"&strType="+strType;
//document.write(params);
			sendRequest("/service/opinion_save.asp", params, display2, 'POST');
		
}

function sendDeleteOpinion(intSeq, user_id , art_id,kind_code,Cp,strType) {
			blnList = false;
			var params = "intSeq="+intSeq+"&user_id="+user_id+"&art_id="+art_id+"&kind_code="+kind_code+"&Cp="+Cp+"&strType="+strType;
//document.write(params);
		 if( confirm("»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î") == true ){


					sendRequest("/service/opinion_save.asp", params, display2, 'POST');

			}
			
		
}


function display2() {
	if (httpRequest.readyState == 4) {
		if (httpRequest.status == 200) {
			var resultText = httpRequest.responseText;
				var news = document.getElementById('art_opinion');
				news.innerHTML = resultText;
			
		} else {
			alert("¿¡·¯ ¹ß»ý: "+httpRequest.status);
		}
	}
}

/****************************************************************************** 
            * ¸¸µç¸ñÀû: JS ·Ñ¸µ; 
            * ¸¸µçÀÌ:Çã¿õ [comefeel]; 
            * Á¦ÀÛ½Ã°£:ÃÑ 7~8½Ã°£; 
            * JS °æ·Â:ÇöÀç 6°³¿ùÂ÷ -..-; ÃÊÇãÁ¢; 
            * last update:2007.01 
            * igear.co.kr µµ¿ÍÁØºÐ [zeldign] ÇÃ¸Ó 12³âÂ÷; 
            * e-mail : igearmall.co.kr <comefeel@daum.net> comefeel@comefeel.com µµ ÀÖÁö¸¸ ÇöÀç ¾ÈµÊ ; 
            * ÀÌ°ÍÀ» »ç¿ëÇÒ·Á°í ÇÒ½Ã¿¡ ÁÖ¼®À» Áö¿ì¸é »ç¿ëÇÒ¼ö ¾øÀ½; 
            * ÇãÁ¢ÇÑ ¼Ò½º¸¦ º¸°í -_-+ ¸Ó¶ó°í ÇÏ¸é ÂÏ¾Æ°¨; 
            * ** 
			* ¼öÁ¤¸ñÀû: ³ôÀÌÁ¶Á¤ÇÏ¿© ·Ñ¸µ
			* ¼öÁ¤ÀÚ : ¹ÚÀÍ¼±
			*¼öÁ¤ÀÏÀÚ : 2009.06.24
            */ 

            var roll_Class=function(){this.initialize.apply(this,arguments);} 
            roll_Class.prototype={ 

            initialize:function(){ 
			
            this.className=arguments[0]?arguments[0]:null; 
            this.foundit(arguments[1],'',false); 
            this.contents=new Array('0'); 
            this.contents_delay=null; 
            this.nowdelay=null; 
			
			
            this.foundit( 
            this.roll.childNodes,this.foundvalue , 
            function(rt,that){ 

            if(that.constrain_size !== null) that.foundit(rt.childNodes,'IMG',function(rt,that){rt.style[(this.moving != 'left' ? 'width' : 'height')] = that.constrain_size;}); 
            that.contents_delay=that.contents[that.contents.length]=that.contents_delay+-rt[(that.moving=='left'?'offsetWidth':'offsetHeight')];
			
			this.viewCnt = that.viewCnt;
			}); 
			

            { 
			this.rollTotalHeight = Math.abs(this.contents[this.contents.length-1]);
            this.rollHeight=this.proll.style[(this.moving=='left'?'width':'height')]=Math.abs(this.contents[this.viewCnt]); 
            this.roll.appendChild(this.roll.cloneNode(true)); 
            };}, 


            foundit:function(tg,n){ 

            var temp=new Array(); 
				
                for(var v in tg) 
					
                    switch(typeof arguments[2]){ 
                    case 'object':if(arguments[2].initialize(tg[v],n,this)==true) return; else break; 
                    case 'function':if(tg[v].nodeName==n) arguments[2](tg[v],this); break; 
                    case 'boolean':this[v]=tg[v]; break; 
                    default:if(tg[v].nodeName==n) return tg[v]; 

					
                } 

            return temp;}, 

            inaction:function(time){ 

            this.roll.style[this.moving]=time=time < 0 ?(this.fall==false && time <= -this.rollTotalHeight?0:time):-this.rollTotalHeight,null; 
            this.foundit(this.contents,time,{initialize:function(rt,vrt,that){if(Math.abs(rt - vrt) <(that.fast==false?that.tick:that.ftick)){that.roll.style[that.moving]=rt; that.nowdelay=that.fast==true?that.lengthen:that.delay; that.fast=false; return true;} else that.nowdelay=that.lengthen;}}); 
            {var ticks=this.fast==true?this.ftick:this.tick;} 
            this.control=setTimeout(this.className+".inaction("+(parseInt(this.roll.style[this.moving])+(this.fall==true?ticks:-ticks))+");",this.nowdelay);}, 

            stop:function(){ 

            this.temp=parseInt(this.roll.style[this.moving]); 
            clearTimeout(this.control);}    }; 