/*

	Author:
		JPE
		Mycroft
	
	Created:
		20060711
		
	Description:
		This routine will add the Planetizen firefox search plug-in to
		sherlock support browsers (like Firefox, Mozilla, etc).
		
		This script is based on Mycroft's original:
		http://mycroft.mozdev.org/default.js
		
		The Planetizen search plug-in was submitted on 20060711 under AC's
		email and name.
		
		Simply call this function from a link to give the user an easy way to 
		add the plug-in.  
	
		Installation:
		1. Put this line in between the head tags:
		<script language="JavaScript" src="/files/searchplugin/planetizen.js" />
		2. Put this line where you want the ADD SEARCH ENGINE link:
		<a href="#" onclick="addSearchEngine();return false">Add Search Plug-In</a>
		
	Dependencies:
		Planetizen search plug-in

*/

function addSearchEngine()
{
	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
		window.sidebar.addSearchEngine(
		"http://mycroft.mozdev.org/install.php/" + 11280 + "/planetizen.src",
		"http://mycroft.mozdev.org/install.php/" + 11280 + "/planetizen.png", "planetizen", "News" );
	} else {
		alert("Sorry, you will need a browser which supports Sherlock to install this plugin, like Mozilla Firefox.");
	}
}
