﻿
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}


//-------------人才招聘---------------
function checkJob()
{
	var strName=$F('mane');	
	var strEdu=$F('studydegree');	
	var strMajor=$F('specialty');
	if(strName=='')
	{
		alert('姓名不能为空');
		return false;
	}
	if(strEdu=='')
	{
		alert('学历不能为空');
		return false;
	}
	if(strMajor=='')
	{
		alert('专业不能为空');	
		return false;
	}
}

/* 产品导航菜单 */
function showsubmenu(sid)
{
whichEl = eval(sid);
if (whichEl.style.display =="none")
{
whichEl.style.display = "";
}
else
{
whichEl.style.display = "none";
}
}

/* 产品订购 */
function eshop(id) { window.open("Prorder.asp?proid="+id,"","height=400,width=640,left=200,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}



 function AddFavorite(sURL, sTitle)
    {
        try
        {
            window.external.addFavorite(sURL, sTitle);
        }
        catch (e)
        {
            try
            {
                window.sidebar.addPanel(sTitle, sURL, "");
            }
            catch (e)
            {
                alert("加入收藏失败，请使用Ctrl+D进行添加");
            }
        }
    }
    function SetHome(obj,vrl)
    {
        try
        {
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                        } 
                        catch (e) { 
                                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'"); 
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
    }


/* -------------------------会员注册-------------- */
function checkreg()
{
	var	strCmpany=$F('Comane');
	var straddr=$F('Add');
	var strman=$F('Somane');
	var strzip=$F('Zip');
	var strphone=$F('Phone');
	if(strCmpany=='')
	{
		alert('公司名称不能为空');	
		return false;
	}
	if(straddr=='')
	{
		alert('收获地址不能为空');	
		return false;
	}
	if(strman=='')
	{
		alert('收货人不能为空');	
		return false;
	}
	if(strzip=='')
	{
		alert('邮政编码不能为空');	
		return false;
	}
	if(strphone=='')
	{
		alert('联系电话不能为空');	
		return false;
	}
}