//////////////////////////////////////////////////////////////////////////////////////////
//  ³»  ¿ë : ActiveX ÆÐÄ¡ÀÇ È¸ÇÇ¸¦ À§ÇÑ ±âº»ÇÔ¼ö
//////////////////////////////////////////////////////////////////////////////////////////

function create_object(str_property_fn)
{// object¸¦ ¸¸µå´Â ÇÔ¼ö
	var obj = "<object";
						
	if( str_property_fn["id"] )	// ¾ÆÀÌµð
		obj += " id='" + str_property_fn["id"] + "'";
	if( str_property_fn["name"] )	// ÀÌ¸§
		obj += " name='" + str_property_fn["name"] + "'";
	if( str_property_fn["width"] )	// ³ÐÀÌ
		obj += " width='" + str_property_fn["width"] + "'";
	if( str_property_fn["height"] )	// ³ôÀÌ
		obj += " height='" + str_property_fn["height"] + "'";
	if( str_property_fn["classid"] )	// Å¬·¡½ºID
		obj += " classid='" + str_property_fn["classid"] + "'";
	if( str_property_fn["codebase"] )	// ±âº»Á¤º¸
		obj += " codebase='" + str_property_fn["codebase"] + "'";
	if( str_property_fn["type"] )	
		obj += " type='" + str_property_fn["type"] + "'";
	if( str_property_fn["standby"] )	
		obj += " standby='" + str_property_fn["standby"] + "'";
	if( str_property_fn["bgcolor"] )	
		obj += " bgcolor='" + str_property_fn["bgcolor"] + "'";

	return obj + ">";
}

function close_object(str_object_fn)
{// object¸¦ ´Ý´Â ÇÔ¼ö
	return str_object_fn + "\n</object>";
}

function create_param(str_name_fn, str_value_fn)
{// ¼Ó¼ºÀ» ¸¸µå´Â ÇÔ¼ö
	return "\n<param name='" + str_name_fn + "' value='" + str_value_fn + "'>";
}

function create_embed(str_property_fn,flg_base_fn)
{// embed¸¦ ¸¸µå´Â ÇÔ¼ö
	var obj = "\n<embed";
						
	if( str_property_fn["id"] )	// ¾ÆÀÌµð
		obj += " id='" + str_property_fn["id"] + "'";
	if( str_property_fn["name"] )	// ÀÌ¸§
		obj += " name='" + str_property_fn["name"] + "'";
	if( str_property_fn["width"] )	// ³ÐÀÌ
		obj += " width='" + str_property_fn["width"] + "'";
	if( str_property_fn["height"] )	// ³ôÀÌ
		obj += " height='" + str_property_fn["height"] + "'";					
	if( str_property_fn["src"] )	// ¼Ò½º À§Ä¡
		obj += " src='" + str_property_fn["src"] + "'";
	if( str_property_fn["quality"] )
		obj += " quality='" + str_property_fn["quality"] + "'";
	if( str_property_fn["menu"] )
		obj += " menu='" + str_property_fn["menu"] + "'";
	if( str_property_fn["type"] )
		obj += " type='" + str_property_fn["type"] + "'";						
	if( str_property_fn["scale"] )
		obj += " scale='" + str_property_fn["scale"] + "'";						
	if( str_property_fn["pluginspage"] )
		obj += " pluginspage='" + str_property_fn["pluginspage"] + "'";
		
	return obj + "></embed>";
}
//////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////
//  ³»  ¿ë : ActiveX ÆÐÄ¡ÀÇ È¸ÇÇ¸¦ À§ÇÑ ±âº»ÇÔ¼öÀ» ÀÀ¿ëÇÑ ÇÔ¼ö
//////////////////////////////////////////////////////////////////////////////////////////

// »ç¿ë¹ý :	base_flash("804px","100px","/main-menu.swf")
function base_flash(width,height,src)
{
	var obj_flash = new Array();
	var obj_embed = new Array();
	var str;
	
	obj_flash["width"] = width;
	obj_flash["height"] = height;
	obj_flash["classid"] = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
	obj_flash["codebase"] = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0";

	obj_embed["width"] = width;
	obj_embed["height"] = height;
	obj_embed["src"] = src;
	obj_embed["quality"] = "high";
	obj_embed["menu"] = "false";
	obj_embed["pluginspage"] = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";
	obj_embed["type"] = "application/x-shockwave-flash";
	obj_embed["scale"] = "exactfit";

	str = create_object(obj_flash);
	str += create_param("movie",src);
	str += create_param("menu","false");
	str += create_param("quality","high");
	str += create_param("wmode","transparent");
	str += create_param("scale","exactfit");
	str += create_embed(obj_embed);
	
	document.write(close_object(str));
}

// »ç¿ë¹ý : base_wm_player("player","214px","128px","movie/origami_sicaf.wmv")
function base_wm_player(id,width,height,src)
{
	var obj_wm = new Array();
	var str;
	
	obj_wm["id"] = id;
	obj_wm["width"] = width;
	obj_wm["height"] = height;
	obj_wm["classid"] = "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95";
	obj_wm["type"] = "application/x-oleobject";
	obj_wm["standby"] = "Loading.... Microsoft Windows Media Player";
	
	str = create_object(obj_wm);
	str += create_param("FileName",src);
	str += create_param("ShowControls","false");
	str += create_param("EnableContextMenu","false");
	str += create_param("Mute","false");
	str += create_param("Loop","true");
	
	document.write(close_object(str));
}

//////////////////////////////////////////////////////////////////////////////////////////
//  ³»  ¿ë : ÆË¾÷°ü¸®
//////////////////////////////////////////////////////////////////////////////////////////

var width = "360";
var border = "0";
var offsetx = 3;
var offsety = 3;
var fcolor = "white";
var backcolor = "#e0e7a0";
var textcolor = "00331e";
var capcolor = "#138F19";
var closecolor = "#99FF99";

  function OpenWindow(url)      {
      var myWindow = window.open('', 'newWin', 'resizable=0,scrollbar=0,status=0,width=500,height=400');
			myWindow.location = url;      
		}
	
	function OpenWindow1(url)      {
      var myWindow = window.open('', 'newWin', 'resizable=yes,scrollbars=yes,status=0,width=500,height=400');
			myWindow.location = url;      
	}
	
	function OpenWindow2(url)      {
      var myWindow = window.open('', 'newWin', 'resizable=no,scrollbars=no,status=0,width=450,height=550');
			myWindow.location = url;      
	}
	
	function OpenWindow3(url)      {
      var myWindow = window.open('', 'newWin', 'resizable=no,scrollbars=no,status=0,width=750,height=450');
			myWindow.location = url;      
	}
	
	function OpenWindowView(url)      {
      var myWindow = window.open('', 'newWinView', 'resizable=no,scrollbars=no,status=0,width=500,height=600');
			myWindow.location = url;      
	}
	
//////////////////////////////////////////////////////////////////////////////////////////
//  ³»  ¿ë : ¸ÞÀÎ °øÁö»çÇ× °ü·Ã
//////////////////////////////////////////////////////////////////////////////////////////	
	
/******************
*·¹ÀÌ¾î º¸ÀÌ±â/°¨Ãß±â
*******************/
function LayerSH(LayerName,Status) {
ns4 = (document.layers)?true:false
ie4 = (document.all)?true:false

	if (ns4) {
		LayerN = document.layers[LayerName]
		if (Status == 'block') LayerN.display = 'block';
		if (Status == 'none') LayerN.display = 'none';
	}
	if (ie4) {
		LayerN = document.all[LayerName].style
		if (Status == 'block') LayerN.display = 'block';
		if (Status == 'none') LayerN.display = 'none';
	}

}

function select_click(){

	//var z = event.srcElement.id;
	//alert (z);
	LayerSH('Layer2_s01','none');LayerSH('Layer1_s01','block')
}

	function main_tab(maintab)
	{
	//¸ÊÀ§Ä¡
	main_tab_coords = new Array();

	main_tab_coords[0] = "0,0,86,27";
	main_tab_coords[1] = "95,0,176,27";
	main_tab_coords[2] = "186,0,272,27";
	
	//¸Ê¸µÅ©
	main_tab_link = new Array();

	main_tab_link[0] = "LayerSH('Layer_tab01','block');LayerSH('Layer_tab02','none');LayerSH('Layer_tab03','none');";
	main_tab_link[1] = "LayerSH('Layer_tab01','none');LayerSH('Layer_tab02','block');LayerSH('Layer_tab03','none');";
	main_tab_link[2] = "LayerSH('Layer_tab01','none');LayerSH('Layer_tab02','none');LayerSH('Layer_tab03','block');";
	
	document.write("<map name=tab0" + maintab +">");

	for ( i=1 ; i<=main_tab_link.length ; i++ )
	{
		document.write("<area shape='rect' coords='" + main_tab_coords[i-1] + "'");
		document.write(" href='#'");
		document.write(" onClick=" + main_tab_link[i-1]);
		document.write(" onMouseover=" + main_tab_link[i-1]);
		document.write(" onFocus=this.blur()>");
	}		
	document.write("</map>")

} 

//////////////////////////////////////////////////////////////////////////////////////////
//  ³»  ¿ë : ·Î±×ÀÎ °ü·Ã
//////////////////////////////////////////////////////////////////////////////////////////	 

function checkHan(formname) 
{
	var intErr
	var strValue=formname.value
	var retCode=0
	for(var i=0;i<strValue.length;i++)
	{
		var retCode=strValue.charCodeAt(i)
		var retChar=strValue.substr(i,1).toUpperCase()
		retCode=parseInt(retCode)
		if((retChar<'0' || retChar>'9')&&(retChar<'A' || retChar>'Z')&&((retCode>255) || (retCode<0))) return false;
	}
	return true;
}

function login_check(form)
{
	if(document.user_login.UserID.value.length == 0)
	{
		alert("ID¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login.UserID.focus();
		return(false);
	}

	if(document.user_login.UserID.value.length == 0)
	{
		alert("ID¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login.UserID.focus();
		return(false);
	}
	else
	{
		if(!checkHan(document.user_login.UserID))
		{
			alert("ID´Â ÇÑ±Û·Î ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			document.user_login.UserID.value = "";
			document.user_login.UserID.focus();
			return(false);
		}
	}


	document.user_login.Password.value = java_both_trim(document.user_login.Password.value);
	if(document.user_login.Password.value.length == 0)
	{
		alert("PASSWORD¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login.Password.focus();
		return(false);
	}

	if(document.user_login.Password.value.length == 0)
	{
		alert("PASSWORD¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login.Password.value = "";
		document.user_login.Password.focus();
		return(false);
	}
	else
	{
		if(!checkHan(document.user_login.Password))
		{
			alert("PASSWORD´Â ÇÑ±Û·Î ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			document.user_login.Password.value = "";
			document.user_login.Password.focus();
			return(false);
		}
	}

	return(true);
}

function java_both_trim(a)
{
	// ¿ÞÂÊ °ø¹é Á¦°Å
	var search = 0;
	while ( a.charAt(search) == " ")
  {
		search = search + 1;
	}
	a = a.substring(search, (a.length))

	// ¿À¸¥ÂÊ °ø¹é Á¦°Å
	search = a.length - 1;
	while (a.charAt(search) ==" ")
	{
		search = search - 1;
	}
	return a.substring(0, search + 1);
}

 var check_usrId = false;
 var check_passwd = false;
 
 function input_id () {
 	if ( check_usrId ) return true;
  document.user_login.UserID.style.backgroundImage ="";
 	check = true;
 	return true;
 }
 
 function input_pwd () {
 	if ( check_passwd ) return true;
  document.user_login.Password.style.backgroundImage ="";
 	check = true;
 	return true;
 }
 
 function checkHan_1(formname) 
{
	var intErr
	var strValue=formname.value
	var retCode=0
	for(var i=0;i<strValue.length;i++)
	{
		var retCode=strValue.charCodeAt(i)
		var retChar=strValue.substr(i,1).toUpperCase()
		retCode=parseInt(retCode)
		if((retChar<'0' || retChar>'9')&&(retChar<'A' || retChar>'Z')&&((retCode>255) || (retCode<0))) return false;
	}
	return true;
}

function login_check_1(form)
{
	if(document.user_login_1.UserID.value.length == 0)
	{
		alert("ID¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login_1.UserID.focus();
		return(false);
	}

	if(document.user_login_1.UserID.value.length == 0)
	{
		alert("ID¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login_1.UserID.focus();
		return(false);
	}
	else
	{
		if(!checkHan(document.user_login_1.UserID))
		{
			alert("ID´Â ÇÑ±Û·Î ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			document.user_login_1.UserID.value = "";
			document.user_login_1.UserID.focus();
			return(false);
		}
	}


	document.user_login_1.Password.value = java_both_trim_1(document.user_login_1.Password.value);
	if(document.user_login_1.Password.value.length == 0)
	{
		alert("PASSWORD¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login_1.Password.focus();
		return(false);
	}

	if(document.user_login_1.Password.value.length == 0)
	{
		alert("PASSWORD¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.user_login_1.Password.value = "";
		document.user_login_1.Password.focus();
		return(false);
	}
	else
	{
		if(!checkHan_1(document.user_login_1.Password))
		{
			alert("PASSWORD´Â ÇÑ±Û·Î ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			document.user_login_1.Password.value = "";
			document.user_login_1.Password.focus();
			return(false);
		}
	}

	return(true);
}

function java_both_trim_1(a)
{
	// ¿ÞÂÊ °ø¹é Á¦°Å
	var search = 0;
	while ( a.charAt(search) == " ")
  {
		search = search + 1;
	}
	a = a.substring(search, (a.length))

	// ¿À¸¥ÂÊ °ø¹é Á¦°Å
	search = a.length - 1;
	while (a.charAt(search) ==" ")
	{
		search = search - 1;
	}
	return a.substring(0, search + 1);
}

 var check_usrId_1 = false;
 var check_passwd_1 = false;
 
 function input_id_1 () {
 	if ( check_usrId_1 ) return true;
  document.user_login_1.UserID.style.backgroundImage ="";
 	check = true;
 	return true;
 }
 
 function input_pwd_1 () {
 	if ( check_passwd_1 ) return true;
  document.user_login_1.Password.style.backgroundImage ="";
 	check = true;
 	return true;
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
 var mSearchMode
 mSearchMode = 1

 function imgHidden_OnClick()
 {
	 if (mSearchMode == 1) {
		document.all.imgHidden.src = "./image/bn_arr_down.gif";
		document.all.imgHidden.alt = "°Ë»öÃ¢À» º¸¿©ÁÝ´Ï´Ù.";
		ModeSearch.style.display = "none";
		mSearchMode = 0;
		
	 }
	 else {
		document.all.imgHidden.src = "./image/bn_arr_up.gif";
		document.all.imgHidden.alt = "°Ë»öÃ¢À» ¼û±é´Ï´Ù.";
		ModeSearch.style.display = "inline";
		mSearchMode = 1;
		
	 }
  }

  function document_onkeydown()
  {
  	if (event.keyCode==13) {
  		search_list();
  	}
  }


///////////////////////////////////////////////////////////////////////////////////////////////////////////////  
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////  

	function goCenter(PIC_NAME, PIC_URL)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"IMAGING_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL, nLeft,nTop,800,500,0,0,0,0,0);
	}
	
	function goCompany(PIC_NAME, PIC_URL)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"IMAGING_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL, nLeft,nTop,800,500,0,0,0,0,0);
	}

 function goadd_title()
	{
		var nLeft, nTop
		nLeft = (window.screen.width  - 800) / 2;
		nTop  = (window.screen.height - 600) / 2;
		
		open_window2('Á÷Ã¥¸®½ºÆ®',"title_view.asp", nLeft,nTop,800,600,0,0,0,0,0);
	}
 
 
 function goadd_title_1()
	{
		var nLeft, nTop
		nLeft = (window.screen.width  - 800) / 2;
		nTop  = (window.screen.height - 600) / 2;
		
		open_window2('¿É¼Ç1',"title_view_2.asp", nLeft,nTop,800,600,0,0,0,0,0);
	}
	
	function goadd_title_2()
	{
		var nLeft, nTop
		nLeft = (window.screen.width  - 800) / 2;
		nTop  = (window.screen.height - 600) / 2;
		
		open_window2('¿É¼Ç2',"title_view_3.asp", nLeft,nTop,800,600,0,0,0,0,0);
	}

 
 function OrderPrint(id)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"Mall_Order_print.asp?id="+id, nLeft,nTop,800,600,0,0,0,0,0);
	}
 
 function goViewImg(PIC_NAME, PIC_URL)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"IMAGING_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL, nLeft,nTop,800,600,0,0,0,0,0);
	}
	
	function goViewImg2(PIC_NAME, PIC_URL,P_WIDTH,P_HEIGHT)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"IMAGING2_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL+"&P_WIDTH="+P_WIDTH+"&P_HEIGHT="+P_HEIGHT, nLeft,nTop,800,600,0,0,0,0,0);
	}
	
	function goViewImg00(PIC_NAME, PIC_URL)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â',"IMG_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL, nLeft,nTop,800,600,0,0,0,0,0);
	}
	
	function goViewAvi(PIC_NAME, PIC_URL)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 400) / 2;
		nTop = (window.screen.height - 500) / 2;
		
		open_window2('¹Ì¸®º¸±â',"Avi_view.asp?PIC_NAME="+PIC_NAME+"&PIC_URL="+PIC_URL, nLeft,nTop,400,370,0,0,0,0,0);
	}
	
	function goPass()
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 620) / 2;
		nTop = (window.screen.height - 250) / 2;
		
		open_window2('ºñ¹øÃ£±â',"members/pass_search.asp", nLeft,nTop,620,250,0,0,0,0,0);
	}
	
	function ObjHome(nHome) {
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2
		nTop = (window.screen.height - 650) / 2
	
		open_window2("home","/mail/homepage.asp?nHome="+nHome, nLeft,nTop,800,650,0,0,0,1,0)
		
	}
	
	function ObjBANNER(nHome,nName,cID) {
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2
		nTop = (window.screen.height - 650) / 2
	
		open_window2("home","./webpage.asp?nHome="+nHome+"&nName="+nName+"&cID="+cID, nLeft,nTop,800,650,0,0,0,1,0)
		
	}
	function openHelp(TName, CName)
	{
		var nLeft, nTop;
		nLeft	= document.body.scrollLeft+10;
		nTop	= document.body.scrollTop+10;
		
		open_window2("HelpWin", "help/help_view.asp?TNAME="+TName+"&CNAME="+CName, nLeft,nTop,800,350,0,0,0,0,0);
	}
	
	function ObjMail(nMail,nName) {
		var nLeft, nTop
		nLeft = (window.screen.width - 700) / 2
		nTop = (window.screen.height - 550) / 2
	
		open_window2("nMail","/mail/SendMail.asp?nMail="+nMail+"&nName="+nName, nLeft,nTop,700,550,0,0,0,1,0)
	}
	
	function ObjGMail(nMail,nName) {
		var nLeft, nTop
		nLeft = (window.screen.width - 700) / 2
		nTop = (window.screen.height - 550) / 2
	
		open_window2("nMail","/mail/Mail.asp?nMail="+nMail+"&nName="+nName, nLeft,nTop,700,550,0,0,0,1,0)
	}
	
	function image_update(PID, BN)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 400) / 2;
		nTop = (window.screen.height - 300) / 2;
		
		open_window2('¾àµµ¿Ã¸®±â',"./update_image.asp?PID="+PID+"&BN="+BN, nLeft,nTop,400,300,0,0,0,0,0);
	}
	
	function goTotalMail_send()
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('¹Ì¸®º¸±â','./mail_member.asp', nLeft,nTop,800,600,0,0,0,0,0);
	}
	
	function goPrint(id)
	{
		var nLeft, nTop
		nLeft = (window.screen.width - 800) / 2;
		nTop = (window.screen.height - 600) / 2;
		
		open_window2('ÇÁ¸°Æ®ÇÏ±â',"./member_infor_print.asp?p_id="+id+"", nLeft,nTop,800,600,0,0,0,1,0);
		
	}
	function open_window2(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
	{
		toolbar_str = toolbar ? 'yes' : 'no';
		menubar_str = menubar ? 'yes' : 'no';
		statusbar_str = statusbar ? 'yes' : 'no';
		scrollbar_str = scrollbar ? 'yes' : 'no';
		resizable_str = resizable ? 'yes' : 'no';
		var myWin = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
	
		myWin.focus();
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///ÇÃ·¡½¬ ÆË¾÷
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  function openwin(theURL){
    window.open(theURL,"01","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=660,height=500" );
  }

  function openwin1(theURL){
    window.open(theURL,"02","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=750,height=800" );
  }
  
  function OpenWindowVIEW(loc){

    var myWindow = window.open('', 'VIEW', 'resizable=yes,scrollbars=yes,status=0,width=650,height=600');
		myWindow.location = loc;      

	}
	
	function OpenWindowDB(loc){

    var myWindow = window.open('', 'newWin', 'resizable=yes,scrollbars=yes,status=0,width=650,height=400');
		myWindow.location = loc;      

	}
	
	function OpenWindowBoard(loc){

    var myWindow = window.open('', 'newWin', 'resizable=yes,scrollbars=yes,status=0,width=650,height=400');
		myWindow.location = loc;      

	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///¹öÆ° ÀÌµ¿
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  function GoToURL(loc)      {
		window.location = loc;      
	}      

  function GoToURLWhenDelete(loc)      {
		if ( confirm('»èÁ¦µÈ °Ô½Ã¹°Àº ´Ù½Ã´Â º¹¿ø½ÃÅ³ ¼ö ¾ø½À´Ï´Ù. Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?') ) {
			window.location = loc;      
		}
	}
	
	function GoToURLWhenDelete_due(loc)      {
		if ( confirm('³³ÀÔÁ¤º¸°¡ Àß ¸øµÇ¾ú½À´Ï±î? ½ÅÁßÇÏ°Ô ¼öÁ¤ÇÏ¼¼¿ä.') ) {
			window.location = loc;      
		}
	}
	
	function GoToURLText(loc)      {
		if ( confirm('È¸ºñ¹Ì³³À¸·Î ÀÎÇØ ¼¾ÅÍÁ¤º¸¸¦ Â÷´ÜÇÏ½Ã°Ú½À´Ï±î?') ) {
			window.location = loc;      
		}
	}
	
	function GoToURLText_1(loc)      {
		if ( confirm('Â÷´ÜµÈ ¼¾ÅÍÁ¤º¸¸¦ ÇØÁöÇÏ½Ã°Ú½À´Ï±î?') ) {
			window.location = loc;      
		}
	}
	function GoToURLWhenUpdate(loc){

		if ( confirm('¼öÁ¤µÈ °Ô½Ã¹°Àº ´Ù½Ã´Â º¹¿ø½ÃÅ³ ¼ö ¾ø½À´Ï´Ù. Á¤¸»·Î ¼öÁ¤ÇÏ½Ã°Ú½À´Ï±î?') ) {
			window.location = loc;      
		}

	}   
	
  function post()	{
 	  var str
    str = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=485,height=150";
    window.open('mem_zipcode.asp','remote',str);
  } 
 
  function member_search(){
 	  var str
    str = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=485,height=150";
    window.open('mem_member.asp','remote',str);
  } 	

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///¿¡µðÆ®
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function editBox() { 
	document.write('<OBJECT id="editBox" style="LEFT: 0px; TOP: 0px" data="./include/Editor2.htm" width="658" height="160" type="text/x-scriptlet" VIEWASTEXT></OBJECT><embed width="100%" height="350" src="./include/Editor2.htm"></embed>');
} 

//======================================================================================================
// Function Name : function MM_preloadImages
//				   function MM_swapImgRestore
//				   function MM_findObj				   	
//				   function MM_swapImage
// ³»¿ë          : ¸ðµç È­¸éÀÇ Button¿¡¼­ ¹Ý¿µµÇ´Â Actionµé 
//======================================================================================================
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) 
{ //v3.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); 
	
	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 WonAmount(NumV)
	{
		Num = NumV.toString();
	
		var count     = 0;
		var temp      = "";
		var resultWon = "";
		var oneChar   = "";
	
		for (var ch = Num.length-1; ch >= 0; ch--)
		{ 
			oneChar = Num.charAt(ch);
	
			if (count == 3) 
			{
				temp += ",";
				temp +=
				oneChar;
				count = 1;
				continue;
			} 
			else 
			{
				temp +=
				oneChar;
				count ++;
	  }
	 }
 }


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		
 function bluring(){ 

	 if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")document.body.focus(); 

 } 

 document.onfocusin=bluring;
 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



