function addBookmark(title, url){
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "");
}

function addEngine(){
    if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
    {
        window.sidebar.addSearchEngine(
            "http://www.searchkindly.org/searchkindly.src", 
            "http://www.searchkindly.org/searchkindly.png",
            "SearchKindly.org",
            "Web" );
    }
    else
    {
        alert("Mozilla M15 or later is required to add a search engine.");
    }
}

function addEngineOpen(url) {
	try {
		window.external.AddSearchProvider(url);
	} catch (e) {
		alert("You need to be using IE7 or Firefox to add a search engine.");
		return;
	}
}


function updateAction(searchtype)
{
	document.searchselect.actionselect.value = searchtype ;
	document.searchselect.submit() ;
}

function jumpMenu()
{
	var dd = document.findit.findtag.value;
	window.location.href = dd;
}

function setmaxlength(txt)
{
	var txtlength = txt.getAttribute ? parseInt(txt.getAttribute("maxlength")) : "";

	if (txt.getAttribute && txt.value.length > txtlength)
	{
		txt.value = txt.value.substring(0,txtlength)
	}
}

function textAreaCount(txt,counter,txtlength)
{
	cnt = document.getElementById(counter);

	if (txt.value.length > txtlength)
	{
		txt.value = txt.value.substring(0, txtlength);
	}
	else
	{
		cnt.innerHTML = txtlength - txt.value.length;
	}
}
