(function() {
var hostnamecms = document.location.hostname;

var svcMapcms = {
  'www.tom.com': 1,
  'club.tom.com': 2,
  'blog.tom.com': 3,
  'post.tom.com': 4,
  'ent.tom.com': 5,
  'pic.tom.com': 6,
  'hope.tom.com': 8,
  'photo.tom.com': 9,
  'hjsm.tom.com': 10,
  'test.tom.com': 13,
  'contact.tom.com': 14,
  'zhuanti.club.tom.com': 15,
  'stardoll.tom.com': 18,
  'discovery.tom.com': 19,
  'skype.tom.com': 20,
  'joost.tom.com': 21,
  'nba.tom.com': 22
};
//如果map里没有，则svcid=1
var svcidcms = svcMapcms[hostnamecms] ? svcMapcms[hostnamecms] : 1;

document.write('<style>');
document.write('#tomglobalnav {width:948px;height:59px;margin:0 auto 5px;line-height:26px;font-size:12px;border:1px solid #dadada;color:#333;overflow:hidden;font-family:"宋体";}');
document.write('#tomglobalnav a {color:#333;text-decoration:none;}#tomglobalnav a:hover {color:#f00;text-decoration:underline;}');
document.write('.globaltop {height:28px;border-bottom:2px solid #e7a7a9;background:#fff;}');
document.write('.mainlinks,.sublinks {display:block;float:left;height:26px;padding-top:2px;}');
document.write('.mainlinks a {display:block;float:left;margin-left:-1px;padding:0 10px 0 11px;background:url(http://news.tom.com/images/linkspace.gif) left 7px no-repeat;}');
document.write('.passport,.morelinks {float:right;height:26px;padding:2px 10px 0 0;}.passport form {padding:0;margin:0;}');
document.write('.passport input,.passport span {float:left;margin-right:5px;}.passport input {width:78px;height:18px;padding:0;margin-top:3px;border:1px solid #a5acb2;}');
document.write('.passport input.passsub {width:46px;height:20px;line-height:18px;border:1px solid #b9b9b9;background:url(http://news.tom.com/images/passsub.gif) no-repeat;}');
document.write('.globalbtm {height:28px;padding-left:10px;border-top:1px solid #b50007;background:#f1f1f1;}.globalbtm a {padding:0 6px 0 0;}');
document.write('.morelinks a {display:block;padding-right:8px;background:url(http://news.tom.com/images/morelinks.gif) right 9px no-repeat;}');
document.write('</style>');


var contss = '<div id="tomglobalnav" style="width:958px;">\
	<div class="globaltop">\
		<div class="mainlinks">\
			<a href="http://www.tom.com/" target="_blank">TOM首页</a>\
			<a href="http://news.tom.com/" target="_blank">新闻</a>\
			<a href="http://sports.tom.com/" target="_blank">体育</a>\
			<a href="http://yule.tom.com/" target="_blank">娱乐</a>\
			<a href="http://she.tom.com/" target="_blank">时尚</a>\
			<a href="http://auto.tom.com/" target="_blank">汽车</a>\
			<a href="http://html.hjsm.tom.com/" target="_blank">小说</a>\
			<a href="http://game.tom.com/" target="_blank">网游</a>\
			<a href="http://uhoop.tom.com/" target="_blank">uhoop</a>\
		</div>\
		<div class="passport">\
		<div id="nologin" style="display:none">\
			<form id="loginForm" method="post" action="http://pass.tom.com/dologin.php" onsubmit="return PassUtils.checkLogin();">\
				<span>通行证：</span><input type="text" name="tomid" id="tomid" class="tominput" onfocus="if(this.value==\'输入邮箱\')this.value=\'\';this.style.color=\'black\';" onblur="PassUtils.autoComplete(\'tomid\')" />\
				<span>密码：</span><input type="password" name="tompwd" id="tompwd" class="tominput" onfocus="if(this.value==\'输入密码\')this.value=\'\';this.style.color=\'black\';" />\
				<input type="submit" value="登录" class="passsub" />\
				<input type="hidden" name="issave" value="0" style="margin:0;" />\
				<input type="hidden" name="svcid" value="1" style="margin:0;" />\
				<input type="hidden" name="backurl" id="backurl" value="" style="margin:0;" />\
				<a href="http://pass.tom.com/register.php?svcid='+svcidcms+'&backurl='+encodeURIComponent(document.location.href)+'" target="_bank">立即注册</a>\
			</form>\
		</div>\
		<div id="login" style="display:none">\
			<a id="username" href="http://pass.tom.com/" target="_blank"></a> | \
			<a href="http://post.tom.com/publish_news.php"  target="_blank">发表文章</a> | <a href="http://pass.tom.com/logout.php" onclick="document.location=\'http://pass.tom.com/logout.php?goto=\'+encodeURIComponent(\'\'+document.location.href);return false;">退出</a>\
		</div>\
\
		</div>\
	</div>\
\
	<div class="globalbtm">\
		<div class="sublinks">\
			<a href="http://club.tom.com/" target="_blank">社区</a>-\
			<a href="http://zhazha.tom.com/" target="_blank">喳喳</a>-\
			<a href="http://a8.yule.tom.com/" target="_blank">玩乐吧</a>-\
			<a href="http://skype.tom.com/" target="_blank">skype</a>-\
			<a href="http://stardoll.tom.com/" target="_blank">stardoll</a>-\
			<a href="http://life.news.tom.com/" target="_blank">生活</a>-\
			<a href="http://dushu.tom.com/" target="_blank">读书</a>-\
			<a href="http://alive.tom.com/" target="_blank">alive</a>-\
			<a href="http://photo.tom.com/" target="_blank">相册</a>-\
			<a href="http://shawei.tom.com/" target="_blank">鲨威</a>-\
			<a href="http://music.yule.tom.com/" target="_blank">音乐</a>-\
			<a href="http://test.tom.com/" target="_blank">测试</a>-\
			<a href="http://study.uhoop.tom.com/" target="_blank">培训教室</a>-\
			<a href="http://story.news.tom.com/" target="_blank">故事</a>-\
			<a href="http://discovery.tom.com/" target="_blank">探索</a>-\
			<a href="http://nba.tom.com/" target="_blank">NBA</a>-\
			<a href="http://www.yxnpc.com/" target="_blank">游戏</a>-\
			<a href="http://dgbest.tom.com/" target="_blank">DGBest数码</a>\
		</div>\
		<div class="morelinks"><a href="http://nav2.tom.com/sitemap.html" target="_blank">更多</a></div>\
	</div>\
</div>';

document.write(contss);
})();
