/***********************************************
* 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
***********************************************/
/*
Name: bookmarksite

In the header area add a javascript include for this javascript file
<script type="text/javascript" src="bookmark.js"></script>	

To execute the bookmark script add the following to your html

javascript:bookmarksite('title_of_site', 'url_of_site')

Example:

<a href="javascript:bookmarksite('title_of_site', 'url_of_site')">Bookmark this site</a>
*/

/* 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);
}
