//Add Bookmark
function MakeFirstHomePage( urllink )
{
	if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage( urllink );
    }
    else if (window.sidebar)
    {
		if(window.netscape)
		{
			try
			{  
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			}  
			catch(e)  
			{  
				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', urllink );
	}
}

function addbookmark(url,desc){

	var nonie = 'Sorry, only Internet Explorer supports this method to add a bookmark/favorite\n But please feel free to visit the site\'s home page to add a bookmark manually';

	if(!url && !desc){
		var bookmarkurl		= "http://www.camarosource.ca";
		var bookmarktitle	= "Camarosource.ca - Internet's Largest All Year Camaro Resource Site";
	}else{
		var bookmarkurl		= url;
		var bookmarktitle	= desc;
	}
	

	if (window.sidebar) 
	{ // Mozilla Firefox Bookmark
//		alert('Due to security restrictions placed in Firefox, we are unable to automatically add a bookmark.\nPlease navigate to the home page and press: CTRL+D to add us manually.');
         window.sidebar.addPanel( bookmarktitle, bookmarkurl,"");
	}
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',bookmarkurl );
		elem.setAttribute('title',bookmarktitle );
		elem.setAttribute('rel','sidebar');
		elem.click();
	}else if(document.all){ // IE Favourites
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
	} 
}

