<!--
//////////////////////////////°¢ µð·ºÅä¸® ÀÚ¹Ù½ºÅ©¸³Æ® µµ¸ÞÀÎº¯¼öÁöÁ¤
var now_url=document.URLUnencoded;
var domArr=new Array(),domHead="<%=domHead%>",domName="<%=domName%>";
var myoiljang_url="http://"+domHead+"."+domName+"/myoiljang";

if(domHead!='test'){
var shopping_url="http://shopping."+domName;
var resellcar_url="http://resellcar."+domName;
var community_url="http://community."+domName;
var market_url="http://market."+domName;
var url_114="http://114."+domName;
var segy_url="http://segy."+domName;
var estate_url="http://estate."+domName;
}
else{
var shopping_url="http://tshopping."+domName;
var community_url="http://tcommunity."+domName;
var market_url="http://tmarket."+domName;
var url_114="http://t114."+domName;
var segy_url="http://tsegy."+domName;
var estate_url="http://testate."+domName;
}


// Á¢¼ÓÅë°è ÀÚ¹Ù½ºÅ©¸³Æ® ÄÚµå
var s_u=navigator.userAgent,s_apn=navigator.appName,s_w=navigator.appVersion;
var s_apv,s_i,s_ie=s_w.indexOf('MSIE '),s_ns6=s_u.indexOf('Netscape6/');

if(s_w.indexOf('Opera')>=0 || s_u.indexOf('Opera')>=0)
    s_apn='Opera';

if(s_ie>0){
    s_apv=parseInt(s_i=s_w.substring(s_ie+5));
    if(s_apv>3)
        s_apv=parseFloat(s_i);
}
else if(s_ns6>0)
    s_apv=parseFloat(s_u.substring(s_ns6+10));
else
    s_apv=parseFloat(s_w);
var stref = document.referrer;

var re = /&/g;
var reff = stref.replace(re,"*");
var str_q = 'referer='+reff+'&appname='+s_apn+'&appver='+s_apv+'&sc_x='+screen.width+'&sc_y='+screen.height+'&p_name='+window.location.href;
//Á¢¼ÓÅë°èÀÚ¹Ù½ºÅ©¸³Æ® ÄÚµå³¡
////////////////////////////////////
var ns4,ie4,ie5
var x = 0;
var y = 0;
var snow = 0;
ie4 = (document.all)? true:false
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	} else {
		ie5 = false; }
} else { ie5 = false; }

///////////////////////////////¸¶¿ì½ºÅ°Å¬¸¯¹æÁö
function processKey(){
  if ((event.ctrlKey==true && (event.keyCode==78 || event.keyCode==82)) || (event.keyCode>=112 && event.keyCode<=123) || event.keyCode==8){
    event.keyCode=0;
    event.cancelBubble=true;
    event.returnValue=false;
  }
}
//document.onkeydown=processKey;
if(document.all){document.onmousedown=new Function("if(event.button==2) return false");}
////////////»çÀÌÆ® ¹è³Ê¿¬°á///////////
function open_banner(pkCode){
 var url="/cmd/url_hits.wiz?pkCode="+pkCode,winname="banner_openwin",feature="width=500,height=650,scrollbars=no";
 window.open(url,winname,feature);
}

function hidestatus() 
{ 
window.status="(ÁÖ)¿ÀÀÏÀå½Å¹®" 
return true 
} 
if (document.layers) 
document.captureEvents(Event.mouseover | Event.mouseout) 
document.onmouseover=hidestatus 
document.onmouseout=hidestatus 
function status_message()
{
window.status = "(ÁÖ)¿ÀÀÏÀå½Å¹®";
}
//setInterval("status_message()",100)
///////////¹æÁö³¡

function setCookie(name,value,expires) { document.cookie=name + "=" + escape(value) + ((expires == null)? "" : (" ; expires=" + expires.toGMTString())); }
function getCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while(i< clen) { var j = i + alen; if(document.cookie.substring(i,j)==arg){ var end = document.cookie.indexOf(";",j); if(end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j,end)); } i=document.cookie.indexOf(" ",i)+1; if (i==0) break; } return null; }
function bookmark(homeSite,siteName){ window.external.AddFavorite(homeSite,siteName); }
function topPage() { document.body.scrollTop = 0; }
function scrap(office_id, article_id) { w = screen.availWidth / 2 - 200; h = screen.availHeight / 2 - 150; window.open('/scrap/action.php?mode=2&office_id='+office_id+'&article_id='+article_id,'win','top='+h+',left='+w+',toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=410,height=270'); }
function setClientSize( w, h ) { window.resizeBy(w-document.body.clientWidth, h-document.body.clientHeight); }
var keyenable = 0;
function changeKeywords() { objs = document.getElementsByName("keyword"); if (keyenable) { keyenable = 0; for(i = 0; i < objs.length; i++) { obj = objs[i]; obj.style.color='black'; obj.style.textDecorationNone='true'; } } else { keyenable = 1; for(i = 0; i < objs.length; i++) { obj = objs[i]; obj.style.color='#0033CC'; obj.style.textDecorationUnderline='true'; } var keydate = new Date; keydate.setDate(keydate.getDate()+1000); setCookie("keyenable", keyenable, keydate); } }
function KeyOver(obj) { if (keyenable) { obj.style.color='#FF0000'; obj.style.cursor='hand'; }}
function KeyOut(obj) { if (keyenable) { obj.style.color='#0033CC'; obj.style.cursor='default'; } }
function OnClick(id) { if (keyenable) { window.open( 'http://stock.naver.com/sise/ksc_main.php?code='+id, 'stock' ); } }
function isCheck(form,chkName){
 var i,k=0;
  for(i=0;i<form.elements.length;i++){
   if(form.elements[i].name==chkName&&form.elements[i].checked==1)k++;
 }
 return(k); 
 } 
///////////////////////////////////////////////////////////////////////////////////ÆûÀ¯È¿¼º°Ë»ç
function paramEscape(paramValue)
{
   return encodeURIComponent(paramValue);
   //return paramValue;
}

///////////////////////////////////////¹ÙÀÌÆ®«n¤Ñ
function bytelength(pstr) {//¹ÙÀÌÆ®Ã¼Å©
var i, ch;
len = pstr.length;
for (i = 0; i < pstr.length; i++) {
    ch = pstr.substr(i,1).charCodeAt(0);
    if (ch > 127) { len++; }
}
return len;
}
function check_all(obj,form){
 var i,k=0;
 for(i=0;i<form.elements.length;i++){
  if(form.elements[i].name=='chkEdit'){
    form.elements[i].checked=obj.checked;
  }
 }
}
function chk_byte(aquery)
{
	var tmpStr;
	var temp=0;
	var onechar;
	var tcount;
	var returnStr;
	tcount = 0;

	tmpStr = new String(aquery);
	temp = tmpStr.length;

	for (k=0;k<temp;k++)
	{
		onechar = tmpStr.charAt(k);

		if (escape(onechar).length > 4) {
			tcount += 2;
		}
		else if (onechar!='\r') {
			tcount++;
		}
   }		
  return tcount;		
}
//////////////////////////////////////ÇÁ·¹ÀÓÀÚµ¿Å©±âÁ¶Àý
function Resize_Frame(name)

{

        var Frame_Body  = document.frames(name).document.body;

        var Frame_name  = document.all(name);

 

        Frame_name.style.width 

                = Frame_Body.scrollWidth + (Frame_Body.offsetWidth-Frame_Body.clientWidth);

        Frame_name.style.height 

                = Frame_Body.scrollHeight + (Frame_Body.offsetHeight-Frame_Body.clientHeight);

 

        if (Frame_name.style.height == "0px" || Frame_name.style.width == "0px")

        {

            Frame_name.style.width = "700px";       //±âº» iframe ³Êºñ

            Frame_name.style.height = "300px";      //±âº» iframe ³ôÀÌ

            window.status = 'iframe resizing fail.';

        }

        else

        {

            window.status = '';

        }

 

}

/////////////     ÀÌ¹ÌÁö Å©±âº° ¿ÀÇÂ
 function openImage(imgFile){
  if(imgFile!='#'){
  var w=screen.availWidth,h=screen.availHeight;
  w=w/2;
  h=h/2;
  var url="/common/imageView.asp?imgFile="+escape(imgFile)+"&w="+w,winname="imagewindow",feature="width="+w+",height="+h+",scrollbars=yes,resizable=yes";
  window.open(url,winname,feature);
 }
 }
///////////////////////////////////////////////////////Áñ°ÜÃ£±âÃß°¡ 
 function favoritesite(favoriteurl,favoritetitle){
if (document.all)
window.external.AddFavorite(favoriteurl,favoritetitle)}

function bookmarkSite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}


function printView(id){
  window.open("/common/preView.asp?id="+id,"printwindow","width=800,height=600,scrollbars=yes");
}


function getNavigatorType() {
	if ( navigator.appName == "Microsoft Internet Explorer" )
		return 1;  
	else if ( navigator.appName == "Netscape" )
		return 2;	
	else 
		return 0;
}
function getNavigatorVersion() {
	info = window.navigator.appVersion.split(" ");
	return info[0];
}
function setCursorToEnd(elem) {
	if (elem && getNavigatorType() == 1) {
		if (elem.type && (elem.type == "text" || elem.type == "textarea")) {
			var rng = elem.createTextRange()
			rng.move("textedit")
			rng.select()
		}
	}
}




//fix_w = 640; // °íÁ¤ÇÒ Å©±â (ÇÈ¼¿ ´ÜÀ§)

function imgResize(i,fix_w) {

        if (i.width > fix_w) {

                i.width = fix_w;

                i.onclick = function() {

                        window.open(i.src, "_blank");

                }

                i.style.cursor = "pointer";

        }

}

function isNumeric(s)
{
    var count = 0;
    for (i = 0; i < s.length; i++) {
        if(s.charAt(i)<'0' || s.charAt(i)>'9') {
            count++;
        }
    }

    if(count > 0) {
        return 0;
    } else {
        return 1;
    }
}

function Length(str) {
    return(str.length+(escape(str)+"%u").match(/%u/g).length-1);
}
function isEmpty( data ){
   for ( var i = 0 ; i <data.length ; i++ ){
    if ( data.substring( i, i+1 ) !=" " ) return false;
    } 
    return true;
 } 
//ÆÄÀÏ È®ÀåÀÚ ±¸ÇÏ±â
function getFileExtension( filePath )
{
    var lastIndex = -1;
    lastIndex = filePath.lastIndexOf('.');
    var extension = "";

if ( lastIndex != -1 )
{
    extension = filePath.substring( lastIndex+1, filePath.len );
} else {
    extension = "";
}
    return extension;
}




//////////////////////ÀÌ¹ÌÁö°ü·ÃÇÔ¼ö
function MM_swapImgRestore() {
  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() {
  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) {
  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() {
  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 preloadImages(myImages) { 
 var preImages=new Array();
 var Tn=myImages.length;
	for (i = 0; i < myImages.length; i++) { 
		preImages[i] = new Image()
		preImages[i].src = myImages[i]
	}
    var ans=checkLoad(preImages,Tn);	
	if(ans==true) return preImages;
		
}
function checkLoad(preImages,Tn) {
  
   for(var i=0;i<Tn;i++){
   if(preImages[i].complete!=1) var timerID = setTimeout("checkLoad()",10);
   }
   return true;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

///////////////////////////////////////////µµ¿ò¸»º¸±â
function view_help(help_file){
 var url,winname="help_window",feature="width=500,height=400,scrollbars=yes";
 url="/help/"+help_file;
 window.open(url,winname,feature);
}

///////////////////////////////////////ÆÁº¸ÀÌ°í¼û±â±â
var d_sp;
function hide_tip(){
 d_sp.style.display="none";
}

function dhtml_tip(sp,wdh,wx,wy){
var objdiv;
    if (ns4) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
   objdiv=sp;
   d_sp=objdiv;
   objdiv.style.width=wdh;
   objdiv.style.display='block';
   objdiv.style.pixelTop=y+wy;
   objdiv.style.pixelLeft=x+wx;
 }


///////////////ÅëÇÕ°Ë»ö/////////
function move_search(keyword,homesite){
 location.href=homesite+"/search/?keyword="+keyword+"&flag=000";
}

function total_search_list(homeSite){
	var i,txtStr,txt;

	//document.write('<font style="padding:0 5px;color:#ff6600;size:97%;font-weight:600;">[ÀÎ±â°Ë»ö¾î]</font>');

	for(i=0;i<searchTxt.length;i++){
		txtStr=searchTxt[i].replace("%"," ");
		document.write("<a href=\"javascript:move_search(\'"+escape(txtStr)+"\',\'"+homeSite+"\');\">"+txtStr+"</a>");
		//document.write("<font style=\"padding:0 2;\"><a href=\"javascript:move_search(\'"+escape(txtStr)+"\',\'"+homeSite+"\');\" class=\"a2\">"+txtStr+"</a>");
		if(i<searchTxt.length-1) document.write(", ");

	}

	document.write ('');
}

function total_search(form,homeSite,obj){
	var code=form.flag.value;
	
	//var code = "000"

	var id=document.getElementById(obj);
	if(isEmpty(form.keyword.value)){
		alert("°Ë»öÇÒ ¹®ÀÚ¿­À» ÀÔ·ÂÇÏ¼¼¿ä");
		form.keyword.focus();
		return false;
	}
	if(form.keyword.value.length<2){
		alert("°Ë»öÇÒ ¹®ÀÚ´Â ÃÖ¼Ò 2ÀÚÀÌ»ó ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		form.keyword.focus();
		return false;
	}
	if(code=='000'){
		form.action=homeSite+"/search/";
	}
	else{
		form.action=homeSite+"/search/search.html";
	}

	form.submit();
	id.innerHTML='µ¥ÀÌÅ¸¸¦ °Ë»öÇÏ°íÀÖ½À´Ï´Ù..Àá½Ã¸¸ ±â´Ù·ÁÁÖ¼¼¿ä..'; 
	return false;
}      

function NewWindow(url) { if (url) { window.open( url, 'VOD', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no,width=710,height=500,top=30,left=230'); } }

function exp_search_form(code){
	var url,feature;
	url="/common/search_form.html?code="+paramEscape(code);
	feature="toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=416,height=400,top=30,left=0"
	window.open(url,'exp_search_form',feature);
}
// -->

