/**************************/
/* 	FuzeWire co. ltd. 	  */
/* 	feelguy@fuzewire.com  */
/**************************/


/* [·Ñ¿À¹ö] ½ÃÀÛ ###########################################################################*/
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_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_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/* [·Ñ¿À¹ö] ³¡ ###################################################################################*/


/* [Á¡¼± ¾ø¾Ö±â] ½ÃÀÛ ############################################################################*/
//function allblur()
//	{

//		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
//	}

//	document.onfocusin = allblur;
/* [Á¡¼± ¾ø¾Ö±â] ³¡ ##############################################################################*/


/* [ÆË¾÷] ½ÃÀÛ ###################################################################################*/
function ow(Href,winName,features) {
 new_win = window.open (Href,winName,features);
 new_win.focus();
}
/* [ÆË¾÷] ³¡ #####################################################################################*/


/* [·Î±×ÀÎ ÀÌ¹ÌÁö] ½ÃÀÛ ##########################################################################*/

var c=false;
// Æ÷Ä¿½º°¡ ÀÎÇ² ¹Ú½º¾È¿¡ ÀÖÀ»¶§ ¹è°æÀÌ¹ÌÁö Áö¿ì±â
function search_bx (valueid) {
	if(valueid ==  'search_box') search_frm.search_box.style.backgroundImage="";
	c=true;
}

function search_bx_ok (valueid){ 
	if(valueid ==  'search_box') {
		if(!search_frm.search_box.value)search_frm.search_box.style.backgroundImage="url(../images/search_img.gif)";
	} 

	c=true;
}

function search_bx01 (valueid) {
	if(valueid ==  'search_box01') search_frm01.search_box01.style.backgroundImage="";
	c=true;
}

function search_bx_ok01 (valueid){ 
	if(valueid ==  'search_box01') {
		if(!search_frm01.search_box01.value)search_frm01.search_box01.style.backgroundImage="url(../images/babyinfo/search_img.gif)";
	} 

	c=true;
}

/* [·Î±×ÀÎ ÀÌ¹ÌÁö] ³¡ ############################################################################*/


/* [TopNavi] ½ÃÀÛ #################################################################################*/
/* swf°æ·Î,****/ 
function QUICK_inc(swfpath) {
/*****050421 START OF QUICK*****/                                                                                                                                                                                                                          																			
	document.write("<DIV ID='floater' STYLE='position:absolute; left:expression((document.body.clientWidth-877)/2+877);top:278px; width:93px; height:460px; z-index:1; visibility: visible;'>");
	document.write("<TABLE border='0' cellpadding='0' cellspacing='0' width='93' height='460'>");
	document.write("<TR><TD><OBJECT CLASSID='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' CODEBASE='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' WIDTH='93' HEIGHT='460' ID='quick_01' ALIGN='top'>");
	document.write("			<PARAM NAME='movie' VALUE='"+swfpath+"/quick.swf' />");
	document.write("			<PARAM NAME='quality' VALUE='high' />");
	document.write("			<PARAM NAME='wmode' VALUE='transparent'>");
	document.write("			<EMBED SRC='"+swfpath+"/quick.swf' quality='high' WIDTH='93' HEIGHT='460' NAME='quick_01' ALIGN='top' allowScriptAccess='sameDomain' TYPE='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />");
	document.write("		</OBJECT>");
	document.write("	</TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	
	document.write("</DIV>");

	if(NS || IE) action = window.setInterval("heartBeat()",1);
/*****050421 END OF QUICK*****/
}
/* [TopNavi] ³¡  ##################################################################################*/


function Footer_inc(imgpath, swfpath) {
	document.write("	<TABLE WIDTH='100%' HEIGHT='100%' CELLPADDING='0' CELLSPACING='0' BORDER='0'>");
	document.write("	<COL WIDTH='50%' VALIGN='top' ALIGN='right'>");
	document.write("	<COL WIDTH='914' VALIGN='top' ALIGN='center'>");
	document.write("	<COL WIDTH='50%' VALIGN='top' ALIGN='left'>");
	document.write("	<TR>");

	/****START OF footerleft bg img****/
	document.write("		<TD BACKGROUND='"+imgpath+"/footer_left_bg.gif' CLASS='bg_x'>");
	document.write("		<TABLE WIDTH='100%' HEIGHT='135' CELLPADDING='0' CELLSPACING='0' BORDER='0'>");
	document.write("		<TR><TD BACKGROUND='"+imgpath+"/footer_left_bg.jpg' STYLE='background-repeat:no-repeat;background-position:top right;'></TD></TR>");
	document.write("		</TABLE>");
	document.write("		</TD>");
	/****END OF footerleft bg img****/

	/****START OF footerleft flash****/	
	document.write("		<TD><OBJECT CLASSID='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' CODEBASE='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' WIDTH='914' HEIGHT='135' ID='footer' ALIGN='top'>");
	document.write("				<PARAM NAME='movie' VALUE='"+swfpath+"/footer.swf' />");
	document.write("				<PARAM NAME='quality' VALUE='high' />");
	document.write("				<PARAM NAME='wmode' VALUE='transparent'>");
	document.write("				<EMBED SRC='"+swfpath+"/footer.swf' quality='high' WIDTH='914' HEIGHT='135' NAME='footer' ALIGN='top' allowScriptAccess='sameDomain' TYPE='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />");
	document.write("			</OBJECT>");
	document.write("		</TD>");
	/****END OF footerleft flash****/	
	
	/****START OF footerright bg img****/
	document.write("		<TD BACKGROUND='"+imgpath+"/footer_right_bg.gif' CLASS='bg_x'>");
	document.write("		<TABLE WIDTH='100%' HEIGHT='135' CELLPADDING='0' CELLSPACING='0' BORDER='0'>");
	document.write("		<TR><TD BACKGROUND='"+imgpath+"/footer_right_bg.jpg' STYLE='background-repeat:no-repeat;background-position:top left;'></TD></TR>");
	document.write("		</TABLE>");
	document.write("		</TD>");
	/****END OF footerright bg img****/

	document.write("	</TR>");
	document.write("	<TR HEIGHT='100%' VALIGN='top' BGCOLOR='#B2D169'>");
	document.write("		<TD></TD>");
	document.write("		<TD STYLE='padding:17 0;'>");

	/****START OF company info****/
	document.write("		<TABLE WIDTH='100%' CELLPADDING='0' CELLSPACING='0' BORDER='0'>");
	document.write("		<COL WIDTH='225'>");
	document.write("		<COL WIDTH='399'>");
	document.write("		<COL WIDTH='190'>");
	document.write("		<TR><TD ROWSPAN='2'><IMG SRC='"+imgpath+"/footer_bi.gif' STYLE='margin:0 9 0 133;'></TD>");
	document.write("			<TD ALIGN='left' VALIGN='top'>");
	document.write("			<TABLE CELLPADDING='0' CELLSPACING='0' BORDER='0' BGCOLOR='#7C9A3A'>");
	document.write("			<TR><TD><IMG SRC='"+imgpath+"/footer_box_left.gif'></TD>");
	document.write("				<TD><a href='http://www.benesse.co.kr' target='_blank'><IMG SRC='"+imgpath+"/footer_link_01.gif' STYLE='margin-bottom:-3px;'></A>");
	document.write("					<IMG SRC='"+imgpath+"/footer_link_section.gif' STYLE='margin-bottom:-3px;'>");
	document.write("					<A HREF='javascript:f_footer_menu(\"02\");'><IMG SRC='"+imgpath+"/footer_link_02.gif' STYLE='margin-bottom:-3px;'></A>");
	document.write("					<IMG SRC='"+imgpath+"/footer_link_section.gif' STYLE='margin-bottom:-3px;'>");
	document.write("					<A HREF='javascript:f_footer_menu(\"03\");'><IMG SRC='"+imgpath+"/footer_link_03.gif' STYLE='margin-bottom:-3px;'></A>");
	document.write("					<IMG SRC='"+imgpath+"/footer_link_section.gif' STYLE='margin-bottom:-3px;'>");
	document.write("					<A HREF='javascript:f_footer_menu(\"04\");'><IMG SRC='"+imgpath+"/footer_link_04.gif' STYLE='margin-bottom:-3px;'></A>");
	document.write("				</TD>");
	document.write("				<TD><IMG SRC='"+imgpath+"/footer_box_right.gif'></TD>");
	document.write("			</TR>");
	document.write("			</TABLE>");
	document.write("			</TD>");

	adURL="https://seal.verisign.com/getseal?host_name=www.i-challenge.co.kr&size=S&use_flash=YES&use_transparent=YES&lang=ko"; 

	document.write("			<TD ROWSPAN='2'><IFRAME NAME='SEAL' SRC='/common/seal.asp' WIDTH='100' HEIGHT='72' FRAMEBORDER='0' SCROLLING='no' NORESIZE FRAMESPACING='1'></IFRAME></TD>");
	document.write("		</TR>");
	document.write("		<TR><TD><IMG SRC='"+imgpath+"/footer_link_05.gif' STYLE='margin:6 0 0 3;'></TD></TR>");
	document.write("		</TABLE>");
	/****END OF company info****/
	document.write("		</TD>");
	document.write("		<TD></TD>");
	document.write("	</TR>");
	document.write("	</TABLE>");
}

/*************** SWF ÆÄÀÏ È£Ãâ¿ë ½ºÅ©¸³Æ® *********************************/
function obj_swf(filenm, emb_nm, widthSWF, heightSWF) {
	document.writeln("<OBJECT CLASSID='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' CODEBASE='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' WIDTH='"+widthSWF+"' HEIGHT='"+heightSWF+"' ID='"+emb_nm+"' ALIGN='top'>");
	document.writeln("<PARAM NAME='movie' VALUE='"+filenm+"' />");
	document.writeln("<PARAM NAME='quality' VALUE='high' />");
	document.writeln("<EMBED SRC='<%=src_path%>' quality='high' WIDTH='"+widthSWF+"' HEIGHT='"+heightSWF+"' NAME='"&emb_nm&"' ALIGN='top' allowScriptAccess='sameDomain' TYPE='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />");
	document.writeln("</OBJECT>");
}

/* ¿ìÃø Å¾¹öÆ° ####################################################################################*/
self.onError=null;
whichIt = null; 
lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
/***** STALKER CODE *****/
function heartBeat() {

var chk_i;

if(IE) { 
	diffY = document.body.scrollTop; 
	}
if(NS) { diffY = self.pageYOffset}

if(diffY != lastScrollY) {

	percent = .1 * (diffY - lastScrollY);

	if(percent > 0){
		 percent = Math.ceil(percent);
		 chk_i ="yes";
	}

	else{
		 percent = Math.floor(percent);
		 chk_i ="no";
	}


	if(IE){
		if ((chk_i == "yes") && (document.all.floater.style.pixelTop < (chk_vlue=document.body.scrollHeight - (710)))){
		 document.all.floater.style.pixelTop += percent;
		}

		else if ((chk_i == "no") && (document.all.floater.style.pixelTop > 278)){
		 document.all.floater.style.pixelTop += percent;
		}

	}

if(NS) document.floater.top += percent; 
lastScrollY = lastScrollY + percent;

}

} 

/* ¿ìÃø Å¾¹öÆ° ####################################################################################*/

/* SEEMEDIA °æ·Î, **/
function SEEMEDIA_inc(MEDIAID) {     
	
	var now = new Date() ; 
	var year = now.getYear();  

	var month = (now.getMonth()+1);  
	if(month < 10) month = "0"+month;

	var date = now.getDate(); 
	if(date < 10) date = "0"+date;	

	s_today = year +"-"+ month +"-"+ date ; 

	ip = "smcvod1.dideonet.com";
	port = "21700";
	vlu = "1";
	
	document.write("		<object id='SeeVideo2003' width='100%' height='100%' classid='CLSID:68253470-5D4F-4CDF-8D9C-353C14A2F013' codebase='http://www.seemedia.co.kr/products/lu2/sm4355/kor/240/SVPorsche.cab#version=2,5,31,240'>");
	document.write("			 <param name='ServerIP' value='"+ip+"'>");
	document.write("			 <param name='PortNum' value='"+port+"'>");
	document.write("			 <param name='UseFixedServerPort' value='"+vlu+"'>");
	document.write("			 <param name='MediaItem' value='"+MEDIAID+"'>");
	document.write("			 <param name='NoTicket' value='1'>");
	document.write("			 <param name='AutoPlay' value='1'>");
	document.write("			 <param name='RandomEnable' value='1'>");
	document.write("			 <param name='SkinName' value='Black_bear'>");
	document.write("			 <param name='SkinCodeBase' value='http://www.seevideo.co.kr/pub/skin/Black_bear.sbd#Version=2000'>");
	document.write("			 <PARAM NAME='CustomLogo' VALUE='http://www.i-challenge.co.kr/images/movie_logo.gif'>");
	document.write("			 <PARAM NAME='CustomLogoOnWhite' VALUE='1'>");
	document.write("		</object>");
	}

/* SEEMEDIA °æ·Î, **/
function SEEMEDIA_inc(MEDIAID,CTR) {     
	
	var now = new Date() ; 
	var year = now.getYear();  

	var month = (now.getMonth()+1);  
	if(month < 10) month = "0"+month;

	var date = now.getDate(); 
	if(date < 10) date = "0"+date;	

	s_today = year +"-"+ month +"-"+ date ; 

	ip = "smcvod1.dideonet.com";
	port = "21700";
	vlu = "1";
	
	document.write("		<object id='SeeVideo2003' width='100%' height='100%' classid='CLSID:68253470-5D4F-4CDF-8D9C-353C14A2F013' codebase='http://www.seemedia.co.kr/products/lu2/sm4355/kor/240/SVPorsche.cab#version=2,5,31,240'>");
	document.write("			 <param name='ServerIP' value='"+ip+"'>");
	document.write("			 <param name='PortNum' value='"+port+"'>");
	document.write("			 <param name='UseFixedServerPort' value='"+vlu+"'>");
	document.write("			 <param name='MediaItem' value='"+MEDIAID+"'>");
	document.write("			 <param name='NoTicket' value='1'>");
	document.write("			 <param name='AutoPlay' value='1'>");
	document.write("			 <param name='RandomEnable' value='1'>");
	document.write("			 <param name='ShowControl' value='"+CTR+"'>");
	document.write("			 <param name='SkinName' value='Black_bear'>");
	document.write("			 <param name='SkinCodeBase' value='http://www.seevideo.co.kr/pub/skin/Black_bear.sbd#Version=2000'>");
	document.write("			 <PARAM NAME='CustomLogo' VALUE='http://www.i-challenge.co.kr/images/movie_logo.gif'>");
	document.write("			 <PARAM NAME='CustomLogoOnWhite' VALUE='1'>");
	document.write("		</object>");
	}

// ±¸¸Å ÃßÃµ ¸ÞÀÏ
function recom_mail(){
	window.open("/ichallenge/popuprecom_mail.asp?itemcd="+arguments[0],"RECOM","top=1,left=1,width=650,height=490");
}

// ÁßÁö ¶Ç´Â 2°³¿ù ¹Ì¼ö ÆË¾÷
function no_buy(){
	window.open("/myhome/nonpay_infopopup.asp","NO","left=10 top=20 width=420 height=290 resizable=yes scrollbars=no");
}

function realimg(){
	window.open("/include/inc_realimage.asp?img="+arguments[0],"REAL","top=1,left=1,width=100,height=100,scrollbars=yes");
}