// Rollover Action Menu
function Mimg_act(imgName,step,num) { 
	document [imgName].src = "../images/left/left_"+ step +num +"_on.gif";
} 

// MouseOut Image Default Change Menu
function Mimg_inact(imgName,step,num) { 
   document [imgName].src = "../images/left/left_"+ step + num +".gif";
}




/*############ ÇÃ·¡½Ã È£Ãâ ÇÔ¼ö ############*/
function flash_url(id,url,w,h,bg,t){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='allowScriptAccess' value='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http:/.macromedia.com/go/getflashplayer' />\
</object>\
");
}

/****** ¿øÇÏ´Â Å©±â·Î ÆË¾÷ ¶ì¿ì±â ****************************/

var win=null;

function open_link(mypage,myname,w,h,scroll,pos){

if(pos=="default"){

		LeftPosition=20;TopPosition=20;

	}	

if(pos=="random"){

		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;

	}

	if(pos=="center"){

		LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;

	} else if((pos!="center" && pos!="random" && pos!="default") || pos==null){

		LeftPosition=0;TopPosition=20} settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

		win=window.open(mypage,myname,settings);

		if(win.focus){win.focus();

	}

}


// ÀÌ¹ÌÁö ·Ñ¿À¹öÈ¿°ú - ´Üµ¶À¸·Î »ç¿ë
// Rollover Action Menu
function Rollover_act(imgName,imgURL,imgNum) { 
  document [imgName].src = step +num +"_on.gif";
} 

// MouseOut Image Default Change Menu
function Rollover_inact(imgName,imgURL,imgNum) { 
  document [imgName].src = step + num +".gif";
}



// ÀÚ½ÅÀÇ ³»¿ë¿¡ ¸Â°Ô ºÎ¸ðÀÇ iframe »çÀÌÁî Å©±â Á¶Àý
function ResizeParentFrame(name)	
{
        if (parent.document.all(name)) {
            var frmSelf  = parent.document.all(name);
            var frmBody  = document.body;
            var frmBodyHeight = frmBody.scrollHeight;
            if (frmBodyHeight <= 0)
            {
                location.reload();
            }else{ 
               if(name=='ifrmComment') //´ñ±Û
               {
                 frmSelf.style.height = frmBodyHeight+40;
               }else{
                frmSelf.style.height = frmBodyHeight+10;
               }
               
            }
            
        }
        parent.document.all(name).style.display='inline';
        setTimeout(function(){ResizeParentFrame(name)}, 200);  // check 5 times for IE bug
}





//´ë¸®Á¡¾È³» Áöµµ
function map_link(no){
    document.getElementById('iframe_process').src = '/kr/customer/map'+no+'.asp';
}

function flash_map(no){
    if(no)swf = '/kr/images/swf/agent_map.swf?mapNum='+no;
	else swf = '/kr/images/swf/agent_map.swf';

    var str = ''; 
    str = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='770' height='365' id='map'>";
    str += "<param name='movie' value='"+swf+"' />";
    str += "<param name='wmode' value='transparent' />";
    str += "<param name='bgcolor' value='#ffffff' />";
    str += "<param name='allowScriptAccess' value='sameDomain' />";
    str += "<param name='quality' value='high' />";
    str += "<param name='menu' value='false' />";
    str += "<embed src='/kr/images/swf/agent_map.swf' width='770' height='365' name='map' bgcolor='#ffffff' allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
    str += "</object>";
   
    return str;    
    
}

function flash_render(id,no){
    document.getElementById(id).innerHTML = flash_map(no);
}






/****** °¶·¯¸® ¹× ÀÌ¹ÌÁö Å©°Ôº¸±â ÆË¾÷³»¿ë ****************************/

function imgResize(img,imgTitle){ 

  image_popup= new Image(); 

  image_popup.src=(img); 

  imgControll(img,imgTitle); 

}



function imgControll(img,imgTitle){ 

  if((image_popup.width!=0)&&(image_popup.height!=0)){ 

    viewImage(img,imgTitle); 

  }

  else{ 

    controller="imgControll('"+img+"')"; 

    intervalID=setTimeout(controller,20); 

  }

}


function viewImage(img,imgTitle)

{

	W=image_popup.width+617;

	H=image_popup.height+400;

	

	if(W > 617)

	{ 

    W = 617; 

  }

  	

  if(H > 650)

	{ 

    H = 650; 

  }
T="this.href,name, scrollbars=yes, resizable=yes, width="+W+",height="+H;
imgWin=window.open("","",T);

imgWin.document.write("<html><head><title>ÀÌ¹ÌÁö ÀÚ¼¼È÷º¸±â</title>");

imgWin.document.write("</head>");

imgWin.document.write("<body  leftmargin='0' rightmargin='0' topmargin='0'  bottommargin='0' marginheight='' marginwidth=''>");

imgWin.document.write("<table width=600 height='100%' border=0 cellspacing=0 cellpadding=0>");

imgWin.document.write("<tr>");

imgWin.document.write("<td height='54'><img src='../images/product/pop_title.gif'></td>");

imgWin.document.write("</tr>");

imgWin.document.write("<tr>");

imgWin.document.write("   <td align='center' style='padding:30 10 30 10;'>");

imgWin.document.write("     <table border=0 cellspacing=1 cellpadding=0>");

imgWin.document.write("       <tr><td><img src="+img+" onClick='javascript:window.close();' alt='ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ¸é Ã¢À» ´ÝÀ» ¼ö ÀÖ½À´Ï´Ù.'></td></tr>");

imgWin.document.write("     </table>");

imgWin.document.write("   </td>");

imgWin.document.write(" </tr>");

imgWin.document.write("	<tr>");

imgWin.document.write("		<td style='padding:15 0 15 10; font-family:dotum; color:#666666; Font-size:12px; letter-spacing:0px;'>&#8226; <b>"+imgTitle+"</b></td>");

imgWin.document.write("	</tr>");

imgWin.document.write("<tr>");

imgWin.document.write("	<td height='20' align='right' bgcolor='#5AB128'><a href='javascript:top.close();'><img src='../images/product/pop_close.gif' border='0'></a></td>");

imgWin.document.write("</tr>");

imgWin.document.write("</table>");

imgWin.document.write("</body>");

imgWin.document.write("</html>");

imgWin.document.close(); 

}