function AddFavorite(sURL, sTitle)
{
  
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf("msie 8")>-1){
external.AddToFavoritesBar(sURL,sTitle,'');//IE8
}else{
try {
window.external.addFavorite(sURL, sTitle);
} catch(e) {
try {
window.sidebar.addPanel(sTitle, sURL, "");//firefox
} 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("此操作被浏览器拒绝！请在浏览器地址栏输入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",vrl);
      }
  }
}

//转到培训网的地址加前辍 isPop是否弹出 subURL子链接用于会员中心 如
//一般样式：<a href="javascript:toEdu('',false);" >sdfdfa</a>
//会员中心样式：<a href="javascript:toEdu('',false,'');" >sdfdfa</a>

function toEdu(eduURL,isPop,subURL){
  var rURL = "/bicpa" + eduURL;
  if(subURL){
    rURL = rURL + "?framsrc=/bicpa" + subURL;
  }
  if(isPop){
    window.open(rURL) 
  }else{
    self.location = rURL;
  }
}

