// JavaScript Document
function topMenu(topMenuWidth,siteName,siteUrl){
	/*参数说明
	siteName：站点名称（添加收藏用），无指定情况下，默认取当前页面的TITLE值作为名称
	siteUrl：站点URL地址（设为首页，添加收藏用），无指定情况下，默认取当前页面的URL地址值作为地址
	*/
	
	var homePage = (siteUrl == null || siteUrl == "") ? window.location.href : siteUrl;
	var homeName = (siteName == null || siteName == "") ? document.getElementsByTagName("title")[0].innerHTML : siteName;
	var topWidth = (topMenuWidth == null || topMenuWidth == "") ? -1 : topMenuWidth;
	homePage = (siteUrl == null || siteUrl == "") ? "http://hr.tpv.cn/":"http://hr.tpv.cn/";


	document.write('<style type="text/css"><!--');
	document.write('body { margin: 0 auto; text-align:center;}');
	document.write('#topnavbg *{ margin:0; padding:0; border:0; font:12px "宋体"; color:#333;}');
	document.write('#topnavbg ul,li{ list-style:none; margin:0; padding: 0;}');
	document.write('#topnavbg { margin:0 auto;text-align:center;height:60px;');
	if (topWidth != -1) document.write('width:'+topWidth+'px;');
	document.write('background: url(img/menubg1600.gif) center top no-repeat;}');
	document.write('#topnav {position: relative;margin:0 auto;width:1002px;height:60px;background: url(img/menu.gif) no-repeat;}');
	document.write('#topnav a{	text-decoration:none;}');
	document.write('#topnav a:hover{ text-decoration:underline;}');
	document.write('#topnav_l{float:left;padding-left:20px;}');
	document.write('#topnav_r{float:right;width:440px; height:60px;z-index:100;}');
	document.write('#topnavmenu_r1{ text-align:left;padding:3px 0 0 95px; height:17px;}');
	document.write('#topnavmenu_r1 li{ display:inline; width:50px; margin-left:40px; }');
	document.write('#topnavmenu_r1 a{ color:#eee;}');
	document.write('#topnavmenu_r2 {padding:20px 0 0 0; height:20px; float:left;}');
	document.write('#topnavmenu_r2 li{background:url(img/menuico1.gif) no-repeat;padding:0 15px 0 13px;display:inline;}');
	document.write('#topnavmenu_r2 a{ color:#333;}');
	document.write('#topnavlanbtn {padding-top:10px;width:78px; height:28px; float:left;}');
	document.write('#topnavlan {z-index:9999;position: absolute;top:60px;right:35px;display:none; padding:0 0 3px 0;text-align:center;width:99px;  background-color: aliceblue;}');
	document.write('#topnavlan a{ color:#333; text-decoration:none;}');
	document.write('#topnavlan a:hover{ text-decoration:underline;}');
	document.write('#topnavlan li{ padding-top:3px;}');
	document.write('--></style>');
	document.write('<div  style=" background-color:#F0F0F0;">');
	document.write('<div id="topnavbg">');
	document.write('<div id="topnav">');
	document.write('<div id="topnav_l"><a href="http://hr.tpv.cn/"><img src="img/tpvlog1.gif" alt="冠捷科技集团" title="冠捷科技集团" /></a></div>');
	document.write('<div id="topnav_r">');
	document.write('<div id="topnavmenu_r1">');
	document.write('<ul>');
	document.write('<li><a href="javascript:;" onclick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\''+ homePage + '\');">设为首页</a></li>');
	document.write('<li><a href="javascript:;" id="myAddPanel">加入收藏</a></li>');
	document.write('<li><a href="http://hr.tpv.cn/" target="_blank">站点地图</a></li>');
	document.write('</ul>');
	document.write('</div>');
	document.write('<div id="topnavmenu_r2">');
	document.write('<ul>');
	document.write('<li><a href="http://www.envision.cn/" target="_blank">产品介绍</a></li>');
	document.write('<li><a href="http://www.aoc.com/intro%20flash.htm" target="_blank">集团站点</a></li>');
	document.write('<li><a href="http://www.tpv-tech.com/" target="_blank">投资者关系</a></li>');
	document.write('<li><a href="http://hr.tpv.cn/" target="_blank">人才招聘</a></li>'); 
	document.write('</ul>');
	document.write('</div>');
	document.write('<div id="topnavlanbtn"><a href="javascript:;" onclick="document.getElementById(\'topnavlan\').style.display=\'block\';"><img src="img/menu_lan2.gif" alt="language" title="选择冠捷集团网站其它语言版本" /></a></div>');
	document.write('<div id="topnavlan" onmouseover="style.display=\'block\';" onmouseout="style.display=\'none\';">');
	document.write('<ul>');
	document.write('<li><a href="http://www.aocmonitor.com.cn/" target="_blank">简体中文</a></li>');
	document.write('<li><a href="http://www.aocmonitorap.com/taiwan_bchinese/index.php" target="_blank">繁体中文</a></li>');
	document.write('<li><a href="http://us.aoc.com/" target="_blank">English</a></li>'); 
	document.write('<!--li>Union Europea</li-->');
	document.write('</ul>');
	document.write('</div>');
	document.write('<div style="clear:both;"></div>');
	document.write('</div>');	
	document.write('<div style="clear:both;"></div>');
	document.write('</div>');
	document.writeln('</div>');
    document.writeln('</div>');    
    document.writeln('<div   style=" height:10px"><script src="http://s17.cnzz.com/stat.php?id=2427119&web_id=2427119" language="JavaScript"></script></div>');    
	document.getElementById("myAddPanel").onclick = function(){myAddPanel(homeName,homePage);} 
}

//添加
function myAddPanel(homeName,homePage){
	       if ( window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof(window.sidebar.addPanel) )

       {               //  firefox
               window.sidebar.addPanel(homeName,homePage,"");       }

       else if ( document.all && "object" == typeof( window.external ) )

       {               //  ie
             	 window.external.AddFavorite(homePage,homeName);       }
		
}

function Focus(obj){
    if(obj.value=="输入专业关键字"){
        obj.className=""; 
        obj.value="";
    }
}
function Blur(obj){
    if(obj.value.trim()==""){
        obj.className="null";  
        obj.value="输入专业关键字";
    }
}


function checkNum(obj){
    var gotopage=parseInt(obj.value);
    var pattern=/^\d*$/;
    if(!pattern.test(obj.value)){
        alert("非法页码。");
        obj.focus();
        obj.select();
	    return false;
    }
    var ttlPage = parseInt(document.getElementById("lblPageCount2").innerText);
    if((gotopage<=0)||(gotopage>ttlPage)){
        alert("页码越界。");
        obj.focus();
        obj.select();
	    return false;
    }
    return true;
}























