////////////////////////////////////////
// module.js
// this will add gnb, footer, and etc..
// JinYong Kim
////////////////////////////////////////



// gnb ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function gnb(type) {
	// Variables
    this.type = type;	// forum_gnb, ...
    this.gnbWrapperTop ="<div id='gnb' "+  (this.type==undefined || this.type=="" ? "" : "class='"+this.type+"'")   +">";
    this.gnbWrapperBottom ="</div>";
	this.gnbBody="";


    this.gnbBody = this.gnbBody + "<div class='wrapper' >";
    this.gnbBody = this.gnbBody + "<a href='http://www.gamepotusa.com' rel='www.gamepotusa.com'><div class='logo' ></div></a>";
    this.gnbBody = this.gnbBody + "<div id='gnb_select_menu'>";
    this.gnbBody = this.gnbBody + "<a onmouseout='gnb_SelectMenu();' onmouseover='gnb_SelectMenu();' id='gnb_select_menu0' class='menu' href='#'>PLEASE SELECT CONTENT</a>";
    this.gnbBody = this.gnbBody + "<div onmouseout='gnb_SelectMenu();' onmouseover='gnb_SelectMenu()' id='gnb_select_menu1' class='submenu'>";
    this.gnbBody = this.gnbBody + "<ul>";
    this.gnbBody = this.gnbBody + "<li><a href='http://mir2.gamepotusa.com/'>Mir2</a></li>";
    this.gnbBody = this.gnbBody + "<li class='last'><a href='http://alteil.gamepotusa.com/forum/'>Alteil</a></li>";
								   // Add new game here
    this.gnbBody = this.gnbBody + "</ul>";
    this.gnbBody = this.gnbBody + "</div>";
    this.gnbBody = this.gnbBody + "</div>";
    this.gnbBody = this.gnbBody + "<div id='gnb_top_menu' >";
    this.gnbBody = this.gnbBody + "<ul>";
    this.gnbBody = this.gnbBody + "<li><a href='http://www.gamepotusa.com/privacy_policy.aspx'>PRIVACY POLICY</a></li>";
    this.gnbBody = this.gnbBody + "<li><a href='http://www.gamepotusa.com/terms_of_use.aspx'>TERMS OF USE</a></li>";
    this.gnbBody = this.gnbBody + "<li><a href='http://www.gamepotusa.com/sitemap.aspx'>SITEMAP</a></li>";
    this.gnbBody = this.gnbBody + "<li><a href='http://www.gamepotusa.com/contactus.aspx'>CONTACT US</a></li>";
    this.gnbBody = this.gnbBody + "</ul>";
    this.gnbBody = this.gnbBody + "</div>";
    this.gnbBody = this.gnbBody + "</div>";

    this.gnbStyle = "<style>";
    this.gnbStyle = this.gnbStyle + "#gnb { width:100%; 	height:49px; background: url(http://www.gamepotusa.com/Module/gnb/bg.gif) repeat-x; }";
    this.gnbStyle = this.gnbStyle + "#gnb img {border:0px}";
    this.gnbStyle = this.gnbStyle + "#gnb a {text-decoration:none; border:0px;}";
    this.gnbStyle = this.gnbStyle + "#gnb .wrapper{ width:100%; min-width:800px}";
    this.gnbStyle = this.gnbStyle + "#gnb .logo{ width:92px; height:32px; margin:9px 0 0 30px; border:0px; float:left; background:url(http://www.gamepotusa.com/Module/gnb/company_logo.gif)  no-repeat; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_top_menu{float:right;margin-top:15px;width:450px;}";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_top_menu ul{ list-style-image:none; list-style-position:outside; list-style-type:none; margin:0; padding:0; height:14px; text-align:left; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_top_menu li{ -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; margin:0; padding:0;";
    this.gnbStyle = this.gnbStyle + "background:transparent url(http://www.gamepotusa.com/Module/gnb/hd_menu_marker.gif) no-repeat scroll left center;";
    this.gnbStyle = this.gnbStyle + "float:right; font-size:10px; height:14px; line-height:14px; margin-right:18px; padding-left:13px; text-align:left; vertical-align:middle; }";
    this.gnbStyle = this.gnbStyle + "#gnb li a{font-family:Arial; color:#888888; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu{ float:right; font-size:10px; margin-top:14px; margin:15px 50px 0 0; padding:0; font-family:Arial; font-size:12px; text-align:center; line-height:1.5; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu a.menu{";
    this.gnbStyle = this.gnbStyle + "-moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding;";
    this.gnbStyle = this.gnbStyle + "background:transparent url(http://www.gamepotusa.com/Module/gnb/contentselect_menu_off.gif) no-repeat scroll left top;";
    this.gnbStyle = this.gnbStyle + "display:block; height:18px; overflow:hidden; text-indent:-9999px; width:153px; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.menu{";
    this.gnbStyle = this.gnbStyle + "-moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding;";
    this.gnbStyle = this.gnbStyle + "background:#FFFFFF none repeat scroll 0 0; border:1px solid #CCCCCC; position:absolute; width:151px; z-index:4;}";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu{";
    this.gnbStyle = this.gnbStyle + "-moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background:#FFFFFF none repeat scroll 0 0;";
    this.gnbStyle = this.gnbStyle + "border:1px solid #CCCCCC; position:absolute; width:151px; z-index:4; margin:0; padding:0; font-size:10px; font-family:Arial; font-size:12px;";
    this.gnbStyle = this.gnbStyle + "text-align:center; line-height:1.5; display:none;}";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu li{border-bottom:1px dotted #DDDDDD;}";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu li:hover{ background-color:#222222; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu li.last{ border:0 none; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu li a{ color:#666666; display:block; font-size:10px; line-height:14px; padding:4px 5px; text-align:left; }";
    this.gnbStyle = this.gnbStyle + "#gnb #gnb_select_menu div.submenu li a:hover{ color:#cccccc; }";
    this.gnbStyle = this.gnbStyle + "#gnb .clear{clear:both;height:0;overflow:hidden;}";
    this.gnbStyle = this.gnbStyle + ".forum_gnb{margin-left:-35px; padding-left:35px; padding-right:35px;}	/* only for forum */";
    this.gnbStyle = this.gnbStyle + "</style>";
    this.gnbStyle = this.gnbStyle + "";
    this.gnbStyle = this.gnbStyle + "";


	// Method
    this.write = function() {
		document.write( this.gnbStyle );
		document.write( this.gnbWrapperTop );
		document.write( this.gnbBody );
		document.write( this.gnbWrapperBottom );
        return;
    };

	this.getStyle = function(){
		return this.gnbStyle;
	};

	this.getWrapperTop = function(){
		return this.gnbWrapperTop;
	};

	this.getBody = function(){
		return this.gnbBody;
	};

	this.getWrapperBottom = function(){
		return this.gnbWrapperBottom;
	};

}



function gnb_SelectMenu(){
	document.getElementById('gnb_select_menu1').style.display=
		document.getElementById('gnb_select_menu1').style.display=='block'?'none':'block';
}



