/**************************************************************************************************************************
* Global 변수
**************************************************************************************************************************/
document.write('<script type="text/javascript" src="/Common/Js/jquery-1.4.2.min.js"></script>');

document.domain = "ogage.co.kr";
var Global_Product_Image_DefaultSmall		=	"http://img.halfclub.com/images_Ogage/Product/DefaultSmall/";
var Global_Builder_Templete_Image			=	"http://img.halfclub.com/images_Ogage/used";
var Global_Builder_Common_Image				=	"http://img.halfclub.com/images_Ogage/Common/v09/Images";
var Global_Ogage_Site_URL = location.host == "shop.ogage.co.kr" ? "http://shop.ogage.co.kr" : "";

var Global_Ogage_Site_IsReal				=	location.host == "www.ogage.co.kr" ? true : false;
var IsSecurity								=   location.protocol == "https:" ? true : false;

var ver										=	"24";
var Global_CateCD							=	"W";
var Global_ItemM							=	"AA";
var Global_ItemS							=	"AA01";
var Global_Min_Price						=	0;
var Global_Min_Price_Default				=	0;
var Global_Max_Price						=	381000;
var Global_Max_Price_Default				=	381000;
var SearchTextTime;
var Cir_Timer;


var Global_PopUpBuillID						=	"";

var path = location.pathname;

switch (path)
{
	case "/index.html" : 
	case "/" : 
		if(document.location.host == "doota.ogage.co.kr"){
			Global_PopUpBuillID = "9999999";
		}else{
			Global_PopUpBuillID = "571";
		}
	break;

	case "/shop/CasualMain.html" :
		Global_PopUpBuillID = "589";
	break;

	case "/shop/LuxuryMain.html" :
		Global_PopUpBuillID = "590";
	break;

	case "/shop/OfficeMain.html" :
		Global_PopUpBuillID = "591";
	break;

	case "/shop/CityMain.html" :
		Global_PopUpBuillID = "592";
	break;

	case "/shop/CasualMain.html" :
		Global_PopUpBuillID = "589";
	break;

	case "/shop/ShoesNBagMain.html" :
		Global_PopUpBuillID = "594";
	break;

	case "/shop/MensStyleMain.html" :
		Global_PopUpBuillID = "595";
	break;	

	case "/shop/RomanticMain.html" :
		Global_PopUpBuillID = "598";
	break;

	case "/shop/sexyMain.html" :
		Global_PopUpBuillID = "1120";
	break;
	
	case "/shop/OstyleMain.html" :
		Global_PopUpBuillID = "1171";
	break;

	default :
		if (path.toLowerCase() == "/theme/theme.asp") {
			Global_PopUpBuillID = "764";
		}
		else Global_PopUpBuillID = "";
	break;
}
/*******************************************************************************************************************************
* 브라우저 체크
*******************************************************************************************************************************/
var isie = (navigator.userAgent.toLowerCase().indexOf('msie') != -1) ? true : false;
var isie6 = (navigator.userAgent.toLowerCase().indexOf('msie 6') != -1) ? true : false;
var isie7 = false;
var isie8 = false;
var isie9 = false;
if (navigator.userAgent.toLowerCase().indexOf('msie 7') != -1) {
    isie6 = false;
    isie7 = true;
}
if (navigator.userAgent.toLowerCase().indexOf('msie 8') != -1) {
    isie6 = false;
    isie8 = true;
}
if (navigator.userAgent.toLowerCase().indexOf('msie 9') != -1) {
    isie6 = false;
    isie8 = false;
    isie9 = true;
}

var isfirefox = (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) ? true : false;
var isopera = (navigator.userAgent.toLowerCase().indexOf('opera') != -1) ? true : false;

/*******************************************************************************************************************************
* 날짜 함수
*******************************************************************************************************************************/
Number.prototype.to2 = function() { return (this > 9 ? "" : "0")+this; };
Date.ENGMONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
Date.HANMONTHS = ["01월", "02월", "03월", "04월", "05월", "06월", "07월", "08월", "09월", "10월", "11월", "12월"];
Date.ENGDAYS   = ["Sun", "Mon", "Tue", "Wed", "Tur", "Fri", "Sat"];
Date.HANDAYS   = ["일", "월", "화", "수", "목", "금", "토"];
Date.prototype.getDateString = function(dateFormat) {
  var result = "";

  dateFormat = dateFormat == 8 && "YYYY.MM.DD" ||
               dateFormat == 6 && "hh:mm:ss" ||
               dateFormat ||
               "YYYY.MM.DD hh:mm:ss";
  for (var i = 0; i < dateFormat.length; i++) {
    result += dateFormat.indexOf("YYYY", i) == i ? (i+=3, this.getFullYear()                     ) :
              dateFormat.indexOf("YY",   i) == i ? (i+=1, String(this.getFullYear()).substring(2)) :
              dateFormat.indexOf("EMM",  i) == i ? (i+=2, Date.ENGMONTHS[this.getMonth()]        ) :
              dateFormat.indexOf("HMM",  i) == i ? (i+=2, Date.HANMONTHS[this.getMonth()]        ) :
              dateFormat.indexOf("MM",   i) == i ? (i+=1, (this.getMonth()+1).to2()              ) :
              dateFormat.indexOf("M",    i) == i ? (      this.getMonth()+1                      ) :
              dateFormat.indexOf("EDD",  i) == i ? (i+=2, Date.ENGDAYS[this.getDay()]            ) :
              dateFormat.indexOf("HDD",  i) == i ? (i+=2, Date.HANDAYS[this.getDay()]            ) :
              dateFormat.indexOf("DD",   i) == i ? (i+=1, this.getDate().to2()                   ) :
              dateFormat.indexOf("D"   , i) == i ? (      this.getDate()                         ) :
              dateFormat.indexOf("hh",   i) == i ? (i+=1, this.getHours().to2()                  ) :
              dateFormat.indexOf("h",    i) == i ? (      this.getHours()                        ) :
              dateFormat.indexOf("mm",   i) == i ? (i+=1, this.getMinutes().to2()                ) :
              dateFormat.indexOf("m",    i) == i ? (      this.getMinutes()                      ) :
              dateFormat.indexOf("ss",   i) == i ? (i+=1, this.getSeconds().to2()                ) :
              dateFormat.indexOf("s",    i) == i ? (      this.getSeconds()                      ) :
                                                   (dateFormat.charAt(i)                         ) ;
  }
  return result;
};

/*******************************************************************************
* 쿠기 값 가져오기 / 2008-04-12
*******************************************************************************/
function getCookie(name) {
    var LoginInfo = "LoginInfo=";
    var prefix = name + "=";
    var cookieStartIndex = document.cookie.indexOf(LoginInfo);
    var cookieMaxIndex = document.cookie.indexOf(";", cookieStartIndex + LoginInfo.length);
	if (cookieMaxIndex == -1) cookieMaxIndex = document.cookie.length;

	var CookieValue = document.cookie.substring(cookieStartIndex + LoginInfo.length, cookieMaxIndex);
    var CookieSubStartIndex = CookieValue.indexOf(prefix);
	if (CookieSubStartIndex == -1) return (null);
    
	var CookieSubEndIndex = CookieValue.indexOf("&", CookieSubStartIndex + prefix.length);
    if (CookieSubEndIndex == -1) CookieSubEndIndex = CookieValue.length;
    
	return (unescape(CookieValue.substring(CookieSubStartIndex + prefix.length, CookieSubEndIndex)));
}

function getCookie2(name) {
    var prefix = name + "=";
    var cookieStartIndex = document.cookie.indexOf(prefix);
    if (cookieStartIndex == -1)
        return (null);
    var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = document.cookie.length;
    return (unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)));
}

function setCookie( name, value, expiredays )
{
	var endDate = new Date();
	endDate.setDate( endDate.getDate()+ expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + endDate.toGMTString() + ";"
}

function Location_Redirect(URL)
{
	location.href = "http://www.ogage.co.kr" + URL;
}

function Location_Redirect_Login(URL) {
	if (getCookie("UserID") != "" && getCookie("UserID") != null) {
		location.href = Global_Ogage_Site_URL + URL;
	} else {
		OpenWinBox('/common/popup/login.asp', 750, 500);
	}
}

/*******************************************************************************
* Util File Binder
*******************************************************************************/
var __include_css = {
	items : new Array() ,
	write : function(src) {document.write('<link rel="stylesheet" type="text/css" href="' + src + '" >');},
	bind : function() {
		for(var i=0;i<this.items.length;i++){
			this.write(this.items[i]);
		}
	},
	add : function(src) {
		src = (src || "").toLowerCase();
		var itemstring = ("," + this.items.join(",") + ",").toLowerCase();
		var hasitem = (itemstring.indexOf(src)>-1);
		if(!hasitem) this.write(src);
	}
}

var __include_js = {
	items : new Array() ,
	write : function(src) {document.write('<script type="text/javascript" src="' + src + '"></script>');},
	bind : function() {
		for(var i=0;i<this.items.length;i++){
			this.write(this.items[i]);
		}
	}
}

function Init_flashLayer()
{
	var Path = location.pathname.toLowerCase();

	if(Path == "/") Path = "/index.html";

	if (document.location.host == "www.ogage.co.kr")
	{
		for (var i = 0; i < LayerList.length; i++)
		{
			if(LayerList[i].Redi_URL.toLowerCase() == Path)
			{
				document.write(LayerList[i].Description);
			}

			/*
			if(LayerList[i].Redi_URL == "All_Page")
			{
				document.write(LayerList[i].Description);
			}
			*/
		}
	}
}

var __Gnb = {
	HeaderBind : function(){
		try{
			//[2011개편추가] : 박현종
			HeaderHTML = HeaderHTML+"<div id=\"category_top\" class=\"efu_contanierHeader\"><img style=\"float: left; margin-right: 28px; cursor: pointer;\" src=\"http://img.halfclub.com/Images_Ogage/Web/common/ogage_imgs/cateAllitem.jpg\" alt=\"\" onclick=\"allCategoryItemClick();return;\" /><div style=\"float: left; margin-top: 1px;\"><ul class=\"efu_location\"><li><a href=\"/\">홈 </a> ></li>	<li></li><li></li><li></li><li class=\"selectTypeA\" style=\"display:block\"><span>Luxury</span><img src=\"http://img.halfclub.com/Images_Ogage/Web/common/V11/images/bul/selectBtn.gif\" class=\"selectTypeABtn\" alt=\"\"  onclick=\"if(document.getElementById('selectTypeContList').style.display=='block'){document.getElementById('selectTypeContList').style.display='none';}else{document.getElementById('selectTypeContList').style.display='block';}\" /><ul class=\"selectTypeCont\" id=\"selectTypeContList\"><li onclick=\"GoToURL('http://www.ogage.co.kr/Luxury.html')\"><a>Luxury</a></li>	<li onclick=\"GoToURL('http://www.ogage.co.kr/Office.html')\"><a>Office</a></li><li onclick=\"GoToURL('http://www.ogage.co.kr/City.html')\"><a>City</a></li><li onclick=\"GoToURL('http://www.ogage.co.kr/Romantic.html')\"><a>Romantic</a></li><li onclick=\"GoToURL('http://www.ogage.co.kr/Casual.html')\"><a>Casual</a></li><li onclick=\"GoToURL('http://www.ogage.co.kr/YStreet.html')\"><a>Young&nbsp;ST.</a></li>	<li onclick=\"GoToURL('http://www.ogage.co.kr/ShoesNBag.html')\"><a>Shoes&nbsp;&amp;&nbsp;Bag</a></li><li onclick=\"GoToURL('http://www.ogage.co.kr/Men.html')\"><a>Men</a></li></ul></li></ul></div></div><div class=\"efu_allCategorysWarp\" id=\"AllCateItem\" style=\"position:absolute;top:200px;left:50%;margin-left:-465px;\">	<div class=\"allCategorys_ListArea\" id=\"AllCateItemList\" style=\"height: 274px;\">   <iframe id=\"ifr_allCategory\" name=\"ifr_allCategory\"  style=\"WIDTH: 100%; HEIGHT: 274px;\" frameBorder=\"0\" allowTransparency scrolling=\"no\" ></iframe></div><!--cs 에 숨김--></div><!-- All Category Item Layer End -->";
			
			if(IsSecurity)HeaderHTML = HeaderHTML.replace(new RegExp("http://img.halfclub.com/Images_Ogage","gi"),"/Join/SSLImage.aspx?http://img.halfclub.com/Images_Ogage");

			document.write(HeaderHTML);
		}catch(e){
		}
		
	},

	FooterBind : function(){
		//네이버 제휴사 요청 nhnclick 로그 스크립트 삽입 2011-08-11
        //if (getCookie2("mnm") != null) {
           // if (getCookie2("mnm").indexOf("nhnclick") > -1) {
               // FooterHTML += "<script type=\"text/javascript\">var _TRK_LID=\"34934\";var _L_TD=\"ssl.logger.co.kr\";var _FC_TRK_CN=\"26449\";</script><script type=\"text/javascript\">var _CDN_DOMAIN = location.protocol == \"https:\" ? \"https://fs.bizspring.net\" : \"http://fs.bizspring.net\";document.write(unescape(\"%3Cscript src='\" + _CDN_DOMAIN +\"/fs4/bstrk.js' type='text/javascript'%3E%3C/script%3E\"));</script><noscript><img alt=\"Logger Script\" width=\"1\" height=\"1\" src=\"http://ssl.logger.co.kr/tracker.tsp?u=34934&amp;js=N\" /></noscript>";
			
          //  }
        //}	
		
		if(IsSecurity)FooterHTML = FooterHTML.replace(new RegExp("http://img.halfclub.com/Images_Ogage","gi"),"/Join/SSLImage.aspx?http://img.halfclub.com/Images_Ogage");

		document.write(FooterHTML);
		Init_GNB();
		Init_Wing();
		__Gnb.PopUpBind();

		if (IsShowTrendLayer() == true) {
            if (getCookie2("HotTrendLayer") == "none" && document.getElementById('hbu_wing') != null) {
                document.getElementById('hbu_wing').style.display = "block";
            }
            else if (document.getElementById('HotTrendLayer') != null) {
                Wing_Open('HotTrendLayer');
            }

        }
		//현종추가 : 왼쪽배너 롤링
		func_QuickLeftStart();
	},

	CartBind : function(){},

	PopUpBind : function()
	{
		if(Global_PopUpBuillID != "")
		{
			var ImageBuilder_Layer =  new Array();
			ImageBuilder_Layer = ImageBuilderCall(Global_PopUpBuillID);

			var PopUp_HTML = "";
			var Layer_Box_Station_Text = document.getElementById("Layer_Box_Station").innerHTML;
			var CloseCheckBox_Index = 0;

			for (var i = 0; i < ImageBuilder_Layer.length; i++) {
				var LayerID = ImageBuilder_Layer[i].Buil_ID+"_"+i;

				if (getCookie2(LayerID) != "done") {
					document.getElementById("Layer_Popup_Banner").src           = Global_Builder_Templete_Image + ImageBuilder_Layer[i].IMAGE_DOC1;
					document.getElementById("Layer_Popup_Redi_URL").href        = ImageBuilder_Layer[i].Redi_URL;
					document.getElementById("Position_Layer_Box").style.cssText = "position:absolute;z-index:99999;display:block;"+ImageBuilder_Layer[i].Description;
					document.getElementById("Layer_Popup_Close").href           = "javascript:fn_CloseLayer('"+LayerID+"',"+(CloseCheckBox_Index++)+")";
					document.getElementById("Position_Layer_Box").id            = LayerID;

					PopUp_HTML = PopUp_HTML + document.getElementById("Layer_Box_Station").innerHTML;
					document.getElementById("Layer_Box_Station").innerHTML = Layer_Box_Station_Text;
				}
			}

			document.getElementById("Layer_Box_Station").innerHTML = "";
			document.getElementById("Layer_Box").innerHTML = PopUp_HTML;
		}
	}
}






//////////////////////////////////////////////////
//윙배너 왼쪽 롤링 : 영주님 요청
//////////////////////////////////////////////////
var QuickLeftTimmer;
var QuickLeftInterval = 3000;
var QuickLeftIndex = 1;
function func_QuickLeftStart() {
    var item = document.getElementsByName("liQuickLeftImg");
    var maxLen = item.length;
    if (maxLen == 1) return;
    QuickLeftTimmer = setInterval("func_QuickLeftRolling()", QuickLeftInterval);
}
function func_QuickLeftMouseOver(num) {
    var item = document.getElementsByName("liQuickLeftImg");
    var maxLen = item.length;
    if (maxLen == 1) return;

    for (intCnt = 0; intCnt < item.length; intCnt++) {
        if (num == intCnt) {
            document.getElementById("liQuickLeft" + intCnt).style.display = "block";
            document.getElementById("imgQuickLeft" + intCnt).src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/bul/k_tap01_on.gif";
        } else {
            document.getElementById("liQuickLeft" + intCnt).style.display = "none";
            document.getElementById("imgQuickLeft" + intCnt).src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/bul/k_tap01_off.gif";
        }

    }
    QuickLeftIndex = num;
    clearTimeout(QuickLeftTimmer);
}
function func_QuickLeftMouseOut() {
    func_QuickLeftStart();
}
function func_QuickLeftRolling() {
    var item = document.getElementsByName("liQuickLeftImg");
    var maxLen = item.length;

    if (maxLen == 1) {
        return;
    }

    if (QuickLeftIndex >= maxLen) {
        QuickLeftIndex = 0;
    }

    for (intCnt = 0; intCnt < item.length; intCnt++) {
        if (QuickLeftIndex == intCnt) {
            document.getElementById("liQuickLeft" + intCnt).style.display = "block";
            document.getElementById("imgQuickLeft" + intCnt).src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/bul/k_tap01_on.gif";
        } else {
            document.getElementById("liQuickLeft" + intCnt).style.display = "none";
            document.getElementById("imgQuickLeft" + intCnt).src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/bul/k_tap01_off.gif";
        }

    }
    QuickLeftIndex = QuickLeftIndex + 1;
}




function fn_CloseLayer(LayerName, CurDex)
{
	if(document.getElementsByName("no_view")[CurDex].checked == true) setCookie(LayerName,"done",1);
	document.getElementById(LayerName).style.display = "none";
}



/*******************************************************************************/
var IsTShotLoad = false;
function showLy(id) {
	if (id == "div_gnb_tshot" && !IsTShotLoad) {
		IsTShotLoad = true;
		document.getElementById("ifr_tshotgnb").src = "http://www.ogage.co.kr/Shop/TShot_Gnb.aspx";
	}

	var bx = document.getElementById(id);
	if (bx.style.display == 'block') {
		bx.style.display = 'none';
	}
	else {
		bx.style.display = 'block';
	}
}

function Gnb_Search2(objFrm) {

	var params = "";
	var Gnb_SearchKey = document.getElementById("Gnb_Search");
	//if (Gnb_SearchKey.Search != "") Gnb_SearchKey.value = Gnb_SearchKey.Search;
	if (Gnb_SearchKey.value == "") {
		alertMsg(Gnb_SearchKey, "검색어를 입력하세요");
		return false;
	}
	if (PatternTest(Gnb_SearchKey.value) == true) {
		params = AddParam(params, "PrdNm", Gnb_SearchKey.value);
		//params = AddParam(params, "research", "N");
		//params = AddParam(params, "minPrice", 0);
		//params = AddParam(params, "maxPrice", 9999999);
		//params = AddParam(params, "Imgs", "small"); //big

		objFrm.action = "http://www.ogage.co.kr/shop/Search.aspx?" + params;
		return true;
	}
	return false;
}

//현종수정 : IE9에서 오류수정
function Gnb_Search() {
    var params = "";
    var Gnb_SearchKey = document.getElementById("Gnb_Search");
    var Search = document.getElementById("Gnb_Search_val").value;
    if (Search.substring(0, 4) == "http") {
        location.href = Search;
    }
    else {
        if (Search != "") Gnb_SearchKey.value = Search;
        if (Gnb_SearchKey.value == "") return alertMsg(Gnb_SearchKey, "검색어를 입력하세요");

        if (PatternTest(Gnb_SearchKey.value) == true) {
            params = AddParam(params, "PrdNm", Gnb_SearchKey.value);
            //params = AddParam(params, "research", "N");
            //params = AddParam(params, "minPrice", 0);
            //params = AddParam(params, "maxPrice", 9999999);
            //params = AddParam(params, "Imgs", "small"); //big

            location.href = "/shop/Search.aspx?" + params;
        }
    }
}
/*
function Logo_Banner_Next() {
	var banner_top_id = document.getElementById("banner_top_id");
	var banner_top = banner_top_id.getElementsByTagName("a");
	var CurrentIndex = 0;

	for (var i = 0; i < banner_top.length; i++) {

		if (banner_top[i].style.display == "inline") {
			CurrentIndex = i + 1 == banner_top.length ? 0 : i + 1;
		}

		banner_top[i].style.display = "none";
	}

	banner_top[CurrentIndex].style.display = "inline";
}
*/

var IsPlusZone = false;
function Login_Utility() {
	var CouponCnt = getCookie("CouponCnt");
	var UserMileage = getCookie("UserMileage");
	var StyletButton = getCookie("StyletButton");
	var mnm = getCookie2("mnm");
	
	 var Grade = getCookie("Grade");

     document.getElementById("Grade").innerHTML = Grade;

	 /*플러스존 On/Off 이미지 변환*/
    var pluszonegnb = document.getElementById("efu_hdplusLayerpopbtn");
    var baroWing = document.getElementById("baroWing");
    if (mnm != null) {
       if ((mnm.indexOf("favorites_p") > -1 || mnm.indexOf("startpage_p") > -1 || mnm.indexOf("pluszone_p") > -1
		|| mnm.indexOf("favorites_m") > -1 || mnm.indexOf("startpage_m") > -1 || mnm.indexOf("pluszone_m") > -1
		|| mnm.indexOf("favorites") > -1 || mnm.indexOf("startpage") > -1 || mnm.indexOf("pluszone") > -1 || mnm.indexOf("ets_ems_self") > -1 || mnm.indexOf("ogage") > -1 || mnm.indexOf("Tricycle") > -1) && !(mnm == "hanaro_ogage" || getCookie2("mnm") == "hanaro_ogage")) {
            IsPlusZone = true;
            if (pluszonegnb) pluszonegnb.src = "http://img.halfclub.com/Images_Ogage/Web/common/ogage_imgs/baroO.jpg";
            if (baroWing) baroWing.src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/baro_on.jpg";

        }
        else {
            if (pluszonegnb) pluszonegnb.src = "http://img.halfclub.com/Images_Ogage/Web/common/ogage_imgs/baroOOff.jpg";
            if (baroWing) baroWing.src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/baro_off.jpg";
        }
    }
    else {
        if (pluszonegnb) pluszonegnb.src = "http://img.halfclub.com/Images_Ogage/Web/common/ogage_imgs/baroOOff.jpg";
        if (baroWing) baroWing.src = "http://img.halfclub.com/Images_Ogage/Web/common/V11/images/baro_off.jpg";
    }


	document.getElementById("CouponCnt").innerHTML = CouponCnt == "" ? "0 개" : CouponCnt;
	document.getElementById("UserMileage").innerHTML = UserMileage == "" ? "0 원" : UserMileage;
	document.getElementById("StyletButton").innerHTML = StyletButton == "" ? "0 원" : StyletButton;

	if (getCookie("UserID") == null) return false;

	if (getCookie("UserID") != "") {
		document.getElementById("LogIn").style.display = "none";
		document.getElementById("LogOut").style.display = "";
		document.getElementById("MemberJoin").style.display = "none";

		var MemberJoin2 = document.getElementById("MemberJoin2");
		if (MemberJoin2 != null) MemberJoin2.style.display = "none";
	}

}

function GoMyPage() {
	if (getCookie("UserID") != "" && getCookie("UserID") != null) {
		showLy('MyPageLayer');
	} else {
		OpenWinBox('http://www.ogage.co.kr/common/popup/login.asp', 750, 500);
	}
}

function Init_GNB() {
    Login_Utility();

    //SearchTextAdd();

    //SearchTextTime = setInterval("SearchTextAdd()", 3000);

	//네이버 제휴사 요청 nhnclick 로그 스크립트 삽입 2011-08-11
    //if (document.getElementById("nhnscript") != null) {
    //    document.getElementById("nhnscript").innerHTML = "&nbsp;<script type=\"text/javascript\">var _TRK_LID_SOL=\"34934\";var _L_TD_SOL=\"ssl.logger.co.kr\";</script><script type=\"text/javascript\">var _CDN_DOMAIN_SOL = location.protocol == \"https:\" ? \"https://fs.bizspring.net\" : \"http://fs.bizspring.net\";document.write(unescape(\"%3Cscript src='\" + _CDN_DOMAIN_SOL +\"/fs4/bstrk.naver.cts.sol.js' type='text/javascript'%3E%3C/script%3E\"));</script>";
    //}
}

function InitLineBanner()
{
	var GNBLineBanner =  new Array();
	GNBLineBanner = ImageBuilderCall(1086);

	if (GNBLineBanner != null && GNBLineBanner.length > 0)
	{
		var GNBLineBannerHTML = ""; //document.getElementById("sub_head").innerHTML;
		GNBLineBannerHTML += "<div class='ac'";
		GNBLineBannerHTML += "<a href='" + GNBLineBanner[0].Redi_URL+"'><img src='" + Global_Builder_Templete_Image + GNBLineBanner[0].IMAGE_DOC1+ "' /></a>";
		GNBLineBannerHTML += "</div>";

		//if (!(path == "/index.html" || path == "/"))
		//{
			document.getElementById("head_top").innerHTML = GNBLineBannerHTML;
		//}
	}
}

function show_all_item() {
	Obj = document.getElementById("AllItem");
	if (Obj.style.display == "none") {
		Obj.style.display = "block"
	}
	else {
		Obj.style.display = "none"
	}
}

function show_doota(type) {
	if (type == "Off") {
		document.getElementById("OnDoota").style.display = "none";
		document.getElementById("OffDoota").style.display = "block";
	}
	else {
		document.getElementById("OnDoota").style.display = "block";
		document.getElementById("OffDoota").style.display = "none";
	}
}
/*
function show_mypage() {
	Obj = document.getElementById("MyPageLayer");

	if(Obj.style.display == "none") {
		Obj.style.display = "block";
	}
	else {
		Obj.style.display = "none";
	}
}
*/
// png24 투명처리
function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='abcd';
	return '';
}

function TodaySpecialPrice(Buil_ID, ID, LinkUrl, Desc)
{
	var obj = window.open(LinkUrl, ID, Desc);
}

var IsPlusZoneLoad = false;
function ViewPlusZoneGnbLayer(evType)
{
	var PZoneLayerObj = document.getElementById("PlusZoneGnbLayer");
	if (PZoneLayerObj == null) {
		return;
	}

	if (!IsPlusZoneLoad) {
		var pluszoneifr = document.getElementById("ifr_pluszonegnb");
		if (pluszoneifr != null) {
			if (IsPlusZone) {
				pluszoneifr.src = "/Pluszone/Ogage_Pluszone_Gnb.asp?onoff=on";
			}
			else {
				pluszoneifr.src = "/Pluszone/Ogage_Pluszone_Gnb.asp?onoff=off";
			}

			IsPlusZoneLoad = true;
		}
	}

	if (evType == "ov") {
		PZoneLayerObj.style.display = "block";
	}
	else {
		PZoneLayerObj.style.display = "none";
	}
}

function Ogage_EventGnb()
{
	var EvGnbNow = new Date();
	var EvGnbTime = "";

	EvGnbTime = EvGnbNow.getDateString("YYYYMMDDhhmm");

	if (!(EvGnbTime >= "2011041810" && EvGnbTime <= "2011042510"))
	{
		return;
	}

	var PopUrl = "";
	var EvGnbAsstCD = "";
	switch (path)
	{
		case "/shop/OfficeMain.html": // OFFICE
			EvGnbAsstCD = "11000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=11000000";
			break;
		case "/shop/CityMain.html": // CITY
			EvGnbAsstCD = "12000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=12000000";
			break;
		case "/shop/RomanticMain.html": // ROMANTIC
			EvGnbAsstCD = "13000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=13000000";
			break;
		case "/shop/sexyMain.html": // SEXY
			EvGnbAsstCD = "14000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=14000000";
			break;
		case "/shop/CasualMain.html": // CASUAL
			EvGnbAsstCD = "15000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=15000000";
			break;
		case "/shop/Luxury_Main.html": // LUXURY
			EvGnbAsstCD = "16000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=16000000";
			break;
		case "/shop/MensStyleMain.html": // MEN
			EvGnbAsstCD = "17000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=17000000";
			break;
		case "/shop/ShoesNBagMain.html": // SHOES & BAG
			EvGnbAsstCD = "18000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=18000000";
			break;
		case "/shop/OstyleMain.html": // OSTYLE
			EvGnbAsstCD = "19000000";
			PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=19000000";
			break;
		case "/shop/YStreetMain.html": // YOUNG STREET
			//EvGnbAsstCD = "27000000";
			//PopUrl = "http://www.ogage.co.kr/event/HotBrand.aspx?assortcd=27000000";
			break;
		default:
			break;
	}

	if (PopUrl != "")
	{
		var EvGnbId = EvGnbNow.getDateString("YYYYMMDD") + "_" + EvGnbAsstCD;

		if(getCookie2(EvGnbId) != "done")
		{
			document.writeln("<div id='"+EvGnbId+"' style='position:absolute;z-index:88888;top:238px;left:223px;'>");
			document.writeln("<iframe scrolling='no' frameborder='0' style='width:290px;height:490px;' src='"+PopUrl+"'></iframe>");
			document.writeln("</div>");
		}
	}
}

function SelectItemList_asp() {	
	if(document.getElementById("AllCateItemListTop").style.display == "none"){
		var oXMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
							
		var SeverUrl = "/UserControls/Proxy/AllCategory.aspx";

		oXMLHTTP.open("GET", SeverUrl, false);
		oXMLHTTP.send();

		document.getElementById("AllCateItemList").innerHTML = oXMLHTTP.responseText;
		document.getElementById("AllCateItemListTop").style.display = "block";
	}
	else
	{
		document.getElementById("AllCateItemListTop").style.display = "none";
	}
}

function ShowCateLayer(){
	if(document.getElementById("ShowCateLayer").style.display == "none"){

		document.getElementById("ShowCateLayer").style.display = "block";
	}
	else
	{
		document.getElementById("ShowCateLayer").style.display = "none";
	}
}


function Ogage_PageOnLoad()
{
	SkyBannerLoad();
	jQuery.noConflict(); 
}
function SkyBannerLoad()
{
	try
	{
		tabRolling({ wrap: "quickLeft-bnnr", index: 0, speed: 3000 });
	}
	catch (e){}
}
function Ogage_MoveLink(vOgageUrl)
{
	document.location.href = vOgageUrl;
}
function Ogage_OpenerLink(vOgageUrl)
{
	try
	{
		opener.location.href = vOgageUrl;
	}
	catch (e)
	{
		document.location.href = vOgageUrl;
	}
}
function Ogage_ParentLink(vOgageUrl)
{
	try
	{
		parent.location.href = vOgageUrl;
	}
	catch (e)
	{
		document.location.href = vOgageUrl;
	}
}

//// 브라우저 종류에 따라 변동 시키자.
if (window.addEventListener) {
	window.addEventListener("load", Ogage_PageOnLoad, false);
}
else if (window.attachEvent) {
	window.attachEvent("onload", Ogage_PageOnLoad);
}
else {
	window.onload = Ogage_PageOnLoad;
}




////////////////////////////////////////////////////////////////
//[201109 개편] : 메인TOP메뉴 관련 처리--- START
////////////////////////////////////////////////////////////////


function hiddenLayerDisplay(tag) {
    var layerID = "";
    var anotherlayer = "";
    var buttonID = "";

    if (tag == "MyPageLayer") {
        layerID = "MyPageLayer";
        anotherlayer = "topsohoLayer";
        buttonID = "mypage";
    }
    else if (tag == "topsohoLayer") {
        layerID = "topsohoLayer";
        anotherlayer = "MyPageLayer";
        buttonID = "topsoho";
    } else if (tag == "efu_hdplusLayerpopid") {
        layerID = "efu_hdplusLayerpopid";
        anotherlayer = "MyPageLayer";
        buttonID = "efu_hdplusLayerpopbtn";
		if (document.getElementById("HdifrmPlus").src == "") {
            document.getElementById("HdifrmPlus").src = "http://www.ogage.co.kr/Payment/PopBox/popPlus.aspx";
        }
    }

    //var left = getBounds(document.getElementById(buttonID), layerID);

    document.getElementById(layerID).style.display = "block";
    //document.getElementById(layerID).style.left = left + "px";
    document.getElementById(anotherlayer).style.display = "none";
    
}


function btn_TopMenu(obj,mode) {
    if (mode == "on") {
		obj.src = obj.src.replace("_off.jpg", "_on.jpg");
    } else {
        obj.src = obj.src.replace("_on.jpg", "_off.jpg");
    }
}


// 특정 객체의 브라우저상 left 값을 가져오기 위한 메소드
function getBounds(tag, layer) {
    var ret = new Object();
    if (document.all) {
        var rect = tag.getBoundingClientRect();
        ret.left = rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft);
        ret.top = rect.top + (document.documentElement.scrollTop || document.body.scrollTop);
        ret.width = rect.right - rect.left;
        ret.height = rect.bottom - rect.top;
    } else {
        var box = document.getBoxObjectFor(tag);
        ret.left = box.x;
        ret.top = box.y;
        ret.width = box.width;
        ret.height = box.height;
    }
    if (layer == "topsohoLayer") {
        if (String(window.navigator.userAgent).substr(String(window.navigator.userAgent).lastIndexOf("MSIE") + 5, 3) == "7.0") {
            ret.left -= 111;
        }
        else {
            ret.left -= 109;
        }        
    }
    //alert("------" + ret.left);
    return ret.left;
}

//백그라운드 이미지 설정
function setBackgroundImg(id, back_url) {
	document.getElementById("topsohoLayer").style.backgroundImage = "url('" + back_url + "')";
}


function allCategoryItemClick() {
    if (document.getElementById("AllCateItem").style.display == "block") {
        document.getElementById("AllCateItem").style.display = "none";
    } else {
		if(document.getElementById("ifr_allCategory").src==""){	
	        document.getElementById("ifr_allCategory").src = "/UserControls/Proxy/AllCategory.aspx";
		}
        document.getElementById("AllCateItem").style.display = "block";
    }
}

////////////////////////////////////////////////////////////////
//[201109 개편] : 메인TOP메뉴 관련 처리--- END
////////////////////////////////////////////////////////////////



//__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/oHeaderHTML.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Station/OHDR.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Station/OFTR.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Publish.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Common.js");
//__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/jquery-1.4.2.min.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/js/InitControls.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/js/PageBuilder.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Call_SubDetail.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/Logger/pv.Logger.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/oLayerV10.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Common/Js/StyletSSO.js");
__include_js.items.push(Global_Ogage_Site_URL+"/Event/EventIcon.js");
if (getCookie2("mnm") == "about" || getCookie2("mnm") == "about") __include_js.items.push("http://www.about.co.kr/Network/CooperBar.aspx?en=euc-kr");
__include_js.bind();

var CurLink = document.location.href.toLowerCase();
if (!(CurLink.indexOf("detail_partner.asp") > 0))
{ // 제휴사 상세페이지는 common.css 제외.
	if(IsSecurity){
		__include_css.items.push(Global_Ogage_Site_URL+"/Common/css/common_https.css");
	}
	else
	{
		__include_css.items.push(Global_Ogage_Site_URL+"/Common/css/common.css");
	}
}
__include_css.bind();