function tabit2(btn,tabNumber)
{
	var idname = new String(btn.id);
	var s = idname.indexOf("_");
	var e = idname.lastIndexOf("_")+1;
	var tabName = idname.substr(0, s);
	var id = parseInt(idname.substr(e, 1));
	//var tabNumber = btn.parentNode.childNodes.length;
	for(i=0;i<tabNumber;i++){
			document.getElementById(tabName+"_div_"+i).style.display = "none";
			document.getElementById(tabName+"_btn_"+i).className = "";
		};
		document.getElementById(tabName+"_div_"+id).style.display = "block";
		btn.className = "curr";
}
function tabit(btn)
{
    var idname = new String(btn.id);
    var s = idname.indexOf("_");
    var e = idname.lastIndexOf("_")+1;
    var tabName = idname.substr(0, s);
    var id = parseInt(idname.substr(e, 1));
    var tabNumber = btn.parentNode.childNodes.length;    //IE和FF的值不同    
    for(i=0;i<tabNumber;i++)
    {
        if(document.getElementById(tabName+"_div_"+i)!=null)    //这里需要进行判断
       {
        document.getElementById(tabName+"_div_"+i).style.display = "none";
        document.getElementById(tabName+"_btn_"+i).className = "";
        }
    }
    document.getElementById(tabName+"_div_"+id).style.display = "block";
		btn.className = "curr";
}
	 function mainoneSearch(){
    var goType="search";
    var txtKey = document.getElementById("mainonekeyword");
     var radCom=document.getElementById("mainonecompany");
    var radPro=document.getElementById("mainoneproduct");
     var strKey="";
    var forwhat=""; 
    if(txtKey!=null){
        strKey=escape(txtKey.value);
    }
     if(radCom!=null && radCom.checked){
        forwhat="company";
     }else{
        forwhat="product";
     }
    window.open("http://company.search.mainone.com/SearchBarJump.aspx?keyword="+strKey+"&for="+forwhat+"&type="+goType);
 
}	

function mainonethough(){
    var goType="though";
    var txtKey = document.getElementById("mainonekeyword");
     var radCom=document.getElementById("mainonecompany");
    var radPro=document.getElementById("mainoneproduct");
     var strKey="";
    var forwhat=""; 
    if(txtKey!=null){
        strKey=escape(txtKey.value);
    }
     if(radCom!=null && radCom.checked){
        forwhat="company";
     }else{
        forwhat="product";
     }
    window.open("http://company.search.mainone.com/SearchBarJump.aspx?keyword="+strKey+"&for="+forwhat+"&type="+goType);
}
 
