
var docuURL = document.URL;
var HttpDomain = "http://www.gundamshop.co.kr";
var HappyDomain = "http://happy.gundamshop.co.kr";
var CsDomain = "http://cs.gundamshop.co.kr";
var PlayDomain = "http://play.gundamshop.co.kr";
var InCludeDomain = "http://include.gundamshop.co.kr";
var Img1Domain = "http://image1.gundamshop.co.kr";
var Img2Domain = "http://image2.gundamshop.co.kr";
var Pics2Domain = "http://pics2.gundamshop.co.kr";
var ColonyDomain = "http://colony.gundamshop.co.kr";


var location_port = window.location.port; 
var location_href = location.href;

if(location_href.indexOf("mode=write") == -1 && location_href.indexOf("mode=edit") == -1)
{
	document.domain = "gundamshop.co.kr";	// domain ¹Ì¼³Á¤
}

//È¸¿øµî±Þ ¼³¸í
var tmp_grade = new Array();
tmp_grade = Array('ÀÏ¹Ý','¿À·»Áö','½Ç¹ö','°ñµå','VIP','PLATINUM');
//È¸¿øµî±Þ ¼³¸í

function setCookie(name, value, expiredays, domain) {
	var todayDate = new Date()
	todayDate.setDate(todayDate.getDate() + expiredays)
	//document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	document.cookie = name + "=" + escape(value) + ((!domain) ? "; path=/; ":"; path=/; domain=" + domain + "; ") + ((expiredays == null) ? "" : ("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 ""
}


var GetLogin = "";
//logout»óÅÂ
if(getCookie("GundamShopVisitor") == "" || getCookie("GundamShopVisitor") == "guest" || getCookie("GundamShopVisitor") == "undefined") {

//login»óÅÂ
} else {
	GetLogin = "1";
}

function topnaviLogin(value) {
	var theURL = HttpDomain + "/member/Login_Pop.html" + ((value)? "?url=" + escape(value):"?url=" + escape(docuURL));
	window.open(theURL,"GDShopLogIn","scrollbars=no,resizable=no,width=370,height=350,top=50,left=50");
}

function topnaviLogout() {
	var theURL = HttpDomain + "/member/Logout.html?url=" + escape(docuURL);
	window.open(theURL,"_self");
}


document.write('<meta http-equiv="Content-Type" content="text/html;charset=euc-kr">');
document.write('<link rel="shortcut icon" href="http://pics2.gundamshop.co.kr/home/top/gd.ico">');
document.write('<meta name="description" content="GUNDAMSHOP">');
document.write('<link rel="stylesheet" href="http://include.gundamshop.co.kr/css/basic.css" type="text/css">');



	var nows = new Date();
	var dates_str = nows.getYear() + "";
	dates_str += ((nows.getMonth()+1) < 10)? "0":"";
	dates_str += (nows.getMonth()+1) +"";
	dates_str += (nows.getDate() < 10)? "0":"";
	dates_str += nows.getDate() + "";

	var dates_time = dates_str;
	dates_time += (nows.getHours() < 10)? "0":"";
	dates_time += nows.getHours() + "";


//Ä«Å×°í¸® ÀÌµ¿
function goUrl(code)
{
	var tmpstr
	var tmplen = (parseInt(code.length) / 2) - 1;
	var linker = '/GD_Category0'+tmplen+'.html?CategoryID=' + code;
	location.href = HttpDomain + linker;
}

//ÇÃ·¡½Ã°´Ã¼ »ðÀÔ
function Display_Object(src,width,height,classid,version){
	if(classid == "") classid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
	if(version == "") version = "8,0,0,0";
	
	document.write('<object classid="clsid:'+classid+'"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width="'+width+'" height="'+height+'" id=ShockwaveFlash1>');
	document.write('<param name="movie" value="'+src+'" >');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="quality" value="high">');
	document.write('<param name=allowScriptAccess value=always>');
	document.write('<embed src="'+src+'" quality="high"  width="'+width+'" height="'+height+'" allowScriptAccess="always" wmode="Transparent" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
}

//¹Ì¸®º¸±â
function SimplePageView(itemcode)
{
	var theURL = HttpDomain + "/html/Popup/prdSimplePage.html?ItemCode=" + itemcode;
	window.open(theURL,"SimpleView","width=670,height=430,no");
}