var js_service_unique_id=0;

function browserIsIE()
{
	return navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
}

function browserIsFireFox()
{
	return navigator.userAgent.toLowerCase().indexOf("firefox")!=-1;
}

function myConfirm(evt,message)
{
	if(browserIsIE())
	{
		if (confirm(message)==false) window.event.returnValue=false;
		return false;
	}
	else
	{
		if (confirm(message)==false) evt.preventDefault();
		return false;
	}
	return true;
}
function getUniqueId()
{
	js_service_unique_id++;
	return js_service_unique_id;
}

function preventAction(evt)
{
	if(browserIsIE()) window.event.returnValue=false;
	else evt.preventDefault();
}

function getWindowHeight()
{
	if(browserIsFireFox())windowHeight=window.innerHeight;
	else windowHeight=document.body.offsetHeight;
	return windowHeight;
}

function getSiteUrl()
{
	url_str=new String(window.location);
	t=url_str.split("/");
	site_url='';
	for(si=0;si<t.length-1;si++)
		site_url+=t[si]+"/";
	return(site_url);
}

function getWindowWidth(){
	if(browserIsFireFox())windowWidth=window.innerWidth
	else windowWidth=document.body.offsetWidth;
	return windowWidth;
}

Array.prototype.search = function(key){
	for(i=0;i<this.length;i++){
		if (this[i]==key){
			return(i);
		}
	}
	return(-1);
}