function manian_title(sitename)
{
    document.writeln('<title>¸Å´Ï¾È´åÄÄ - PCÁ¤º¸ Ä¿¹Â´ÏÆ¼</title>')
}

function manian_header(sitename)
{
	document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">')
    document.writeln('<meta name="author" content="manian">')
    document.writeln('<meta http-equiv="Description" name="Description" content="¸Å´Ï¾È´åÄÄ - ¸Å´Ï¾Æ ³×Æ®¿öÅ©">')
    document.writeln('<meta http-equiv="Keywords" name="keywords" content="¸Å´Ï¾È,¸Å´Ï¾È´åÄÄ,¸Å´Ï¾Æ,À©µµ,À©µµ¿ì,À©ºñºñ¿¡½º,À©»ç¸ð, ´Ù¿î·Îµå, ÆÁ,»ç¿ë±â,À©µµXP,À©µµ¿ì XP,À©µµ¿ì 2000,À©µµ¿ì Me,À©µµ¿ì 98,À©µµ2000,À©µµ¹Ì,À©µµ98,À©µµnt,À©µµ¿ìXP, XP, windows, windows 2000, windows xp,windows me, windows 98, windows nt, ´Ù¿î·Îµå, À©µµ, µå¶óÀÌ¹ö, ÀÚ·á½Ç, faq ">')

	document.writeln('<link rel="stylesheet" href="http://manian.connect.kr/manian/css/manian.css" type="text/css">')

	if (sitename=="gonggu") {
		document.writeln('<link rel="stylesheet" href="http://center.manian.dreamwiz.com/header/css/gonggu.css" type="text/css">')
	} else if (sitename=="esd") {
		document.writeln('<link rel="stylesheet" href="http://center.manian.dreamwiz.com/header/css/esd.css" type="text/css">')
	} else if (sitename=="phone") {
		document.writeln('<link rel="stylesheet" href="http://center.manian.dreamwiz.com/header/css/phone.css" type="text/css">')
    } else {
		document.writeln('<link rel="stylesheet" href="http://center.manian.dreamwiz.com/header/css/manian.css" type="text/css">')
	}		

	document.writeln('</head>')
	document.writeln('<body>')
	
    document.writeln('<div id="bodyWrap">')
    document.writeln('    <div id="logoTopmenu">')
    document.writeln('        <div class="logo"><a href="http://manian.connect.kr/" target="_parent"><img src="http://manian.connect.kr/img/top/logo_home.gif" width="170" height="40" /></a></div>')
    document.writeln('        <div class="menu">')
    document.writeln('            <a href="http://manian.connect.kr/news" target="_parent"><img src="http://manian.connect.kr/img/top/section_news.gif" class="item"  /></a>')
	document.writeln('            <a href="http://manian.connect.kr/hardware" target="_parent"><img src="http://manian.connect.kr/img/top/section_hw.gif" class="item"  /></a>')
    document.writeln('            <a href="http://manian.connect.kr/windows" target="_parent"><img src="http://manian.connect.kr/img/top/section_win.gif" class="item"  /></a>')
    document.writeln('            <a href="http://manian.connect.kr/B0501001" target="_parent"><img src="http://manian.connect.kr/img/top/section_comm.gif" class="item"  /></a>')
    document.writeln('            <a href="http://manian.connect.kr/B0300000" target="_parent"><img src="http://manian.connect.kr/img/top/section_down.gif" class="item"  /></a>')
    document.writeln('            <a href="http://manian.connect.kr/B0601001" target="_parent"><img src="http://manian.connect.kr/img/top/section_shop_on.gif" class="item"  /></a>')
    document.writeln('        </div>')
    document.writeln('        <div class="clear"></div>')
    document.writeln('    </div>')
    document.writeln('    <div id="sectionMenu">')
    document.writeln('        <div class="secTitle">')
	manian_sectitle(sitename)
    document.writeln('        </div>')
    document.writeln('        <div class="secMenu">')
	manian_secmenu(sitename)
    document.writeln('        </div>')
    document.writeln('        <div class="secBlank"></div>')
    document.writeln('        <div class="secRight"></div>')
    document.writeln('        <div class="clear"></div>')	
    document.writeln('    </div>')
    document.writeln('    <div id="loginLocation">')
    document.writeln('        <div class="login">')
	manian_login(sitename)
    document.writeln('        </div>')
    document.writeln('        <div class="location d11_666666">')
    document.writeln('            <a href="http://manian.connect.kr/" target="_parent">È¨</a>')
    manian_location(sitename)
    document.writeln('        </div>')
    document.writeln('        <div class="notice"></div>')
    document.writeln('        <div class="clear"></div>')
    document.writeln('    </div>')
	document.writeln('    <div id="contentBody">')
}

function URLEncode(strURL)
{
	 // The Javascript escape and unescape functions do not correspond
	 // with what browsers actually do...
	 var SAFECHARS = "0123456789" +     // Numeric
		 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic
		 "abcdefghijklmnopqrstuvwxyz" +
		 "-_.!~*'()";     // RFC2396 Mark characters
	 var HEX = "0123456789ABCDEF";
	
	 var plaintext = strURL;
	 var encoded = "";
	 for (var i = 0; i < plaintext.length; i++ ) {
	  var ch = plaintext.charAt(i);
		 if (ch == " ") {
		  encoded += "+";    // x-www-urlencoded, rather than %20
	  } else if (SAFECHARS.indexOf(ch) != -1) {
		  encoded += ch;
	  } else {
		  var charCode = ch.charCodeAt(0);
	   if (charCode > 255) {
		   alert( "Unicode Character '" 
							+ ch 
							+ "' cannot be encoded using standard URL encoding.\n" +
				  "(URL encoding only supports 8-bit characters.)\n" +
			"A space (+) will be substituted." );
		encoded += "+";
	   } else {
		encoded += "%";
		encoded += HEX.charAt((charCode >> 4) & 0xF);
		encoded += HEX.charAt(charCode & 0xF);
	   }
	  }
	 } // for
	
	 return encoded;
};

function manian_login(sitename)
{
	var infou, login_chk, retUrl;
	infou = getCookie("INTIZEN_SID");

	retUrl = document.URL;

	if ((infou == "") || (infou == null))
	{
		login_chk = false;
	}
	else
	{
		login_chk = true;
	}
	
	if (!(login_chk))
	{
		document.writeln('<a href="http://manian.connect.kr/?mid=login&url='+retUrl+'"><img src="http://manian.connect.kr/img/button/btn_top_login.gif" width="65" height="18" /></a><a href="http://user.dreamwiz.com/BIN.INTIZEN/intuser_register_check.cgi?site=manian" target="_blank"><img src="http://manian.connect.kr/img/button/btn_top_signup.gif" width="65" height="18" /></a>')
	}
	else
	{
		document.writeln('<a href="http://login.dreamwiz.com/BIN/logout_intizen.cgi?url='+URLEncode(retUrl)+'"><img src="http://manian.connect.kr/img/button/btn_top_logout.gif" width="65" height="18" /></a><a href="http://manian.connect.kr/?mid=mypage&act=dispMemberInfo"><img src="http://manian.connect.kr/img/button/btn_top_modify.gif" width="65" height="18" /></a>')
	}
}

function manian_footer(sitename)
{
    document.writeln('    </div>')
	document.writeln('    <div class="clear"></div>')
    document.writeln('    <div id="copyright">')
    document.writeln('        <div class="logo"></div>')
    document.writeln('        <div class="menu"><a href="http://manian.connect.kr/company_aboutus" class="d11_666666_2">È¸»ç¼Ò°³</a> | <a href="http://manian.connect.kr/company_termsofuse" class="d11_666666_2">ÀÌ¿ë¾à°ü</a> | <a href="http://manian.connect.kr/company_privacypolicy" class="d11_666666_2">°³ÀÎÁ¤º¸ º¸È£Á¤Ã¥</a> | <a href="http://manian.connect.kr/company_mailreject" class="d11_666666_2">ÀÌ¸ÞÀÏÁÖ¼Ò ¹«´Ü¼öÁý °ÅºÎ</a> | <a href="http://manian.connect.kr/company_cooperation" class="d11_666666_2">Á¦ÈÞ¹®ÀÇ</a> | <a href="http://manian.connect.kr/B0001002" class="d11_666666_2">°í°´¼¾ÅÍ</a><br>copyright (c) 2000-2008 <b>mania<span class="orangeColor">n.com</span></b> all rights reserved.</div>')
    document.writeln('        <div class="familySite">')
    document.writeln('            <select>')
    document.writeln('                <option value="">Family sites</option>')
    document.writeln('                <option value="">MSMania</option>')
    document.writeln('                <option value="">ManianSoft</option>')
    document.writeln('            </select>')
    document.writeln('        </div>')
    document.writeln('        <div class="h10_blank"></div>')
    document.writeln('    </div>')
    document.writeln('</div>')
}

