
function preloadImage(src) {
	var preImage = new Image();
	preImage.src = src;
}

function swapImage(tObj, src) {
	tObj.src = src;
}


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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(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 cookieVal(cookieName) {
	thisCookie = document.cookie.split("; ");
	for(i=0; i<thisCookie.length; i++)  {
		if(cookieName == thisCookie[i].split("=")[0])
			return thisCookie[i].split("=")[1];
	}
	return "";
}

// ÆË¾÷ ÄíÅ° ¼³Á¤.
function popup_setCookie(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

//ÆË¾÷ ÄíÅ° °¡Á®¿À±â
function popup_getCookie(cookie_name ) {
var nameOfCookie = cookie_name + "=";
var x = 0;
while ( x <= document.cookie.length )
{
  var y = (x+nameOfCookie.length);
  if ( document.cookie.substring( x, y ) == nameOfCookie ) {
      if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
      endOfCookie = document.cookie.length;
      return unescape( document.cookie.substring( y, endOfCookie ) );
  }
  x = document.cookie.indexOf( " ", x ) + 1;
  if ( x == 0 )
      break;
	}
	return "";  
}
				
//È¨ÇÇ µ¹¾Æ°¡´Â ¸ÞÀÎ µð·º·ŽÅä¸®
var js_root_path_homr = "/200911kjs/pge/" ;

function pop(url, width, height, windowName) {
	var left = self.screenLeft + 20;
	var top  = self.screenTop  + 20;
	window.open(url, windowName, "toolbar=0,menubar=0,scrollbars=no,left=" + left + ",top=" + top+ ",resizable=no,width=" + width +",height=" + height + ";").focus();
}

function pop2(url, width, height, windowName) {
	var left = self.screenLeft + 20;
	var top  = self.screenTop  + 20;
	window.open(url, windowName, "toolbar=0,menubar=0,scrollbars=yes,left=" + left + ",top=" + top+ ",resizable=no,width=" + width +",height=" + height + ";").focus();
}

 

//¿ìÆí¹øÈ£ Á¶È¸ ÆË¾÷.
function openZipcodeDialog(zipcode1, address1) {
	var url;
	
	url = "/200911kjs/lib/find_zip.asp?" +
			"zipcode1=" + zipcode1 +
			"&address1=" + address1;
			
	pop2(url, 520, 300, "¿ìÆí¹øÈ£Á¶È¸");
}

//  ÀÔ·Â Æû¿¡ ¼ýÀÚ¸¸..
function onlynum(form){ 	
	if ((event.keyCode < 48) || (event.keyCode > 57)) event.returnValue = false;
	return;	
}

//ÆÄÀÏ ¾÷·ÎµåÃ¢ ¶ç¿ì±â
function popAttach(attachcode,formname){
	window.open("/200911kjs/lib/upload.asp?up_code="+attachcode+"&formname="+formname,"attachfile","width=400,height=300").focus();
}

//ÆÄÀÏ ¾÷·ÎµåÃ¢ ¶ç¿ì±â
function popAttachDelete(attachcode,formname,filename){
	
	if (filename==""){alert("Ã·ºÎÆÄÀÏÀÌ ¾ø½À´Ï´Ù.");return;}
	if(confirm("Ã·ºÎÆÄÀÏÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")==false){return;}
	window.open("/200911kjs/lib/upload_delete.asp?up_code="+attachcode+"&formname="+formname+"&filename="+filename,"attachfiledelete","width=400,height=300").focus();
}

// Ä«Å×·Î¸®º° Ã·ºÎÆÄÀÏ ´Ù¿î·ÎµåÇÏ±â. 
function goDownFile(cate,fileName) {
	location.href="/200911kjs/lib/download.asp?up_code="+cate+"&filename="+fileName;
}

//ÀÌ¹ÌÁöÃ¢ ÆË¾îÇÏ±â °æ·Î + ÆÄÀÏ¸í /dhsdjks/djskdj/dhksd.gif 
function ShowImgPop(filepath)
	{
		if (filepath==''){
			alert("ÆÄÀÏÀ» Ã£À»¼ö ¾ø½À´Ï´Ù.");
		} else {
		var URL = js_root_path_homr + "showImage.asp?filepath=" + filepath;
		window.open(URL,'title','status=yes,scrollbars=no,resizable=no,width=600,height=600').focus();
		}
	}

//ÆäÀÌÁö ÀÌµ¿
function fMovePathPage(path)
{
root_path = js_root_path_homr	+ path ;
location.href=root_path
}

function fMoveHome(){fMovePathPage("default.asp");} //È¨À¸·Î
function fMoveMypage(){fMovePathPage("a6/a6a2_001.asp");} //¸¶ÀÌÆäÀÌÁö
function fMoveMemberReg(){fMovePathPage("a6/a6a1_001.asp");}	//È¸¿ø°¡ÀÔ
function fMoveDupId(){pop("/200911kjs/lib/dup_id.asp", 500, 200, "¾ÆÀÌµðÁßº¹°Ë»ç");}
function fMoveFindId(){pop("/200911kjs/lib/find_idpwd.asp", 500, 320, "¾ÆÀÌµðºñ¹Ð¹øÈ£Ã£±â");}	    //¾ÆÀÌµð ºñ¹Ð¹øÈ£ Ã£±â
function fMoveSiteMap(){fMovePathPage("a7/a7a1_001.asp");}	//»çÀÌÆ®¸Ê

//°ü¸®ÀÚ¿¡°Ô ¸ÞÀÏº¸³»±â
function fMailAdmin(){
} 



//È¸¿øÄ«µå ´Ù¿î·Îµå
function downMemberCard(upfolder,downfile){
	if (downfile==''){return;}
	goDownFile(upfolder,downfile);
} 

function alertLogin(){
	showLoginMsg();
	location.href=js_root_path_homr;
}
function showLoginMsg(){
	alert("·Î±×ÀÎÈÄ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
}

function addYearEventDomain(selName){
	//selName select ¹Ú½º¸í
	var myselect=document.getElementById(selName);
	i=-1
	try{
	 i++;myselect.add(new Option("ÇÐÈ¸Áö ¹ß°£", "1"), i) ;//add new option to end of "sample"
	 i++;myselect.add(new Option("ÇÐ¼úÈ°µ¿", "2"), i); // myselect.options[0] - add new option to beginning of "sample"
	 i++;myselect.add(new Option("È¸ÀÇ", "3"), i);
	 i++;myselect.add(new Option("¿¬±¸È¸ È°µ¿", "4"), i);
	 i++;myselect.add(new Option("ÁöÈ¸ È°µ¿", "5"), i);
	 i++;myselect.add(new Option("ÇÐÈ¸Áö ¹ß°£", "6"), i);
	 i++;myselect.add(new Option("Á¶°æÀÛÇ°Àü", "7"), i);
	 i++;myselect.add(new Option("±âÅ¸È°µ¿", "8"), i);
	}
	catch(e){ //in IE, try the below version instead of add()
   i++;myselect.add(new Option("ÇÐÈ¸Áö ¹ß°£", "1"), i) ;//add new option to end of "sample"
	 i++;myselect.add(new Option("ÇÐ¼úÈ°µ¿", "2"), i); // myselect.options[0] - add new option to beginning of "sample"
	 i++;myselect.add(new Option("È¸ÀÇ", "3"), i);
	 i++;myselect.add(new Option("¿¬±¸È¸ È°µ¿", "4"), i);
	 i++;myselect.add(new Option("ÁöÈ¸ È°µ¿", "5"), i);
	 i++;myselect.add(new Option("ÇÐÈ¸Áö ¹ß°£", "6"), i);
	 i++;myselect.add(new Option("Á¶°æÀÛÇ°Àü", "7"), i);
	 i++;myselect.add(new Option("±âÅ¸È°µ¿", "8"), i);
	} 
}



            	
