﻿function showTag( tagBtn, tagBodyId ){
  if( oldTagBtn ){
    oldTagBtn.className = "";
  }
  tagBtn.className = "sel";
  oldTagBtn = tagBtn;
  if( oldTagBody ){
    oldTagBody.style.display = "none";
  }
  var theTagBody = document.getElementById( tagBodyId );
  if( theTagBody ){
    theTagBody.className = "module_body";
    theTagBody.style.display = "";
    oldTagBody = theTagBody;
  }
    return false;
}
function showTag1( tagBtn, tagBodyId, taghref){
  if( oldTagBtn1 ){
    oldTagBtn1.className = "";
  }
  tagBtn.className = "sel";
  oldTagBtn1 = tagBtn;
  if( oldTagBody1 ){
    oldTagBody1.style.display = "none";
  }
  var theTagBody = document.getElementById( tagBodyId );
  if( theTagBody ){
    theTagBody.className = "module_body";
    theTagBody.style.display = "";
    oldTagBody1 = theTagBody;
  }
  var theTagHref = document.getElementById( "tabhref1");
  if(theTagHref){
  	theTagHref.href=taghref;
  }
    return false;
}
function showTag2( tagBtn, tagBodyId, taghref){
  if( oldTagBtn2 ){
    oldTagBtn2.className = "";
  }
  tagBtn.className = "sel";
  oldTagBtn2 = tagBtn;
  if( oldTagBody2 ){
    oldTagBody2.style.display = "none";
  }
  var theTagBody = document.getElementById( tagBodyId );
  if( theTagBody ){
    theTagBody.className = "module_body";
    theTagBody.style.display = "";
    oldTagBody2 = theTagBody;
  }
  var theTagHref = document.getElementById( "tabhref2");
  if(theTagHref){
  	theTagHref.href=taghref;
  }
    return false;
}
function showTag3( tagBtn, tagBodyId, taghref){
  if( oldTagBtn3 ){
    oldTagBtn3.className = "";
  }
  tagBtn.className = "sel";
  oldTagBtn3 = tagBtn;
  if( oldTagBody3 ){
    oldTagBody3.style.display = "none";
  }
  var theTagBody = document.getElementById( tagBodyId );
  if( theTagBody ){
    theTagBody.className = "module_body";
    theTagBody.style.display = "";
    oldTagBody3 = theTagBody;
  }
  var theTagHref = document.getElementById( "tabhref3");
  if(theTagHref){
  	theTagHref.href=taghref;
  }
    return false;
}

function fsubmit(obj){
  obj.submit();
}
function freset(obj){
  obj.reset();
}

function bookmarkit(){
  if (document.all)
  {if (window.external != undefined && window.external != null)
     window.external.addFavorite(window.location.href,'北京材料分析测试服务联盟');
  }
  else if (window.sidebar)
  {
	window.sidebar.addPanel("北京材料分析测试服务联盟", window.location.href,"testbj.com");
  }
  return false;
}

function sethomepage()
{
  if (document.all)
  {
    document.body.style.behavior='url(#default#homepage)';
    document.body.setHomePage(window.location.href);
  }
  else if (window.sidebar)
  {
    if(window.netscape)
    {
      try
      {
        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
      }
      catch (e)
      {
        alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值设置为true");
      }
    }   
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage',window.location.href);
  }
  return false;
}

