
/*
	Å×µÎ¸® ¾ø´Â ÆË¾÷Ã¢ ½ºÅ©¸³Æ® ¼Ò½º  - chromeless
	
	ÇÔ¼ö ¿øÇü   function openIT(u,W,H,X,Y,n,b,x,m,r)
	
	u  :  ÆË¾÷Ã¢ °æ·Î
	W  :  ÆË¾÷Ã¢ WIDTH °ª
	H  :  ÆË¾÷Ã¢ HEIGHT °ª
	X  :  ÆË¾÷Ã¢ X ÁËÇ¥
	Y  :  ÆË¾÷Ã¢ Y ÁËÇ¥
	n  :  ÆË¾÷Ã¢ NAME
	b  :  ÆË¾÷Ã¢ BORDER °ª 
	x  :  ÆË¾÷Ã¢ MAX °ª 
	m :  ÆË¾÷Ã¢ MIN °ª 
	r  : 
	
	
	//////////////////////////////////////////////////////////////////////////////////
	´ÙÀ½°ú °°Àº Çü½ÄÀ¸·Î ÆË¾÷Ã¢ ¿¬´Ù.
	<a href="#" onclick="javascript:openIT('test.html',400,400,null,null,'');">WIN CONTENTSIZE(400x400) CENTER</a>
	
	ÆË¾÷Ã¢ OPEN½Ã  /_common/script/mirae.js È­ÀÏÀ» ²À include ½ÃÅµ´Ïµð.
	
*/

function openIT(u,W,H,X,Y,n,b,x,m,r) {
	var cU  ='/pop/images/iconClose_off.gif'    			 // ´Ý±â ¹öÆ° 
	var cO  ='/pop/images/iconClose_on.gif'  			// ´Ý±â ¹öÆ°  

	var cL  ='/pop/images/trans.gif'         		  // ·Îµù½Ã°£ ¾ÆÀÌÄÜ
	var mU  ='/pop/images/trans.gif'      			// ÃÖ¼ÒÈ­ ¹öÆ°
	var mO  ='/pop/images/trans.gif'			   // ÃÖ¼ÒÈ­ ¹öÆ°
	var xU  ='/pop/images/trans.gif'				// ÃÖ´ëÈ­ ¹öÆ°
	var xO  ='/pop/images/trans.gif'             // ÃÖ´ëÈ­ ¹öÆ°
	var rU  ='/pop/images/trans.gif'
	var rO  ='/pop/images/trans.gif'
	var tH  =''
	var tW  =''
	var wB  ='#FFFFFF'                     //  frame ³» ¶óÀÎ color 
	var wBs ='#FFFFFF'                     
	var wBG ='#C8C8C8'   					// ¿Ü°û Å×µÎ¸® »ö±ò
	var wBGs='#C8C8C8'						// ¿Ü°û Å×µÎ¸® ¸¶¿ì½º click½Ã  »ö±ò
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0'
	var fSO ='scrolling=no noresize'
	var brd =b||0;
	var max =x||false;
	var min =m||false;
	var res =r||false;
	var tsz =21;                                   // »ó´Ü Å¸ÀÌÆ² ºÎºÐ Height value
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}

function scroll_openIT(u,W,H,X,Y,n,b,x,m,r) {
	var cU  ='/pop/images/iconClose_off.gif'    			 // ´Ý±â ¹öÆ° 
	var cO  ='/pop/images/iconClose_on.gif'  			// ´Ý±â ¹öÆ°  

	var cL  ='/pop/images/trans.gif'         		  // ·Îµù½Ã°£ ¾ÆÀÌÄÜ
	var mU  ='/pop/images/trans.gif'      			// ÃÖ¼ÒÈ­ ¹öÆ°
	var mO  ='/pop/images/trans.gif'			   // ÃÖ¼ÒÈ­ ¹öÆ°
	var xU  ='/pop/images/trans.gif'				// ÃÖ´ëÈ­ ¹öÆ°
	var xO  ='/pop/images/trans.gif'             // ÃÖ´ëÈ­ ¹öÆ°
	var rU  ='/pop/images/trans.gif'
	var rO  ='/pop/images/trans.gif'
	var tH  =''
	var tW  =''
	var wB  ='#FFFFFF'                     //  frame ³» ¶óÀÎ color 
	var wBs ='#FFFFFF'                     
	var wBG ='#C8C8C8'   					// ¿Ü°û Å×µÎ¸® »ö±ò
	var wBGs='#C8C8C8'						// ¿Ü°û Å×µÎ¸® ¸¶¿ì½º click½Ã  »ö±ò
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0'
	var fSO ='scrolling=yes noresize'
	var brd =b||0;
	var max =x||false;
	var min =m||false;
	var res =r||false;
	var tsz =21;                                   // »ó´Ü Å¸ÀÌÆ² ºÎºÐ Height value
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}


function chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz){
	var c=(document.all&&navigator.userAgent.indexOf("Win")!=-1)?1:0
	var v=navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ")+5,navigator.appVersion.indexOf("MSIE ")+8)
	min=(v>=5.5?min:false);
	var w=window.screen.width; var h=window.screen.height
	var W=W||w; W=(typeof(W)=='string'?Math.ceil(parseInt(W)*w/100):W); W+=(brd*2+2)*c
	var H=H||h; H=(typeof(H)=='string'?Math.ceil(parseInt(H)*h/100):H); H+=(tsz+brd+2)*c
	var X=X||Math.ceil((w-W)/2)
	var Y=Y||Math.ceil((h-H)/2)
	var s=",width="+W+",height="+H

	if(c){
		var cTIT='\n'+
		'<html><head><META HTTP-EQUIV="imagetoolbar" CONTENT="no">\n'+
		'<script>\n'+
		'var IcU=new Image();IcU.src="'+cU+'";var IcO=new Image();IcO.src="'+cO+'";var IcL=new Image();IcL.src="'+cL+'";var IxU=new Image();IxU.src="'+xU+'";var IxO=new Image();IxO.src="'+xO+'";var IrU=new Image();IrU.src="'+rU+'";var IrO=new Image();IrO.src="'+rO+'";var ImU=new Image();ImU.src="'+mU+'";var ImO=new Image();ImO.src="'+mO+'"\n'+
		'document.onmousemove=document.onselectstart=document.ondragstart=document.oncontextmenu=new Function("wMOV();return false");\n'+
		'b=-1\n'+
		'wLOA=function(){if(top.ok&&document.body){'+(min?'bMIN.style.visibility="visible";':'')+'bLOA.style.visibility="hidden";wRSZ()}else setTimeout("wLOA()",500)};wLOA()\n'+
		'wRSZ=function(){var dw=document.body.clientWidth;bCLO.style.pixelLeft=dw-22;bMIN.style.pixelLeft=bLOA.style.pixelLeft=dw-62;bFUL.style.pixelLeft=bRES.style.pixelLeft=dw-42}\n'+
		'wMAX=function(m){top.mod=m;if(m){top.mT(0,0);top.rT('+w+','+h+');bFUL.style.visibility="hidden";bRES.style.visibility="visible"}else{top.mT(top.px,top.py);top.rT(top.sW,top.sH);bFUL.style.visibility="visible";bRES.style.visibility="hidden"}}\n'+
		'wDBL=function(){if(!top.mod)wMAX(1);else wMAX(0)}\n'+
		'wMIN=function(){top.window.moveTo(0,-4000);if(top.opener&&!top.opener.closed){top.opener.window.focus()};top.window.blur()}\n'+
		'wMOV=function(){\n'+
		'if(b==0){top.bCOL("'+wBG+'","'+wB+'");b=-1}\n'+
		'if(b==2&&!top.mod){top.px=event.screenX-ofx-1;top.py=event.screenY-ofy-1;top.mT(top.px,top.py)}\n'+
		'if(b==1){top.bCOL("'+wBGs+'","'+wBs+'");ofx=event.x;ofy=event.y;b=2}\n'+
		'}</script></head>\n'+

		'<body onresize="wRSZ()" bgcolor='+wBG+' background="/pop/images/top_bg.gif">\n'+
		
		'<div style="position:absolute;left:5px;top:0px;width:2000px;height:21px;">\n'+          //   »ó´ÜÀÇ Å¸ÀÌÆ² ºÎºÐ
		'<img id=bMOV style="position:absolute;left:-50px;top:-50px" '+(max?'ondblclick="wDBL()"':'')+' onmousemove="wMOV()" onmousedown="b=1;wMOV()" onmouseup="b=0;wMOV()" border=0 src="" width=150% height=500>\n'+
		'<img id=bFUL style="position:absolute;top:4px;left:'+(W-42)+'px;'+(max?'':'display:none')+'" src="'+xU+'" border=0 onmouseover="this.src=IxO.src" onmouseout="this.src=IxU.src" onmouseup="this.src=IxU.src" onmousedown="this.src=IxU.src" onclick="wMAX(1)">\n'+
		'<img id=bRES style="position:absolute;top:4px;left:'+(W-42)+'px;visibility:hidden" src="'+rU+'" border=0 onmouseover="this.src=IrO.src" onmouseout="this.src=IrU.src" onmouseup="this.src=IrU.src" onmousedown="this.src=IrU.src" onclick="wMAX(0)">\n'+
		'<img id=bLOA style="position:absolute;top:4px;left:'+(W-62)+'px;" src="'+cL+'" border=0>\n'+
		'<img id=bMIN style="position:absolute;top:4px;left:'+(W-62)+'px;visibility:hidden" src="'+mU+'" border=0  onmouseover="this.src=ImO.src" onmouseout="this.src=ImU.src" onmouseup="this.src=ImU.src" onmousedown="this.src=ImU.src" onclick="wMIN()">\n'+
		'<p align="right"><img id=bCLO style="position:absolute;top:0px;left:'+(W-22)+'px;" src="'+cU+'" border=0 onclick="top.window.close()" alt="Close" align="top" onmouseover="this.src=IcO.src" onmouseout="this.src=IcU.src"></p>\n'+
		'</div></body></html>'
		
		cTIT=cTIT.replace(/\//g,"\\\/").replace(/\"/g,"\\\"").replace(/\n/g,"\\n")

		cRES=function(b,s){
			var tmp='\n'+
			'<html><head><META HTTP-EQUIV="imagetoolbar" CONTENT="no">\n'+
			'<script>\n'+
			'document.onmousemove=document.onselectstart=document.ondragstart=document.oncontextmenu=new Function("wMOV();return false");\n'+
			'b=-1\n'+
			'wMOV=function(){if(!top.mod){\n'+
			'if(b==0){top.sH=top.fH;top.sW=top.fW;b=-1}\n'+
			'if(b==2&&(1=='+b+'||4=='+b+'||5=='+b+')){tmp=event.screenY-oH;if(top.sH+tmp>100){top.fH=top.sH+tmp}}\n'+
			'if(b==2&&(2=='+b+'||4=='+b+')){tmp=event.screenX-oW;if(top.sW-tmp>100){top.fW=top.sW-tmp;top.px=event.screenX-ofx-1}}\n'+
			'if(b==2&&(3=='+b+'||5=='+b+')){tmp=event.screenX-oW;top.fW=top.sW+tmp}\n'+
			'if(b==2){setTimeout("top.rT(top.fW,top.fH);top.mT(top.px,top.py);",10)}\n'+
			'if(b==1){ofx=event.x;oH=event.screenY;oW=event.screenX;b=2}\n'+
			'}}</script></head>\n'+
			'<body bgcolor='+wBG+'>\n'+
			'<img style="cursor:'+s+'-resize" id=bMOV style="position:absolute;left:-50px;top:-50px" onmousemove="wMOV()" onmousedown="b=1;wMOV()" onmouseup="b=0;wMOV()" border=0 src="" width=3000 height=2000>\n'+
			'</body>\n'+
			'</html>'
			return tmp.replace(/\//g,"\\\/").replace(/\"/g,"\\\"").replace(/\n/g,"\\n")
		}

		var cRESd=cRES(1,'s'),cRESl=cRES(2,'w'),cRESr=cRES(3,'e'),cRESbl=cRES(4,'sw'),cRESbr=cRES(5,'se')

		var cFRM='<HTML><HEAD><TITLE>'+tW+'</TITLE>\n'+
		'<script>\n'+
		'ok=0;mod=0;sH=fH='+(H)+';sW=fW='+(W)+';px='+(X)+';py='+(Y)+'\n'+
		'bCOL=function(c1,c2){fT.document.bgColor=n0.document.bgColor=n1.document.bgColor=n2.document.bgColor=n3.document.bgColor=n4.document.bgColor=c1;bL.document.bgColor=bT.document.bgColor=bR.document.bgColor=bB.document.bgColor=c2}\n'+
		'mTIT=function(){if(frames.length>8){fT.document.write("'+cTIT+'");fT.document.close();if ('+res+'){n2.document.write("'+cRESd+'");n2.document.close();n1.document.write("'+cRESr+'");n1.document.close();n0.document.write("'+cRESl+'");n0.document.close();n3.document.write("'+cRESbl+'");n3.document.close();n4.document.write("'+cRESbr+'");n4.document.close()};top.bCOL("'+wBG+'","'+wB+'")}else{setTimeout("mTIT()",20)}}\n'+
		'mT=function(x,y){top.window.moveTo(x,y)}\n'+
		'rT=function(w,h){top.window.resizeTo(w,h)}\n'+
		'top.rT(fW,fH);top.mT(px,py)\n'+
		'mTIT()\n'+
		'</script></HEAD>\n'+
		'<frameset onselectstart="return false" onload="top.ok=1" onfocus="if (top.ok&&fT&&fT.wMAX) fT.wMAX(top.mod)" border=0 framespacing=0 frameborder=0 rows="'+tsz+',100%,2">\n'+          // Frame »çÀÌÁî Á¶Àý
		'	<frame name=fT src="about:blank" scrolling=no noresize>\n'+
		'	<frameset border=0 framespacing=0 frameborder=0 cols="2,1,100%,1,2">\n'+
		'		<frame name=n0 src="about:blank" scrolling=no noresize>\n'+
		'		<frame name=bL src="about:blank" scrolling=no noresize>\n'+
		'			<frameset border=0 framespacing=0 frameborder=0 rows="1,100%,1">\n'+
		'				<frame name=bT src="about:blank" scrolling=no noresize>\n'+
		'				<frame name=main src="'+u+'" '+fSO+'>\n'+
		'				<frame name=bB src="about:blank" scrolling=no noresize>\n'+
		'			</frameset>\n'+
		'		<frame name=bR src="about:blank" scrolling=no noresize>\n'+
		'		<frame name=n1 src="about:blank" scrolling=no noresize>\n'+
		'	</frameset>\n'+
		'	<frameset border=0 framespacing=0 frameborder=0 cols="2,100%,2">\n'+
		'		<frame name=n3 src="about:blank" scrolling=no noresize>\n'+
		'		<frame name=n2 src="about:blank" scrolling=no noresize>\n'+
		'		<frame name=n4 src="about:blank" scrolling=no noresize>\n'+
		'	</frameset>\n'+
		'</frameset>\n'+
		'</HTML>'

		var CWIN=window.open("",n,"fullscreen=1"+s)
		CWIN.moveTo(5000,0)
		CWIN.ft=true
		CWIN.document.write(cFRM)
		CWIN.document.close()
	} else {
		var CWIN=window.open(u,n,wNS+s,true)
		CWIN.moveTo(X,Y)
	}
	CWIN.focus()
	CWIN.setURL=function(u) { if (this && !this.closed) { if (this.frames.main) this.frames.main.location.href=u; else this.location.href=u } }
	CWIN.closeIT=function() { if (this && !this.closed) this.close() }
	return CWIN
}                                                                               
                                                                               


/**********************************************************************************
**********************************************************************************/


ns4 = (document.layers)?true:false
ie4 = (document.all)?true:false

/**********************************************************************************
	Layer Show Hide
***********************************************************************************/

function LayerSH(LayerName,Status) {
ns4 = (document.layers)?true:false
ie4 = (document.all)?true:false

	if (ns4) {
		LayerN = document.layers[LayerName]
		if (Status == 'show') LayerN.visibility = 'show';
		if (Status == 'hide') LayerN.visibility = 'hidden';
	}	
	if (ie4) {
		LayerN = document.all[LayerName].style
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
	}
}


/**********************************************************************************
	pop window
***********************************************************************************/
function pop(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	var x = 0;
	var y = 0;
	
	window.open(url,"","left=" + x +",top=" + y + ",toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
}

function scroll_pop(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	var x = 0;
	var y = 0;
	
	window.open(url,"","left=" + x +",top=" + y + ",toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}

/**********************************************************************************
	Image Roll Over
***********************************************************************************/

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function imgChg(imgName,imgObj) {
	if (document.images) {
		document.images[imgName].src = eval(imgObj+".src")
	}
}

/**********************************************************************************
	platter color Change function
***********************************************************************************/
var TrackRed= 0xFF;   
var TrackGreen= 0xFF; 
var TrackBlue= 0xFF;  
		
function FadeTo(steps,red,green,blue) 
{
	for (var i = 0; i <= steps; i++) 
	{
		var endpart = i/steps;
		var startpart = 1 - endpart;
		document.bgColor = 
		Math.floor(TrackRed * startpart + red * endpart)*256*256 +
		Math.floor(TrackGreen * startpart + green * endpart)*256 +
		Math.floor(TrackBlue * startpart + blue * endpart);
	}
	TrackRed=red; TrackGreen=green; TrackBlue=blue;
	SetCookie('favBgColor',document.bgColor);
}

/**********************************************************************************
	Set Cookie Function	
***********************************************************************************/
function SetCookie (name, value){
	document.cookie=name + "=" + value + "; path = /" 
	}

/**********************************************************************************
	Get Cookie Function	
***********************************************************************************/
function GetCookie(name){
	var str=document.cookie;
	if(str.indexOf(name)>-1){
	 start=str.indexOf(name)+name.length+1;
	 end=str.indexOf(";",start);
	 if(end<0) end=str.length;
	 var result=str.substring(start,end);
	 return result;
	 }
	else
	 return null;
	}
/**********************************************************************************
	Menu display Function	
***********************************************************************************/
var z=0
function mu(i){

 if (i==z){
	 	return;
}
else
{
		if(document.all["mu"+i].style.display==""){
			document.all["mu"+i].style.display="none"
		    z=1}

	    else{
	        if(z != 0){document.all["mu"+z].style.display="none"
            			document.all["mu"+i].style.display=""}
     	    document.all["mu"+i].style.display=""
	        z=i
	   }
	} 
}


/**********************************************************************************
	Header Flash Link 
******n*****************************************************************************/

// È¨(intro) ¸µÅ©
function h_link00()
{
	window.location.href = "/";
}

// È¨(intro)  Shot¸µÅ©
function h_mainShot()
{
	window.location.href = "/defaultShot.asp";
}

// È¸»ç¼Ò°³ ¸µÅ©
function h_link01()
{
	window.location.href = "/company/default.asp";
}

// »ç¾÷¿µ¿ª ¸µÅ©
function h_link02()
{
	window.location.href = "/businessField/default.asp"; 
}

// ¿Â¶óÀÎ¼­ºñ½º ¸µÅ©
function h_link03()
{
	window.location.href = "/online/default.asp";
}

// °í°´ÀÇ ¼Ò¸® ¸µÅ©
function h_link04()
{
	window.location.href = "/customer/default.asp";
}

// Ã¤¿ë ¸µÅ©
function h_link05()
{
	window.location.href = "/recruit/default.asp";
}

// ´º½º ¸µÅ©
function h_link06()
{
	window.location.href = "/news/default.asp"; 
}

// Ä¿¹Â´ÏÆ¼ ¸µÅ©
function h_link07()
{
	window.location.href = "/community/default.asp";  
}

// È¸¿øÁ¤º¸°ü¸® - personMng()
function l_personMng()
{
	window.location.href = "/personMng/default.asp";
}

// ·Î±×ÀÎ - l_login()
function l_login()
{
	window.location.href = "/login/default.asp";
}

// ·Î±×¾Æ¿ô - l_logout()
function l_logout()
{
	window.location.href = "/login/login_out.asp";
}

// È¸¿ø°¡ÀÔ - l_register()
function l_register()
{
	window.location.href = "/personMng/join.asp";
}


// English - r_english()
function r_english()
{
	var w=window.screen.width; 
	var h=window.screen.height;
	
	window.open("http://www.miraecredit.com/","","left=0,top=0,location=1,directories=1,status=1,toolbar=1,menubar=1,scrollbars=yes,resizable=yes,width=" + w +",height=" + h + "")
}

// sitemap - r_sitemap()
function r_sitemap()
{
	window.location.href = "/sitemap/default.asp"; 
}

// contact us - r_contact()
function r_contact()
{
	window.location.href = "/contactus/default.asp"; 
}

// link - r_link()
function r_link()
{
	window.location.href = "/link/default.asp"; 
}


function bondMng()
{
	window.location.href = "/businessField/bondManage/infoGuide.asp";
}

function creditResearch()
{
	window.location.href = "/businessField/creditCheck/infoGuide.asp";
}

function creditFair()
{
	window.location.href = "/businessField/creditFair/infoGuide.asp";
}


// ±×¸² ÀÌ¹ÌÁö ºñ·Ê Á¶Á¤ 
function func_adjustimage(target_img,maxWidth,maxHeight) //(ÀÌ¹ÌÁö,ÃÖ´ë³ÐÀÌ,ÃÖ´ë³ôÀÌ)
{ 
if (target_img != null){

	var newImg = new Image(); 
	var newX; 
	var newY; 
	var newHeight; 
	var newWidth; 
	newImg.src = target_img.src; 
	imgw = newImg.width; 
	imgh = newImg.height; 

	do  //ÀÌ¹ÌÁöÀÇ ³ÐÀÌ¿Í ³ôÀÌ°¡ MAXº¸´Ù ÀÛÀ»¶§±îÁö ¹Ýº¹ MAXº¸´Ù Å©¸é 30¾¿ °¨¼Ò ½ÃÅ°¸ç LOOP
	{
		if (imgw > maxWidth || imgh > maxHeight) 
		{ 
			if (imgw > imgh) 
			{ 
				if (imgw > maxWidth) 
					newWidth = maxWidth; 
				else 
					newWidth = imgw; 
					newHeight = Math.round((imgh * newWidth) / imgw); 
			} 
			else 
			{ 
				if (imgh > maxHeight) 
					newHeight = maxHeight; 
				else 
					newHeight = imgh; 
					newWidth = Math.round((imgw * newHeight) / imgh); 
			} 
		} 
		else 
		{ 
			newWidth = imgw; 
			newHeight = imgh; 
		} 

		if(newWidth > maxWidth || newHeight > maxHeight){

			if (newWidth > maxWidth)
			{
				imgw = imgw - 30
			}

			if (newHeight > maxHeight)
			{
				imgh = imgh - 30
			}
		}
	}

	while (newWidth > maxWidth || newHeight > maxHeight);
		target_img.onload = null; 
		target_img.src = newImg.src; 
		target_img.width = newWidth; 
		target_img.height = newHeight; 
		newImg.close;
}
		document.body.style.display = ""
} 