// ·Ñ¿À¹ö ÀÌ¹ÌÁö
function restore_img_src(name, nsdoc)
{
 var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
 if (name == '')
 return;
 if (img && img.altsrc) {
 img.src = img.altsrc;
 img.altsrc = null;
 }
}

function preload_img()
{
 var img_list = preload_img.arguments;
 if (document.preloadlist == null)
 document.preloadlist = new Array();
 var top = document.preloadlist.length;
 for (var i=0; i < img_list.length; i++) {
 document.preloadlist[top+i]  = new Image;
 document.preloadlist[top+i].src = img_list[i+1];
 }
}

function change_img_src(name, nsdoc, rpath, preload)
{
 var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
 if (name == '')
 return;
 if (img) {
 img.altsrc = img.src;
 img.src = rpath;
 }
}

// ÆË¾÷ ¶ç¿ì±â
function zoom_product()
{
	var WinWidth = 600;
	var WinHeight = 600;
	var windowX = Math.ceil( (window.screen.width - 10 - WinWidth) / 2 );
	var windowY = Math.ceil( (window.screen.height - 29 - WinHeight) / 2 );
	window.open("/sh_goods_zoom.php","","scrollbars=no, width="+WinWidth+", height="+WinHeight+", top="+ windowY + ", left=" + windowX)
}

// ¿ìÆí¹øÈ£ È®ÀÎ
function open_zip()
{
	var WinWidth = 477;
	var WinHeight = 360;
	var windowX = Math.ceil( (window.screen.width - 10 - WinWidth) / 2 );
	var windowY = Math.ceil( (window.screen.height - 29 - WinHeight) / 2 );
	window.open("/sh_zipcode.php","","scrollbars=yes, width="+WinWidth+", height="+WinHeight+", top="+ windowY + ", left=" + windowX)
}

// ¾Ë·µÃ¢ ¶ç¿ì±â
function open_alert(text) {
alert(text);
return;
}

// Flash ¶ç¿ì±â
function flashmovie(url,width,height)
{
	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='"+width+"' height='"+height+"'>");
	document.write("<param name=movie value='"+url+"'>");
	document.write("<param name=quality value=best>");
	document.write("<param name=wmode value=transparent>");
	document.write("<param name=menu value=false>");
	document.write("<embed type='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></embed>");
	document.write("</object>");
}

// ¼îÇÏÀÌµå ·¹ÀÌ¾î
function changePage(pageNum,full,changeName)
{
	for (var i = 1; i <= full; i++) {
		if (pageNum == i) {
			document.all(changeName+i).style.display='';
		} else {
			document.all(changeName+i).style.display='none';
		}
	}
}

// ´Ù¸¥¸ÅÀå ¹Ù·Î°¡±â


function open_catemenu0() {
catemenu0.style.visibility='visible';
}
function close_catemenu0() {
catemenu0.style.visibility='hidden';
}

// ¼¼±Ý°è»ê¼­ Ãâ·Â
var initBody 
function beforePrint(){
	initBody = document.body.innerHTML;
	document.body.innerHTML = pnt_dv.innerHTML;
	body.style.visibility='hidden';
}
function afterPrint(){
	document.body.innerHTML = initBody;
	body.style.visibility='visible';
}
function printArea() {
	window.print();
}
	window.onbeforeprint = beforePrint;
	window.onafterprint = afterPrint;

// °øÁöÃ¢ ¶ç¿ì±â
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name )
{
	var nameOfCookie = 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 "";
}

function view_notice()
{
	if(getCookie("popup") != "done"){
		var WinWidth = 600;
		var WinHeight = 450;
		var windowX = Math.ceil( (window.screen.width - 10 - WinWidth) / 2 );
		var windowY = Math.ceil( (window.screen.height - 29 - WinHeight) / 2 );
		window.open("/etc_notice_pop.php","","scrollbars=no, width="+WinWidth+", height="+WinHeight+", top="+ windowY + ", left=" + windowX)
	}
}

function closeWin()
{
	if ( document.forms[0].popup.checked )
	setCookie( "popup", "done" , 1);
	self.close();
}