//IMAGE_ROLLOVER
if (document.images) {
  r0 = "images/";
  stock0 = "../images/stock_info";
  stock1 = "../images/stock_info";
  r2 = "/img/";
}
var ns4 = (document.layers)? true:false 
var ie4 = (document.all)? true:false 
var old_menu = '';
var old_cell = '';

function On(route,obj,imageName,subImg) {
	if(!subImg) {
		if (document.images) {
		document[imageName].src = route + imageName + "_on.gif";
		}
	} else {
		if (document.images) {
		document[imageName].src = route + imageName + "_on.gif";
		document[subImg].src = route + subImg + "_on.gif";
		}
	}

	if(obj) {
	  if (ns4) document.obj.visibility = "show" 
	  else if (ie4) obj.style.visibility = "visible"
	}

}

function Off(route,obj,imageName,subImg) {
	if(!subImg) {
		if (document.images) {
		document[imageName].src = route + imageName + ".gif";
		}
	} else {
		if (document.images) {
		document[imageName].src = route + imageName + ".gif";
		document[subImg].src = route + subImg + ".gif";
		}
	}

	if(obj) {
	  if (ns4) document.obj.visibility = "hide" 
	  else if (ie4) obj.style.visibility = "hidden"
	}
}

function Drop(navNum){
	if(old_menu != navNum) {
		if(old_menu !='') {
			old_menu.style.display = 'none';
			//old_cell.src= 'img/b_05.gif';
		}
		navNum.style.display = 'block';
		//NavImg.src = 'img/b_05_on.gif';
		old_menu = navNum;
		//old_cell = NavImg;
	} else {
		navNum.style.display = 'none';
		//NavImg.src= 'img/b_05.gif';
		old_menu = '';
		//old_cell = '';
	}
}

//POPUP
function OP(href,opt) {
	neWin = window.open(href,'',opt);
	neWin.focus;
}

//POPUP OPENER LOCATION
function OPN(href) {
	opener.location=href;
	window.close();
}

function selNav(Obj){
	if(Obj) {
		newObj = Obj.options[Obj.selectedIndex].value;
		if (!newObj)alert('ÀÌµ¿ÇÒ »óÇ°/¼­ºñ½º¸¦\n¼±ÅÃÇØ ÁÖ½Ê½Ã¿À.');
		else location.href=newObj; 
	}
}

//FLASH FORWARDING ROOT DIR
function setRut(dirOne,dirTwo) {
	if(dirOne){
		document.Navigation.setVariable("dirRoot", dirOne);
		document.Navigation.setVariable("stockRoot", dirTwo);
		document.topMovie.setVariable("dirRoot", dirOne);
	}
}
//³ë½ºÅ©·Ñ
function popup(szURL, szName, iWidth, iHeight) {
	window.open(szURL, szName, 'width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=no');
}
//½ºÅ©·Ñ
function popup1(szURL, szName, iWidth, iHeight) {
	window.open(szURL, szName, 'width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=yes');
}
//È­¸é°¡¿îµ¥ ÆË¾÷
function popup2(szURL, szName, iWidth, iHeight) {
        var w;
        var h;
        w = (window.screen.width/2) - (122 + 10); 
        h = (window.screen.height/2) - (27 + 50);
        var win2 = window.open(szURL, szName, 'width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=no, left=' + w + ',top=' + h + ',screenX='+w+',screenY='+h);
        win2.focus();
}

function page( page ) {
        location.href = '?Page='+page;
}

function sPage( page ) {
	    var f = document.sForm;
        f.method="post";
        f.action ='?Page='+page;
        f.submit();
}
function back() {
        history.go(-1);
}

function exit(){
        window.close();
}

function sendFormMail(receiveJuso){
	sOption = "toolbar=0,location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,width=590,height=400";
	mail = window.open("/formmail/formmail.jsp?receiveJuso="+receiveJuso,"mail",sOption);
	mail.focus();

}

//SITEMAP TWO LINK
function freGo(linkOne,wSize,hSize,linkTwo){
	window.open(linkOne, '', 'width=' + wSize + ',height=' + hSize + ',resizable=no,scrollbars=no');
	window.location.href = linkTwo;
}

// ÇöÀç°¡ Á¶È¸ °ü·Ã ÀÚ¹Ù ½ºÅ©¸³µå 1
function OpenLinkHyunSearchKoscom()
{
        var ecn_chk = 0;
        var url;

        code = document.codeform.code.value;

        url = 'http://stock.njboda.com/code_select/link_hyun_search_koscom.php?code=' + code + '&is_ecn=' + ecn_chk;

        window.open(url, 'codeWin','toolbar=no,status=no,width=200 , height=104 ,top=50, left=290,directories=no,scrollbars=no ,location=no,resizable=no,menubar=no');
}

// ÇöÀç°¡ Á¶È¸ °ü·Ã ÀÚ¹Ù ½ºÅ©¸³µå 2
function OpenLinkHyunSearchECNKoscom()
{
        var url;

        code = document.codeform.code.value;

        url = 'http://stock.njboda.com/code_select/link_hyun_search_koscom.php?code=' + code + '&is_ecn=1';

        window.open(url, 'codeWin','toolbar=no,status=no,width=200 , height=104 ,top=50, left=290,directories=no,scrollbars=no ,location=no,resizable=no,menubar=no');
}



