// All browser Favorite / Bookmark script
 
function addFavorite(title,url){
if(window.sidebar){
window.sidebar.addPanel(title, url, "");
} else if(document.all){
window.external.AddFavorite(url, title);
} else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} else if(window.chrome){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
} else if(mac){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
}

} 

// set Homepage script
function setHomepage()
{
if (document.all)
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.thebest-insurance.com');

}
else if (window.sidebar)
{
if(window.netscape)
{
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch(e)
{
	alert("From the address bar; drag the 'Home icon' onto the 'home' button on your web browser. The message below should appear, click 'Yes' and your homepage should now be Givle. That's it!");
	
/*alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");*/
}
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage','http://www.thebest-insurance.com');
}
}





