/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
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(document.all) {// ie
	window.external.AddFavorite(url, title);
}
 else if(window.opera && window.print){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
} 
else if(window.chrome){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
}
}

function setHomepage()
{
if (document.all)
{
document.body.style.behavior = 'url(#default#homepage)';
document.body.setHomePage('http://www.bearingbazaar.com');
}
else if (window.sidebar)
{
if (window.netscape)
{
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch(e)
{
alert("This action was avoided by your browser.  If you would like to enable this feature, please enter about:config in your browser 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.bearingbazaar.com');
alert("BearingBazaar.com Successfully added as your default HomePage");
}
 else if(window.opera && window.print){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
} 
else if(window.chrome){
alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
}
else
	 alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok');
}

