<!--

//VBÀÇ Replace()¿Íµ¿ÀÏ
	function replaceString(fullS,oldS,newS) {   
		for (var i=0; i<fullS.length; i++){      
			if (fullS.substring(i,i+oldS.length) == oldS){         
				fullS = fullS.substring(0,i)+newS+fullS.substring(i+oldS.length,fullS.length)      
			}   
		}   
		return fullS
	}

//ÀÔ·ÂµÈ³»¿ëÀÌ ¼ýÀÚÀÎÁö ÆÇ´Ü
function isNumeric(num){
	if (isNaN(floatValue)){
		return true;
	}
	else{
		return false;
	}
}

//¼ýÀÚ¸¸ ¾²±â
function onlyNumber(sf,code){
	if ((code>=48&&code<=57)||(code>=96&&code<=105)||(code==9)||(code==13)){
		return true;
	}else{
		alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÕ´Ï´Ù.");
		event.returnValue = false;
		sf.value=""
		sf.focus();
	}
}

//ÀüÈ­¹øÈ£ÀÔ·Â
function onlyPhoneNumber(){
	if((event.keyCode>47)&&(event.keyCode<58)||(event.keyCode==45))
		event.returnValue=true;
	else
		event.returnValue=false;
}

//Ã¼Å©
function check(){
	if (document.searchs.textfields.value==""){	
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!")
		document.searchs.textfields.focus();
		return false;
	}else{
		document.searchs.searchitem.value=document.searchs.textfields.value;
		return true;
	}
}

//³¯Â¥Ã¼Å©-yyyymmddÇüÅÂÀÇ ³¯Â¥°¡ ¸Â´ÂÁö Ã¼Å©
function checkDate(dates){
	if (dates.length==8&&!isNaN(dates)){
		return true;
	}else{
		return false;
	}

}
 
//ÄíÅ°°Ë»ç-ÆË¾÷À»À§ÇÑ
function GetCookie(Name) {
	var a = document.cookie.indexOf(Name + "=");
	if (a != -1) {
		a += Name.length + 1; 
		var b = document.cookie.indexOf(";", a);
		if (b == -1) 
			b = document.cookie.length;
	}
	return unescape(document.cookie.substring(a, b));
}
//VBÀÇ Replace()¿Íµ¿ÀÏ
	function replaceString(fullS,oldS,newS) {   
		for (var i=0; i<fullS.length; i++){      
			if (fullS.substring(i,i+oldS.length) == oldS){         
				fullS = fullS.substring(0,i)+newS+fullS.substring(i+oldS.length,fullS.length)      
			}   
		}   
		return fullS
	}

//ÀüÃ¼ÆË¾÷
function selOpen(url){
	window.open(url , "WindowNew", "toolbar=yes,location=yes,menubar=yes,directories=yes,scrollbars=yes,status=yes,resizable=yes,left=100,top=60" );
}


//ÆË¾÷
function send_cal(){
	url = document.all.select.value;
	//alert(url);
	window.open(url , "Window", "toolbar=no,location=no,directories=no,status=no ,menubar=no,scrollbars=yes,resizable=no,width=640,height=600, left=100,top=60'" );
	//document.form1.action = "ADorderSettle.asp?bank_pay_no="+bank_pay_no;
	//document.form1.submit();
}

//´Ý±â
function closeWin_n() {
    window.close();
}

//°øÁöÆË¾÷
function openNotice() {

/*
	chk = GetCookie("20060426");
	if(chk == "done")
		return;
	window.open("/popup/popup_20060426.htm","popup","width=472,height=495,left=50,top=50,resizable=no, status=no,menubar=no, scrollbars=no, title=no");


	chk = GetCookie("20070517");
	if(chk == "done")
		return;
	window.open("/popup/popup_garlic.htm","popup22","width=484,height=455,left=100,top=50,resizable=no, status=no,menubar=no, scrollbars=no, title=no");
*/
//Ãß¼®ÀÎ»ç  

/*    if(GetCookie("20050915") != "check"){
        window.open("http://www.chulha.net/Others/Popup/20050915.html","mpopup","width=400,height=476,left=0,top=0,resizable=no, status=no,menubar=no, scrollbars=no, title=no");
    }	
*/
/*
    chk = GetCookie("chulha20051229");
	if(chk == "check")
		return;
	window.open("/Popup/newyear_greeting.html","newyear2","width=500,height=500,left=50,top=50,resizable=no, status=no,menubar=no, scrollbars=no, title=no");
*/
}


//°øÁöÆË¾÷(ie7 ¿ë... ÁÖ¼ÒÃ¢ ¾Èº¸ÀÌµµ·Ï)
function openNotice7() {
/*
	chk = GetCookie("20060426");
	if(chk == "done")
		return;

	var w = window.open("" , "pop1", "width=472,height=495,toolbar=no,location=no,menubar=no,directories=no,scrollbars=no,status=no,resizable=no,left=50,top=50" );

	w.document.open();
	w.document.write("<html><head><title>µµ¸Å½ÃÀå¸¶´Ã Æ÷ÀåÈ­ ´ëÃ¥ÃßÁø</title></head><body leftmargin='0' topmargin='0'>");
	w.document.write("<iframe src='/popup/popup_20060426.htm' width='100%' height='100%' frameborder='no' scrolling='no'></iframe></body></html>");
	w.document.close();



	chk = GetCookie("20070517");
	if(chk == "done")
		return;

	var w2 = window.open("" , "pop2", "width=484,height=455,toolbar=no,location=no,menubar=no,directories=no,scrollbars=no,status=no,resizable=no,left=100,top=60" );

	w2.document.open();
	w2.document.write("<html><head><title>ÁÖ´ëÁ¦°ÅÇÑ Æ÷Àå¸¶´Ã ÃâÇÏ</title></head><body leftmargin='0' topmargin='0'>");
	w2.document.write("<iframe src='/popup/popup_garlic.htm' width='100%' height='100%' frameborder='no' scrolling='no'></iframe></body></html>");
	w2.document.close();
*/
}


//-------------------------------------------------------------------------------
//µðÀÚÀÎ°ü·Ã
//-------------------------------------------------------------------------------
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_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_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_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_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_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 change_show(flag){
	//1.¸ðµÎ none·Î ¼³Á¤
	var i_pop1 = new Image();
	i_pop1.src = "/images/main/m_c_t_01.gif"
	var i_pop1_ = new Image();
	i_pop1_.src = "/images/main/m_c_t_01_o.gif" 

	var i_pop2 = new Image();
	i_pop2.src = "/images/main/m_c_t_02.gif"
	var i_pop2_ = new Image();
	i_pop2_.src =  "/images/main/m_c_t_02_o.gif" 


	document.all.pop1.style.display = 'none';
	document.all.pop2.style.display = 'none';

	//2.Image¹Ù²ÛÈÄ ÇØ´çÅ×ÀÌºí¸¸ Display
	if (flag == 1) {
	document.i_pop1.src = i_pop1_.src;
	document.i_pop2.src = i_pop2.src;
	document.all.pop1.style.display = '';
	}

	if (flag == 2) {
	document.i_pop1.src = i_pop1.src;
	document.i_pop2.src = i_pop2_.src;
	document.all.pop2.style.display = '';
	}

}

//------------------------------------------------------
// flash control script
//------------------------------------------------------

// s: source url
// d: flash id
// w: source width
// h: source height
// t: wmode ("" for none, transparent, opaque ...)
function getFlash(s,d,w,h,t){
    return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+w+" height="+h+" id="+d+"><param name=wmode value="+t+" /><param name=movie value="+s+" /><param name=quality value=high /><embed src="+s+" quality=high wmode="+t+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+w+" height="+h+"></embed></object>";
}

// write document contents
function documentwrite(src){
        document.write(src);
}

// assign code innerHTML
function setcode(target, code){
        target.innerHTML = code;
}


function showMainFlash(obj_url,obj_id,obj_width,obj_height,obj_wmode){
    return documentwrite("<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="+obj_width+" height="+obj_height+" id="+obj_id+" align=\"middle\"><param name=wmode value="+obj_wmode+" /><param name=movie value="+obj_url+" /><param name=quality value=high /><param name=\"allowscriptaccess\" value=\"samedomain\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src="+obj_url+" quality=high wmode="+obj_wmode+"  allowscriptaccess=\"samedomain\"  type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+obj_width+" height="+obj_height+"></embed></object>");    
}



function showFlash(obj_url,obj_id,obj_width,obj_height,obj_wmode){
    return documentwrite(getFlash(obj_url,obj_id,obj_width,obj_height,obj_wmode));    
}

//------------------------------------------------------


