 

function sds_load(txtQ) {
      w=880
      h=651
      ww=880
      hh=700
      l=(screen.availWidth/2)-(ww/2)
      t=(screen.availHeight/2)-(hh/2)
	   window.open('http://www.sdsgis.co.kr/ktdom/query/add_search.asp?'+txtQ,"sdsgis","top=0,left=0,width="+w+",height="+h+",status=yes,resizable=yes,toolbars=no,location=no,scrollbars=no");
}
 function goMap(){
	w = 600;
	h = 400;
	l=(screen.availWidth/2)-(w/2);
	t=(screen.availHeight/2)-(h/2);
	ob = window.open("about:blank","win_re","top="+t+",left="+l+",width="+w+",height="+h+",status=no,resizable=no,toolbars=no,location=no,scrollbars=no");
	//frmInfo.action = "http://www.sdsgis.co.kr/web/anyGuideASP/Search/KTDOM/Search_KTDOM.asp";
	frmInfo.target = "win_re";
	frmInfo.submit();
 }

function sds_load2(txtQ) {

    para = txtQ.split("#$#$");
    
    frm = document.frmInfo;

    frm.custName.value = para[0];
    frm.custUrl.value = para[3];
    frm.custAddr.value = para[1];
    frm.custTel.value = para[2];
    frm.custX.value = para[5];
    frm.custY.value = para[6];
    frm.custHanUrl.value = para[4];
    frm.custCount.value = para[7];

	var w = 600;
	var h = 400;
	var l=(screen.availWidth/2)-(w/2);
	var t=(screen.availHeight/2)-(h/2);
	var ob = window.open("about:blank","win_re","top="+t+",left="+l+",width="+w+",height="+h+",status=no,resizable=no,toolbars=no,location=no,scrollbars=no");


	frm.target = "win_re";
	frm.submit();
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function msgposit(){ 
message.style.posLeft = event.x + 20 + document.body.scrollLeft // ¼ýÀÚ 20Àº Ä¿¼­¿Í Ç³¼±µµ¿ò¸»ÀÇ °¡·Î °£°Ý 
message.style.posTop = event.y - 20 + document.body.scrollTop// ¼ýÀÚ -20Àº Ä¿¼­¿Í Ç³¼±µµ¿ò¸»ÀÇ ¼¼·Î °£°Ý 
} 

function msgset(str,str2){ 
var text 
text ='<table border="0" cellpadding="6" cellspacing="0" bgcolor=#E7E7E7 style="font-size:9pt; border-width:1; border-color:black; border-style:solid;">' 
text += '<tr><td><p><b>' + str + '<br></b>' + str2 + '</td></tr></table>' 
message.innerHTML=text 
} 

function msghide(){ 
message.innerHTML='' 
} 

var popup_window = null; 
var callFlag = true; 
var callHours; 
var callMins; 
var callSeconds; 
var currentHours; 
var currentMins; 
var currentSeconds; 
var tempSeconds; 

var page = new PageQuery(location.search);	//add by cm  : Region code parameter 
var region2Value = page.getValue("regioncode2")	 

callSeconds = 61; 
 
function phoneClick(status){ 
 
	if (callSeconds == 61) { 
		callStamp = new Date(); 
		callHours = callStamp.getHours(); 
		callMins = callStamp.getMinutes(); 
		callSeconds = callStamp.getSeconds(); 
	} else { 
		timeCheck(); 
	} 
	 
	if (callFlag == true) { 
	 
		if (status != 0) { 
			if (popup != null) popup.focus(); 
			else { 
				var popup = open(status,'Popup','width=353,height=235');
				popup_window = popup; 
			} 
		} else { 
			if (popup_window != null) popup_window.close(); 
		} 
	 
	} 
	 
	callFlag = false; 
} 
 
function timeCheck() { 
	Stamp = new Date(); 
	currentHours = Stamp.getHours(); 
	currentMins = Stamp.getMinutes(); 
	currentSeconds = Stamp.getSeconds(); 
	tempSeconds = callSeconds+10; 
	 
	if (currentHours > callHours) { 
		callTimeStore(); 
	} else if (currentMins > callMins) { 
		callTimeStore(); 
	} else if (currentSeconds > tempSeconds) { 
		callTimeStore(); 
	} 	 
	 
} 
 
function callTimeStore() { 
	callFlag = true; 
	callHours = currentHours; 
	callMins = currentMins; 
	callSeconds = currentSeconds; 
} 
	function changeRegionCodedir(gfrm)		//º»¹® Áö¿ªÄÚµå º¯°æ 
	{
		var oSelectMain = gfrm.regioncode1;
		var oSelectSub = gfrm.regioncode2;
		
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		}
		
		for( var i=0; i < sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
			 oSelectSub.add(oOption);
		}	 
	}	
	function changeRegionDir(region)		//º»¹® Áö¿ªÄÚµå º¯°æ 
	{
		var oSelectMain = document.sForm.regioncode1;
//		var oSelectSub = gfrm.a_region2;
		
		var nSelectedMainIndex = region;
		var nCurrentOptionCount = oSelectMain.length;
		
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectMain.remove(0);
		}
		for( var i=0; i < 17 ; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode1[i];
			 oOption.text = sRegionName1[i];
			 	if(i == region ){
				 oOption.selected = true;
				 }
			 oSelectMain.add(oOption);
		}
		
		changeRegionCodedir(document.sForm);	//½Ã±º±¸ º¯°æ 
			 
		
	}	
	function goDir(rhcat,rmhcat){		//Category ºÐ·ùº°·Î ÀÌµ¿
	 
		var gfrm = document.sForm;
		gfrm.a_hcat.value=rhcat;
		gfrm.a_mhcat.value=rmhcat; 
		if(gfrm.regioncode1.value=="0"){gfrm.regioncode1.value = "";}
		if(gfrm.regioncode2.value=="0"){gfrm.regioncode2.value = "";}
		if(gfrm.a_hcat.value=="00"){gfrm.a_hcat.value = "";}
		if(gfrm.a_mhcat.value=="00"){gfrm.a_mhcat.value = "";}

		if (gfrm.regioncode1.value=="" && gfrm.regioncode2.value=="")
		{
			gfrm.action = "http://search.ktdom.com/search_directory.php";
		}else{ 
			gfrm.action = "http://search.ktdom.com/search_directory.php";
		}
		gfrm.submit();
	}


	function goSearch( p_oForm )
	{			
	        p_oForm.q.value = p_oForm.new_search.value;
	   
	    	 var nType = p_oForm.searchtype.selectedIndex;
	    	 var sType = p_oForm.searchtype.options[nType].value;

	  	 
	  	 if( p_oForm.new_search.value == '' ) {
			document.location='http://www.ktdom.com/han_search';

		}else{	
		

					  	 
		  	 if( sType == 'total' ) p_oForm.action = 'http://search.ktdom.com/search_total.php';
		  	 else if( sType == 'haninju' )  p_oForm.action = 'http://search.ktdom.com/search_hancompany.php'; 
	  		else if( sType == 'kse' ) p_oForm.action = 'http://search.ktdom.com/search_stock.php';
	  		else if( sType == 'ceo' ) p_oForm.action = 'http://search.ktdom.com/search_ceo.php';
	  		else if( sType == 'cafe' ) p_oForm.action = 'http://search.ktdom.com/search_cafe.php';
		  	else if( sType == 'foreign' ) p_oForm.action = 'http://search.ktdom.com/search_foreign.php';
		  	else if( sType == 'webdesign' ) p_oForm.action = 'http://search.ktdom.com/search_webdesign.php';
			else if( sType == 'product' ) p_oForm.action = 'http://search.ktdom.com/search_product_img.php';
			else if( sType == 'public' ) p_oForm.action = 'http://search.ktdom.com/search_public.php';
			else if( sType == 'company' ) p_oForm.action = 'http://search.ktdom.com/search_company.php';
			else if( sType == 'web' ) p_oForm.action = 'http://search.ktdom.com/search_web.php';	  	 
			else if( sType == 'news' ) p_oForm.action = 'http://search.ktdom.com/search_news.php';	  	 
			else if( sType == 'britannica' ) p_oForm.action = 'http://search.ktdom.com/search_dic.php';	  
			else if( sType == 'map' ) p_oForm.action = 'http://search.ktdom.com/search_map.php';	  
			 
			    p_oForm.submit();
		}
	}
	function goSearchMain( p_oForm )
	{			
	        p_oForm.q.value = p_oForm.new_search.value;
	   
	    	 var nType = p_oForm.searchtype.selectedIndex;
	    	 var sType = p_oForm.searchtype.options[nType].value;

// Æ¯¼ö¹®ÀÚ Á¸Àç Check
		 
	      	checktmp = p_oForm.q.value;
      		var checkchar = new Array ( '-', '%', '&' , '+', '^', '*', '!' ) ;
      		checkCnt = 0;
      	
		for ( j = 0 ; j < 7 ; j++){
      			if ( checktmp.indexOf(checkchar[j])>-1 ) { 
	      			checkCnt++ ;
      			}
      		}	
	    	 
		 replaceChars(p_oForm.q.value,p_oForm);
		 replaceChars2(p_oForm.q.value,p_oForm);
		 	  	 
	  	 if( p_oForm.new_search.value == '' ) {
			document.location='http://www.ktdom.com/han_search';

//			p_oForm.submit();

//			return;
		}else{	
			var sSpecialChars = new Array('%');
			
			for( var i=0; i < sSpecialChars.length; i++ ) {			
				p_oForm.q.value = p_oForm.q.value.replace(sSpecialChars[i], '');
			}	
	  		
	  		// ¿¹¿Ü¹®ÀÚ
		  	p_oForm.q.value = p_oForm.q.value.replace(' & ', ' and ');
			p_oForm.q.value = p_oForm.q.value.replace(' - ', ' minus ');
			p_oForm.q.value = p_oForm.q.value.replace('˜Þ', '');
			p_oForm.q.value = p_oForm.q.value.replace('‘¶', '');
			p_oForm.q.value = p_oForm.q.value.replace('¸þ', '');
			p_oForm.q.value = p_oForm.q.value.replace('¶™', '');
			p_oForm.q.value = p_oForm.q.value.replace('†ö', '');
			p_oForm.q.value = p_oForm.q.value.replace('Ÿæ', '');
			p_oForm.q.value = p_oForm.q.value.replace('ŸÞ', '');

			p_oForm.q.value = p_oForm.q.value.replace(' ', '');							
			
			for(var j=0 ; j < p_oForm.q.length; j++){
				p_oForm.q.value = p_oForm.q.value.replace('%', '');
					
			}
		
//		  	p_oForm.q.value = p_oForm.q.value.replace(' & ', ' and ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' - ', ' minus ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' | ', ' or ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' ^ ', ' xor ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' ! ', ' minus ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' + ', ' or ');					  	 
		  	 if( sType == 'tsearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/totalsearch.jsp';
		  	 else if( sType == 'hansearch' ) {  if ( checkCnt > 0 ) { alert("ÇÑ±ÛÅ°¿öµå °Ë»ö¿¡´Â Æ¯¼ö¹®ÀÚ¸¦ »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù."); p_oForm.new_search.focus(); return;  } else {p_oForm.action = 'http://www.ktdom.com/han_search/han/hansearch_total.php'; } }
		  	 else if( sType == 'directory' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/dirsearch.jsp';
	  		 else if( sType == 'stock' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/stocksearch.jsp';
	  		 else if( sType == 'psearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/productsearch_img.jsp';
		  	 else if( sType == 'csearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/company_search.jsp';
		  	 else if( sType == 'webdoc' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/websearch.jsp';
	  		 else if( sType == 'webnews') {
	  			p_oForm.action = 'http://news.ktdom.com/search/search.php';
	  			p_oForm.Query.value = p_oForm.q.value ;	  	 		
	  	 		//location.href = 'http://search.ktdom.com/servlet/ResultServlet?key=' + p_oForm.new_search.value +  '&searchtype=news&type=3&option=and&page=1&target=khan&target=hankook&target=hankyung&target=digitaltimes&time=2';
		  	 	//return;
		  	 }	
	  	 
	        p_oForm.submit();
		}
	}

	function goLocalSearch(p_type )
	{			
		var p_oForm = document.localForm;
	        p_oForm.q.value = p_oForm.new_search.value;
	   
//	    	 var nType = p_oForm.searchtype.selectedIndex;
	    	 var sType = p_type;

// Æ¯¼ö¹®ÀÚ Á¸Àç Check
		 
	      	checktmp = p_oForm.q.value;
      		var checkchar = new Array ( '-', '%', '&' , '+', '^', '*', '!') ;
      		checkCnt = 0;
      	
		for ( j = 0 ; j < 7 ; j++){
      			if ( checktmp.indexOf(checkchar[j])>-1 ) { 
	      			checkCnt++ ;
      			}
      		}	
      			  	 
		replaceChars(p_oForm.q.value,p_oForm);
		
		var sSpecialChars = new Array('%');
			
		for( var i=0; i < sSpecialChars.length; i++ ) {			
			p_oForm.q.value = p_oForm.q.value.replace(sSpecialChars[i], '');
		}	
	  	
	  	p_oForm.q.value = p_oForm.q.value.replace(' & ', ' and ');
		p_oForm.q.value = p_oForm.q.value.replace(' - ', ' minus ');

		//¿¹¿Ü¹®ÀÚ
		p_oForm.q.value = p_oForm.q.value.replace('˜Þ', '');
		p_oForm.q.value = p_oForm.q.value.replace('‘¶', '');
		p_oForm.q.value = p_oForm.q.value.replace('¸þ', '');
		p_oForm.q.value = p_oForm.q.value.replace('¶™', '');
		p_oForm.q.value = p_oForm.q.value.replace('†ö', '');
		p_oForm.q.value = p_oForm.q.value.replace('Ÿæ', '');
		p_oForm.q.value = p_oForm.q.value.replace('ŸÞ', '');
		
		p_oForm.q.value = p_oForm.q.value.replace(' ', '');
		
						
		for(var j=0 ; j < p_oForm.q.length; j++){
			p_oForm.q.value = p_oForm.q.value.replace('%', '');
				
		}
		
//		  	p_oForm.q.value = p_oForm.q.value.replace(' & ', ' and ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' - ', ' minus ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' | ', ' or ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' ^ ', ' xor ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' ! ', ' minus ');
//		  	p_oForm.q.value = p_oForm.q.value.replace(' + ', ' or ');					  	 
	  	 if( sType == 'tsearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/totalsearch.jsp';
	  	 else if( sType == 'hansearch' ) {  if ( checkCnt > 0 ) { alert("ÇÑ±ÛÅ°¿öµå °Ë»ö¿¡´Â Æ¯¼ö¹®ÀÚ¸¦ »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù."); p_oForm.new_search.focus(); return;  } else {p_oForm.action = 'http://www.ktdom.com/han_search/han/hansearch_total.php'; } }
	  	 else if( sType == 'directory' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/dirsearch.jsp';
	  	 else if( sType == 'stock' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/stocksearch.jsp';
	  	 else if( sType == 'psearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/productsearch_img.jsp';
	  	 else if( sType == 'csearch' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/company_search.jsp';
	  	 else if( sType == 'webdoc' ) p_oForm.action = 'http://search.ktdom.com/jsp/newS/websearch.jsp';
	  	else if( sType == 'webnews') {
	  			p_oForm.action = 'http://news.ktdom.com/search/search.php';
	  			p_oForm.Query.value = p_oForm.q.value ;	  		
//	  	 	location.href = 'http://search.ktdom.com/servlet/ResultServlet?key=' + p_oForm.new_search.value +  '&searchtype=news&type=3&option=and&page=1&target=khan&target=hankook&target=hankyung&target=digitaltimes&time=2';
//	  	 	return;
	  	 }	
	  	 
	        p_oForm.submit();
	}

	function goCategory( p_oForm, p_sURL )
	{
		p_oForm.q.value = p_oForm.new_search.value;
		
		replaceChars(p_oForm.q.value,p_oForm);

// Æ¯¼ö¹®ÀÚ Á¸Àç Check
		 
	      	checktmp = p_oForm.q.value;
      		var checkchar = new Array ( '-', '%', '&' , '+', '^', '*', '!') ;
      		checkCnt = 0;
      	
		for ( j = 0 ; j < 7 ; j++){
      			if ( checktmp.indexOf(checkchar[j])>-1 ) { 
	      			checkCnt++ ;
      			}
      		}	
      			  	 
		replaceChars(p_oForm.q.value,p_oForm);
		
		var sSpecialChars = new Array('%');
			
		for( var i=0; i < sSpecialChars.length; i++ ) {			
			p_oForm.q.value = p_oForm.q.value.replace(sSpecialChars[i], '');
		}	
	  	
	  	p_oForm.q.value = p_oForm.q.value.replace(' & ', ' and ');
		p_oForm.q.value = p_oForm.q.value.replace(' - ', ' minus ');
		
		//¿¹¿Ü¹®ÀÚ
		p_oForm.q.value = p_oForm.q.value.replace('˜Þ', '');
		p_oForm.q.value = p_oForm.q.value.replace('‘¶', '');
		p_oForm.q.value = p_oForm.q.value.replace('¸þ', '');
		p_oForm.q.value = p_oForm.q.value.replace('¶™', '');
		p_oForm.q.value = p_oForm.q.value.replace('†ö', '');
		p_oForm.q.value = p_oForm.q.value.replace('Ÿæ', '');
		p_oForm.q.value = p_oForm.q.value.replace('ŸÞ', '');
			
		p_oForm.q.value = p_oForm.q.value.replace(' ', '');


		
		if( p_oForm.new_search.value == '' ) {
/** °Ë»ö°ªÀÌ ¾øÀ¸¸é ¹«Á¶°Ç ¾ËÂ¥ ¸ÞÀÎÀ¸·Î 
			if (p_sURL== 'http://www.ktdom.com/search/productsearch.php'){
				document.location='http://search.ktdom.com/jsp/newS/index.jsp';
			}else if(p_sURL== 'http://www.ktdom.com/han_search/han/hansearch_total.php'){
				document.location='http://www.ktdom.com/han_search/han/hansearch_total.php';				
			}else if(p_sURL== 'http://www.ktdom.com/search/companysearch.php'){
				document.location='http://search.ktdom.com/jsp/newS/index.jsp';
			}else if(p_sURL== 'totalsearch.jsp' || p_sURL== 'http://search.ktdom.com/jsp/newS/totalsearch.jsp' ){
//				document.location='http://search.ktdom.com/jsp/newS/index.jsp';
				document.location='http://search.ktdom.com/jsp/newS/totalsearch.jsp';
			}else if(p_sURL== 'dirsearch.jsp' || p_sURL== 'http://search.ktdom.com/jsp/newS/dirsearch.jsp'){
				document.location='http://search.ktdom.com/jsp/newS/index.jsp';
			}else if(p_sURL== 'websearch.jsp' || p_sURL== 'http://search.ktdom.com/jsp/newS/websearch.jsp'){
				document.location='http://search.ktdom.com/jsp/newS/index.jsp';			
			}else{
				document.location='http://www.ktdom.com/han_search';			
			}
			
**/
//			p_oForm.action='http://search.ktdom.com/jsp/newS/nokeyword.jsp';
//			p_oForm.regioncode1.value='0';
//			p_oForm.regioncode2.value='0';
//			p_oForm.submit();
//			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
//			p_oForm.new_search.focus();
//			return;
			
			document.location = 'http://www.ktdom.com/han_search';
		}	
		//else {
//			var sURL = p_sURL + '?q=' + p_oForm.new_search.value;
		//	var sURL = p_sURL + '?q=' + p_oForm.q.value;
//			var nRegionCode1 = p_oForm.regioncode1.options[p_oForm.regioncode1.selectedIndex].value;
//			var nRegionCode2 = p_oForm.regioncode2.options[p_oForm.regioncode2.selectedIndex].value;
//			sURL = sURL + '&regioncode1=' + nRegionCode1 + '&regioncode2=' + nRegionCode2;
		//	location.href = sURL;
		//}
		
		else {
//			var sURL = '/jsp/newS/'+p_sURL + '?q=' + p_oForm.key.value;

			if( p_sURL.substring(0,4) == 'http' ){
//-- 2004. 2. 20 post »ç¿ëÀ¸·Î Form Àü¼Û
//--				var sURL = p_sURL + '?q=' + p_oForm.q.value;
//--				location.href = sURL;
				p_oForm.action = p_sURL ; 
				p_oForm.submit();
			}
//			if( p_sURL == 'http://www.ktdom.com/search/companysearch.php'){
//				var sURL = 'http://www.ktdom.com/search/companysearch.php'+ '?q=' + p_oForm.q.value;
//				location.href = sURL;
//			}
			else {
				var sURL = '/jsp/newS/'+p_sURL + '?q=' + p_oForm.q.value;
				location.href = sURL;
			}
		}			
	}	


	function goMetaSearch( p_oForm, p_sURL )
	{
	
		p_oForm.q.value = p_oForm.new_search.value;
		p_oForm.Query.value = p_oForm.new_search.value ; 
		
		replaceChars(p_oForm.q.value,p_oForm);	
		
		if( p_oForm.new_search.value == '' ) {
//-- Close 2004. 06. 02. by CM   ´º½º °Ë»öÃÊ±â·Î ÀÌµ¿.			
//--			document.location='http://www.ktdom.com/han_search';
			document.location='http://news.ktdom.com/search/search.php';
//			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
//			p_oForm.new_search.focus();
//			return;
//			p_oForm.submit();
		}	
		else {
//			var sURL = p_sURL + '&key=' + p_oForm.new_search.value;
	// Close 04.14		var sURL = p_sURL + '&key=' + p_oForm.q.value;
	//		location.href = sURL;
			p_oForm.action = p_sURL ;
			p_oForm.submit();
		}	
	}	
	
	function KeyCheck()
	{
	 	if( document.all ) {
	 		if( event.keyCode == 13 ) { 
	 			goSearch(searchForm); return false;
	 		}
	 	}
	}			
	
	function goStockLocal(sfrm){
		sfrm.submit();	
		
	}
	


//	document.onkeydown = KeyCheck;	

	function changeRegionNew( p_oForm)		//º»¹® Áö¿ªÄÚµå º¯°æ 
	{
//	Page Form¿¡¼­ ¼±ÅÃ½Ã region2Value°ª ÃÊ±âÈ­
		region2Value = 0;
		var oSelectMain = p_oForm.regioncode1;
		var oSelectSub = p_oForm.regioncode2;
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		var CheckPlusOne = 0;
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		}

		var j = 0 ;
		for( var i=0; i <= sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
 			 if (CheckPlusOne == 1){
//				 oOption.selected = true ;
				 CheckPlusOne = 0;
			}

			 if( oOption.value == region2Value ){
			 	CheckPlusOne = 1;
			 }			 
			 oSelectSub.add(oOption);
			 
			j = i ;
		}	 
	
		oSelectSub.remove(j);
	}		



	function changeRegionCode( p_oForm )
	{
		var oSelectMain = p_oForm.regioncode1;
		var oSelectSub = p_oForm.regioncode2;
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		var CheckPlusOne = 0;
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		}

		var j = 0 ;
		for( var i=0; i <= sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
 			 if (CheckPlusOne == 1){
				 oOption.selected = true ;
				 CheckPlusOne = 0;
			}

			 if( oOption.value == region2Value ){
			 	CheckPlusOne = 1;
			 }			 
			 oSelectSub.add(oOption);
			 
			j = i ;
		}	 
	
		oSelectSub.remove(j);
	} 

// Page ´Ù½Ã ÀÐÀ»¶§. 
/**	function changeRegionCodeRefresh( p_oForm )
	{
		var oSelectMain = p_oForm.regioncode1;
		var oSelectSub = p_oForm.regioncode2;
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		var CheckPlusOne = 0;
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		}
		for( var i=0; i < sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
 			 if (CheckPlusOne == 1){
				 oOption.selected = true ;
				 CheckPlusOne = 0;
			}

			 if( oOption.value == region2Value ){
			 	CheckPlusOne = 1;
			 }
			 oSelectSub.add(oOption);
			 
		}	 
	} 
**/

	function changehitCode( p_oForm )
	{
		var oSelectMain = p_oForm.a_region1;
		var oSelectSub = p_oForm.a_region2;
		
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		} 
		for( var i=0; i < sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
			 oSelectSub.add(oOption);
		}	 
	} 
	function changeCodeNew( p_oForm )
	{
		var oSelectMain = p_oForm.regioncode1;
		var oSelectSub = p_oForm.regioncode2;
		
		var nSelectedMainIndex = oSelectMain.selectedIndex;
		var nCurrentOptionCount = oSelectSub.length;
		
		for( var i=0; i < nCurrentOptionCount; i++ ) {
			oSelectSub.remove(0);
		} 
		for( var i=0; i < sRegionCode2[nSelectedMainIndex].length; i++ ) {
			 var oOption = document.createElement("OPTION");	
			 oOption.value = sRegionCode2[nSelectedMainIndex][i];
			 oOption.text = sRegionName2[nSelectedMainIndex][i];
			 oSelectSub.add(oOption);
		}	 
	} 

	function changeSearchType( p_oForm )
	{
		var oSelect = p_oForm.searchtype;
		var nSelectedIndex = oSelect.selectedIndex;
		
		if( oSelect.options[nSelectedIndex].value == 'webnews' ||
			oSelect.options[nSelectedIndex].value == 'webdoc' ) {
			p_oForm.regioncode1.options[0].selected = true;
			p_oForm.regioncode2.options[0].selected = true;
			p_oForm.regioncode1.disabled = true;
			p_oForm.regioncode2.disabled = true;
		}
		else {
			p_oForm.regioncode1.disabled = false;
			p_oForm.regioncode2.disabled = false;
		}	
	}	
	
	

	
	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];}}
	}
	var sRegionCode1 = new Array(
		0,19,18,21,16,15,17,20,11,12,25,26,13,14,22,23,24
	);
	
	// Áö¿ª ÀÌ¸§ ÄÚµå »ý¼º 
	var sRegionName1 = new Array(
		'Àü±¹','¼­¿ï','ºÎ»ê','ÀÎÃµ','´ë±¸','±¤ÁÖ','´ëÀü','¿ï»ê','°­¿øµµ','°æ±âµµ','ÃæÃ»³²µµ','ÃæÃ»ºÏµµ','°æ»ó³²µµ','°æ»óºÏµµ','Àü¶ó³²µµ','Àü¶óºÏµµ','Á¦ÁÖ'
	);				
	
	// Áö¿ªÄÚµå2 »ý¼º		
	var sRegionCode2 = new Array(
		new Array('0'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26'),
		new Array('0','11','12','13','14','15','16','17','18','19','20'),
		new Array('0','11','12','13','14','15','16','17','18'),
		new Array('0','11','12','13','14','15'),
		new Array('0','11','12','13','14','15'),
		new Array('0','11','12','13','14','15'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'),
		new Array('0','11','12','13','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32'),
		new Array('0','11','12','13','14','15','16','17','18','19','20','21','22','23','24'),
		new Array('0','11','12','13','14')
	);					
	
	// Áö¿ª ÀÌ¸§2 »ý¼º		
	var sRegionName2 = new Array(
		new Array(
		'½Ã±º±¸'),
		new Array(
		'½Ã±º±¸','°­³²±¸','°­µ¿±¸','°­ºÏ±¸','°­¼­±¸','°ü¾Ç±¸','±¤Áø±¸','±¸·Î±¸','±ÝÃµ±¸','³ë¿ø±¸','µµºÀ±¸','µ¿´ë¹®±¸','µ¿ÀÛ±¸','¸¶Æ÷±¸','¼­´ë¹®±¸','¼­ÃÊ±¸','¼ºµ¿±¸','¼ººÏ±¸','¼ÛÆÄ±¸','¾çÃµ±¸','¿µµîÆ÷±¸','¿ë»ê±¸','ÀºÆò±¸','Á¾·Î±¸','Áß±¸','Áß¶û±¸'),
		new Array(
		'½Ã±º±¸','°­¼­±¸','±ÝÁ¤±¸','±âÀå±º','³²±¸','µ¿±¸','µ¿·¡±¸','ºÎ»êÁø±¸','ºÏ±¸','»ç»ó±¸','»çÇÏ±¸','¼­±¸','¼ö¿µ±¸','¿¬Á¦±¸','¿µµµ±¸','Áß±¸','ÇØ¿î´ë±¸'),
		new Array(
		'½Ã±º±¸','°­È­±º','°è¾ç±¸','³²±¸','³²µ¿±¸','µ¿±¸','ºÎÆò±¸','¼­±¸','¿¬¼ö±¸','¿ËÁø±º','Áß±¸'),
		new Array(
		'½Ã±º±¸','³²±¸','´Þ¼­±¸','´Þ¼º±º','µ¿±¸','ºÏ±¸','¼­±¸','¼ö¼º±¸','Áß±¸'),
		new Array(
		'½Ã±º±¸','±¤»ê±¸','³²±¸','µ¿±¸','ºÏ±¸','¼­±¸'),
		new Array(
		'½Ã±º±¸','´ë´ö±¸','µ¿±¸','¼­±¸','À¯¼º±¸','Áß±¸'),
		new Array(
		'½Ã±º±¸','³²±¸','µ¿±¸','ºÏ±¸','¿ïÁÖ±º','Áß±¸'),
		new Array(
		'½Ã±º±¸','°­¸ª½Ã','°í¼º±º','µ¿ÇØ½Ã','»ïÃ´½Ã','¼ÓÃÊ½Ã','¾ç±¸±º','¾ç¾ç±º','¿µ¿ù±º','¿øÁÖ½Ã','ÀÎÁ¦±º','Á¤¼±±º','Ã¶¿ø±º','ÃáÃµ½Ã','ÅÂ¹é½Ã','ÆòÃ¢±º','È«Ãµ±º','È­Ãµ±º','È¾¼º±º'),
		new Array(
		'½Ã±º±¸','°¡Æò±º','°í¾ç½Ã','°úÃµ½Ã','±¤¸í½Ã','±¤ÁÖ½Ã','±¸¸®½Ã','±ºÆ÷½Ã','±èÆ÷½Ã','³²¾çÁÖ½Ã','µ¿µÎÃµ½Ã','ºÎÃµ½Ã','¼º³²½Ã','¼ö¿ø½Ã','½ÃÈï½Ã','¾È»ê½Ã','¾È¼º½Ã','¾È¾ç½Ã','¾çÁÖ±º','¾çÆò±º','¿©ÁÖ±º','¿¬Ãµ±º','¿À»ê½Ã','¿ëÀÎ½Ã','ÀÇ¿Õ½Ã','ÀÇÁ¤ºÎ½Ã','ÀÌÃµ½Ã','ÆÄÁÖ½Ã','ÆòÅÃ½Ã','Æ÷Ãµ±º','ÇÏ³²½Ã','È­¼º½Ã'),
		new Array(
		'½Ã±º±¸','°øÁÖ½Ã','±Ý»ê±º','³í»ê½Ã','´çÁø±º','º¸·É½Ã','ºÎ¿©±º','¼­»ê½Ã','¼­Ãµ±º','¾Æ»ê½Ã','¿¬±â±º','¿¹»ê±º','Ãµ¾È½Ã','Ã»¾ç±º','ÅÂ¾È±º','È«¼º±º'),
		new Array(
		'½Ã±º±¸','±«»ê±º','´Ü¾ç±º','º¸Àº±º','¿µµ¿±º','¿ÁÃµ±º','À½¼º±º','Á¦Ãµ½Ã','ÁøÃµ±º','Ã»¿ø±º','Ã»ÁÖ½Ã','ÃæÁÖ½Ã'),
		new Array(
		'½Ã±º±¸','°ÅÁ¦½Ã','°ÅÃ¢±º','°í¼º±º','±èÇØ½Ã','³²ÇØ±º','¸¶»ê½Ã','¹Ð¾ç½Ã','»çÃµ½Ã','»êÃ»±º','¾ç»ê½Ã','ÀÇ·É±º','ÁøÁÖ½Ã','ÁøÇØ½Ã','Ã¢³ç±º','Ã¢¿ø½Ã','Åë¿µ½Ã','ÇÏµ¿±º','ÇÔ¾È±º','ÇÔ¾ç±º','ÇÕÃµ±º'),
		new Array(
		'½Ã±º±¸','°æ»ê½Ã','°æÁÖ½Ã','°í·É±º','±ºÀ§±º','±èÃµ½Ã','¹®°æ½Ã','ºÀÈ­±º','»óÁÖ½Ã','¼ºÁÖ±º','¾Èµ¿½Ã','¿µ´ö±º','¿µ¾ç±º','¿µÁÖ½Ã','¿µÃµ½Ã','¿¹Ãµ±º','¿ï¸ª±º','¿ïÁø±º','ÀÇ¼º±º','Ã»µµ±º','Ã»¼Û±º','Ä¥°î±º','Æ÷Ç×½Ã','±¸¹Ì½Ã'),
		new Array(
		'½Ã±º±¸','°­Áø±º','°íÈï±º','°î¼º±º','±¤¾ç½Ã','±¸·Ê±º','³ªÁÖ½Ã','´ã¾ç±º','¸ñÆ÷½Ã','¹«¾È±º','º¸¼º±º','¼øÃµ½Ã','½Å¾È±º','¿©¼ö½Ã','¿µ±¤±º','¿µ¾Ï±º','¿Ïµµ±º','Àå¼º±º','ÀåÈï±º','Áøµµ±º','ÇÔÆò±º','ÇØ³²±º','È­¼ø±º'),
		new Array(
		'½Ã±º±¸','°íÃ¢±º','±º»ê½Ã','±èÁ¦½Ã','³²¿ø½Ã','¹«ÁÖ±º','ºÎ¾È±º','¼øÃ¢±º','¿ÏÁÖ±º','ÀÍ»ê½Ã','ÀÓ½Ç±º','Àå¼ö±º','ÀüÁÖ½Ã','Á¤À¾½Ã','Áø¾È±º'),
		new Array(
		'½Ã±º±¸','³²Á¦ÁÖ±º','ºÏÁ¦ÁÖ±º','¼­±ÍÆ÷½Ã','Á¦ÁÖ½Ã')
	);	


	function open_sms(domain_no){
	var winsms = 'http://www.ktdom.com/search/op_sms.php?a_domain_no=';
	var v_domain_no = domain_no;
	window.open(winsms+v_domain_no,'sms','width=514,height=451,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');	
	}

//	function popupBest(domain_no){
//	var winsms = 'http://www.ktdom.com/detail/best_company.php?a_domain_no=';
//	var v_domain_no = domain_no;
//	window.open(winsms+v_domain_no,'sms','width=514,height=451,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');	
//	}

	function popupWindow(p_sName, p_sUrl, p_nWidth, p_nHeight)
	{
		var sUrl = p_sUrl;	
		var sName = p_sName;
		var nWindowWidth = p_nWidth;
		var nWindowHeight = p_nHeight;
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=yes,location=yes,menubar=yes,resizable=yes,status=yes,scrollbars=yes"+sPosition);
		oPopup.focus();
	}      	
	function popupBest(p_company,p_domain)
	{
		var sDomain = p_domain;	
		var sCompany = p_company;
//		var sUrl = 'http://www.ktdom.com/detail/best_company.php?a_domain_no=';
		var sUrl = 'http://search.ktdom.com/jsp/newS/best_company.jsp?a_domain_no=';
		var sName = 'ktbest';
		var nWindowWidth = 550;
		var nWindowHeight = 543;	//550
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl+sDomain+'&a_company_no='+sCompany,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
		oPopup.focus();
	}     

    function popupBestNew(p_web_no)
    {
        var sWebno = p_web_no ;
//      var sUrl = 'http://www.ktdom.com/detail/best_company.php?a_domain_no=';
//      var sUrl = 'http://search.ktdom.com/jsp/newS/best_company.jsp?a_domain_no=';
        var sUrl = 'http://www.ktdom.com/detail/best_popup_detail.php?a_web_no=';
        var sName = 'ktbest';
        var nWindowWidth = 550;
        var nWindowHeight = 543;    //550
        var sX = (screen.width - nWindowWidth)/ 2;
        var sY = (screen.height - nWindowHeight)/ 2;
        var sPosition = ",left="+sX+",top="+sY;
        oPopup = window.open(sUrl+sWebno,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
        oPopup.focus();
    }	
	 			
	function popupBestphp(p_company,p_domain)
	{
		var sDomain = p_domain;	
		var sCompany = p_company;
		var sUrl = 'http://www.ktdom.com/detail/best_company.php?a_domain_no=';
		var sName = 'ktbest';
		var nWindowWidth = 550;
		var nWindowHeight = 543;	//550 
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl+sDomain+'&a_company_no='+sCompany,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
		oPopup.focus();
	}      			
	function popupBestphpiframe(p_company,p_domain)
	{
		var sDomain = p_domain;	
		var sCompany = p_company;
		var sUrl = 'http://www.ktdom.com/detail/best_company.php?a_chk=iframe&a_domain_no=';
		var sName = 'ktbest';
		var nWindowWidth = 550;
		var nWindowHeight = 543;	//550
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl+sDomain+'&a_company_no='+sCompany,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
		oPopup.focus();
	}      			

		function popupWindowWithNoMenu(p_sName, p_sUrl, p_nWidth, p_nHeight)
		{
			var sUrl = p_sUrl;	
			var sName = p_sName;
			var nWindowWidth = p_nWidth;
			var nWindowHeight = p_nHeight;
			var sX = (screen.width - nWindowWidth)/ 2;
			var sY = (screen.height - nWindowHeight)/ 2;
			var sPosition = ",left="+sX+",top="+sY;
			oPopup = window.open(sUrl,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=yes,status=yes,scrollbars=yes"+sPosition);
			oPopup.focus();
		}      		

	function popupStock(p_company,p_domain)
	{
		var sDomain = p_domain;	
		var sCompany = p_company;
		var sUrl = 'stock_detail_info.jsp?a_company_no=';
		var sName = 'ktbest';
		var nWindowWidth = 550;
		var nWindowHeight = 543;	//550 
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl+sCompany,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
		oPopup.focus();
	}        				


	function popupStockdeploy(p_company,p_domain)
	{
		var sDomain = p_domain;	
		var sCompany = p_company;
		var sUrl = 'stock_detail_deploy.jsp?a_company_no=';
		var sName = 'ktbest';
		var nWindowWidth = 550;
		var nWindowHeight = 543;	//550 
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl+sCompany,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=no"+sPosition);
		oPopup.focus();
	} 
	
// rank.ktdom.com url ¿¬°á Ãß°¡ 2005. 1. 5 by CM

	function rankWindow(p_sName, p_sUrl)
	{
		var sUrl = "http://rank.ktdom.com/index.html?reloc="+p_sUrl;	
		var sName = p_sName;
		var nWindowWidth = 1024;
		var nWindowHeight = 768;
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=yes,location=yes,menubar=yes,resizable=yes,status=yes,scrollbars=yes"+sPosition);
		oPopup.focus();
	}  

	function hanurlWindow(p_sUrl)
	{
		var sUrl = "http://hangle.ktdom.com/punycode/best.php?hangle="+p_sUrl;	
		var sName = p_sName;
		var nWindowWidth = 1024;
		var nWindowHeight = 768;
		var sX = (screen.width - nWindowWidth)/ 2;
		var sY = (screen.height - nWindowHeight)/ 2;
		var sPosition = ",left="+sX+",top="+sY;
		oPopup = window.open(sUrl,sName,"width="+nWindowWidth+",height="+nWindowHeight+",toolbar=yes,location=yes,menubar=yes,resizable=yes,status=yes,scrollbars=yes"+sPosition);
		oPopup.focus();
	}  		
		
// ½ÃÀÛÆäÀÌÁö·Î ¸¸µé±â Ã¢

 	function set_homepage(x,url) {
		x.style.behavior = 'url(#default#homepage)';
		x.setHomePage(url); 
	}
	
	
	
	function movePage( p_oForm, p_nPage, p_sType, p_bNatural )
	{
		var nBegin = (p_nPage-1)*15 + 1;
		var nEnd = p_nPage*15;
		
	// ÇÑ±Û »óÈ£ _company  Ãß°¡
		if ( p_sType == 'hancompany'){
			nBegin = (p_nPage-1)*10 + 1;
			nEnd = p_nPage*10;

			p_oForm.action = "http://search.ktdom.com/jsp/newS/hansearch_company.jsp";	
		}
	// »óÇ°ÀÌ¹ÌÁö°Ë»ö
		if ( p_sType == 'producti'){
			nBegin = (p_nPage-1)*25 + 1;
			nEnd = p_nPage*25;

			p_oForm.action = "http://search.ktdom.com/jsp/newS/productsearch_img.jsp";	
		}
		
	// »óÇ°¼³¸í°Ë»ö
		if ( p_sType == 'productp'){
			nBegin = (p_nPage-1)*10 + 1;
			nEnd = p_nPage*10;

			p_oForm.action = "http://search.ktdom.com/jsp/newS/productsearch_pro.jsp";	
		}
				
	       p_oForm.q.value = p_oForm.old_search.value;
	       p_oForm.b.value = nBegin;
	       p_oForm.e.value = nEnd;
	    
		 p_oForm.submit();
	}
	
	function movePageByPage( p_oForm, p_sType, p_nBegin, p_nEnd, p_bNatural )
	{
		if ( p_sType == 'hancompany' ){
			p_oForm.action = "http://search.ktdom.com/jsp/newS/hansearch_company.jsp";	
		}


		if ( p_sType == 'producti' ){
			p_oForm.action = "http://search.ktdom.com/jsp/newS/productsearch_img.jsp";	
		}


		if ( p_sType == 'productp' ){
			p_oForm.action = "http://search.ktdom.com/jsp/newS/productsearch_pro.jsp";	
		}			
			
	       p_oForm.q.value = p_oForm.old_search.value;
	       p_oForm.b.value = p_nBegin;
	       p_oForm.e.value = p_nEnd;
	     
		p_oForm.submit();
	}
	
// Form °ª Parameter Function by CM www. 09. 30

	function PageQuery(q) {
	        if(q.length > 1) this.q = q.substring(1, q.length);
	        else this.q = null;
	        this.keyValuePairs = new Array();
	        if(q) {
	                for(var i=0; i < this.q.split("&").length; i++) {
        	                this.keyValuePairs[i] = this.q.split("&")[i];
	                }
        	}
        	this.getKeyValuePairs = function() { return this.keyValuePairs; }
        	this.getValue = function(s) {
	                for(var j=0; j < this.keyValuePairs.length; j++) {
        	                if(this.keyValuePairs[j].split("=")[0] == s)
	                                return this.keyValuePairs[j].split("=")[1];
        	        }
                	return -1;
        	}
        	this.getparameters = function() {
                	var a = new Array(this.getLength());
	                for(var j=0; j < this.keyValuePairs.length; j++) {
        	                a[j] = this.keyValuePairs[j].split("=")[0];
                	}
                	return a;
        	}
        	this.getLength = function() { return this.keyValuePairs.length; }        
	}

function goflash(gubun){
	var v_gubun = gubun;
	var v_url;	
    var w = 780;
	var h = 488;
    var xl = (screen.availWidth/2)-(w/2);
	var xt = (screen.availHeight/2)-(h/2);
	if (gubun=='1'){
	   v_url = 'http://www.ktdom.com/portfolios/index.html';
	}else if(gubun=='2'){
		v_url = 'http://www.ktdom.com/portfolios/service_01_.html';
	}else if(gubun=='3'){
		v_url = 'http://www.ktdom.com/portfolios/service_02_.html';
	}else if(gubun=='4'){
		v_url = 'http://www.ktdom.com/portfolios/service_03_.html';
	}else if(gubun=='5'){
		v_url = 'http://www.ktdom.com/portfolios/service_04_.html';
	}else if(gubun=='6'){
		v_url = 'http://www.ktdom.com/portfolios/service_05_.html';
	}else{
		v_url = 'http://www.ktdom.com/portfolios/work_01_.html';
	}
    ddkk = window.open(v_url,"dd","width="+w+", height="+h+", top="+xt+", left="+xl+", resizable=no,scrollbars=no");
	ddkk.window.resizeTo(w,h);
	ddkk.window.moveTo(xl,xt);
}

function biz_window(a_url){
      		window.open(a_url,'','width=800,height=600,toolbar=yes,location=yes,directories=yes,menubar=yes,scrollbars=yes,resizable=yes');
}


function replaceChars(entry,iform) {
	out = "%"; // % ¸¦ °ø¹éÀ¸·Î  
	add = " "; 
	temp = "" + entry; 

	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	iform.q.value = temp;
}

function replaceChars2(entry,iform) {
	out = "&"; // % ¸¦ °ø¹éÀ¸·Î  
	add = " "; 
	temp = "" + entry; 

	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + temp.substring(0, pos) ;
	//	+ add + temp.substring((pos + out.length), temp.length));
	}
	iform.q.value = temp;
}

function replaceChars3(entry,iform) {
	out = "%20"; // % ¸¦ °ø¹éÀ¸·Î  
	add = " "; 
	temp = "" + entry; 

	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	iform = temp;
}

function goRank(query){
	rURL = "totalsearch.jsp?q="+query;
	location.href = rURL;
}


function ignoreSpaces(string) {
	var temp = "";
	string = '' + string;
	splitstring = string.split("%20");
	for(i = 0; i < splitstring.length; i++)
	temp += splitstring[i];
	return temp;
}


// »óÇ°¼³¸í°Ë»ö ITEM Link
function intropsearch(qr){
	var q = "";
	var newQ = "";
	//q=qr;


	newQ = unescape(qr)  		
	q = newQ.replace(/(^\s*)|(\s*$)/g, "");


//	newQ = unescape(qr)  		
//	q = newQ.replace(' ', '');

//	q = newQ ;
	
//	for ( i = 0 ; i < qr.length ; i++) {
//		 q = qr.replace(' ', '');
//	}
	
	document.localForm.q.value = q;
	document.localForm.new_search.value = q;
	document.localForm.action = "http://search.ktdom.com/jsp/newS/totalsearch.jsp";
	document.localForm.b.value = "";
	document.localForm.e.value = "";
	
	document.localForm.submit();
		
}   


// µµ¸ÞÀÎ ¸¸·á

function expireWindow(wname,curl,xsize, ysize ){
	window.open('http://www.ktdom.com/cafe/expired/expired.html?a_url='+curl,wname,'width='+xsize+' , height='+ysize+' ' );
}


// È¨ÆäÀÌÁö ¹«·áµî·Ï
function goComp(){	
	window.open('http://www.ktdom.com/detail/regi/regi_homepages.php','ktdomregi','width=480, height=437');
}


function goto_new(gfrm){
	var nSelectedIndex = gfrm.linkaddr.selectedIndex;
	var goURL = gfrm.url.value +"?"+ gfrm.cname.value+"="+gfrm.linkaddr.options[nSelectedIndex].value ;
	//alert(gfrm.action);
	//gfrm.submit();
	location.href=goURL;
}


	function topchangeAlzza(tfrm){
		
		
		var oSelect = tfrm.srcType;
		var nSelectedIndex = oSelect.selectedIndex;
		var newUrl = "";
		if( oSelect.options[nSelectedIndex].value == '1' ) {
			newUrl = "http://www.ktdom.com/han_search/corpinfo/";
		}		
		if( oSelect.options[nSelectedIndex].value == '2' ) {
			newUrl = "http://search.ktdom.com/cate_hot/";
		}
		if( oSelect.options[nSelectedIndex].value == '3' ) {
			newUrl = "/cate_cool/";
		}
		if( oSelect.options[nSelectedIndex].value == '4' ) {
			newUrl = "http://www.ktdom.com/search/mapsearch.php";
		}
		if( oSelect.options[nSelectedIndex].value == '5' ) {
			newUrl = "http://www.ktdom.com/lifeinfo/";			
		}
		
		top.location.href = newUrl ;
		

	}

	// Top select Box 
	
	function topchangeNews(tfrm){
		
		
		var oSelect = tfrm.srcType2;
		var nSelectedIndex = oSelect.selectedIndex;
		var newUrl = "";
		if( oSelect.options[nSelectedIndex].value == '1' ) {
			newUrl = "http://news.ktdom.com/newsdom/politics.php?LinkID=4937";
		}		
		if( oSelect.options[nSelectedIndex].value == '2' ) {
			newUrl = "http://news.ktdom.com/newsdom/economy.php?LinkID=4935";
		}
		if( oSelect.options[nSelectedIndex].value == '3' ) {
			newUrl = "http://news.ktdom.com/newsdom/society.php?LinkID=4936";
		}
		if( oSelect.options[nSelectedIndex].value == '4' ) {
			newUrl = "http://news.ktdom.com/newsdom/entertainment.php?LinkID=4942";
		}
		if( oSelect.options[nSelectedIndex].value == '5' ) {
			newUrl = "http://news.ktdom.com/newsdom/culture.php?LinkID=5126";
		}
		if( oSelect.options[nSelectedIndex].value == '6' ) {
			newUrl = "http://news.ktdom.com/newsdom/it.php?LinkID=1177";			
		}
		if( oSelect.options[nSelectedIndex].value == '7' ) {
			newUrl = "http://news.ktdom.com/newsdom/world.php?LinkID=4938";
		}
		
		location.href = newUrl ;
		
	}
	
	
	
	function safeWin(){
		window.open("/popup/main_notice/pup01.html","safewin","width=560, height=400,scollbars=no");			
	}
	
	function denyWin(){
		window.open("/popup/main_notice/pup02.html","denywin","width=560, height=226, scrollbars=no");
	}
	
	
