function detectHeader (p) {
	if (is_gecko | is_nav4up | is_opera) 
	{
		var logo = document.getElementById("logo_gecko");
		var mosaic = document.getElementById("mosaic_gecko");
		logo.style.visibility = "inherit";
		mosaic.style.visibility = "inherit";
	}
	else if (is_ie4up)
	{
		var logo = document.getElementById("logo_ie");
		var mosaic = document.getElementById("mosaic_ie");
	
		if(p==1)
		{
			logo.className = "iLogo_Ie_P";
			mosaic.className = "iMosaic_Ie_P";
		}
		else
		{
			logo.className = "iLogo_Ie";
			mosaic.className = "iMosaic_Ie";		
		}
		logo.style.visibility = "inherit";
		mosaic.style.visibility = "inherit";
	}
}
function setLocation(location,titleString) {
	if (location != "none"){
		var p = 0;
		if(location.indexOf("Tab")>0)
			p = 1;

		var menu_td = document.getElementById(location + "_td");
		if(p==1)
		menu_td.className = "tabItem_on tabItem_type tabItemColor_on";
		else
		menu_td.className = "menuLeftItem_on menuLeftItem_type menuLeftItemColor_on";
	}
	if(titleString!="")
	{
		var title = document.getElementById("title");
		if (title == null)
			title = document.getElementById("Title");

		if (title != null)
			title.innerHTML = titleString;
		/*
		var header = document.getElementById("header");
		if (is_gecko | is_nav4up | is_opera | is_ie4up) 
		{
			detectHeader (p);	
		}
		else
			header.src = "../images/header_legacy.jpg";		
		*/
	}
}
function menuDown(location,file) {
	var menu_td = document.getElementById(location + "_td");
	if (menu_td.className != "menuLeftItem_on menuLeftItem_type menuLeftItemColor_on") {	
		if (file=="ourTeam" || file=="ourteam") {
			document.location = "ourteam.aspx";
		}else
		{
			document.location = file;
		}
	}
}
function tabOver(location) {
	var menu_td = document.getElementById(location + "_td");
	if (menu_td.className != "tabItem_on tabItem_type tabItemColor_on") {
		menu_td.className = "tabItem_off tabItem_type tabItemColor_hover";
	}
}
function tabOut(location) {
	var menu_td = document.getElementById(location + "_td");
	if (menu_td.className != "tabItem_on tabItem_type tabItemColor_on") {
		menu_td.className = "tabItem_off tabItem_type tabItemColor_off";
	}
}
function menuOver(location) {
	var menu_td = document.getElementById(location + "_td");
	if (menu_td.className != "menuLeftItem_on menuLeftItem_type menuLeftItemColor_on") {
		menu_td.className = "menuLeftItem_off menuLeftItem_type menuLeftItemColor_hover";
	}
}
function menuOut(location) {
	var menu_td = document.getElementById(location + "_td");
	if (menu_td.className != "menuLeftItem_on menuLeftItem_type menuLeftItemColor_on") {
		menu_td.className = "menuLeftItem_off menuLeftItem_type menuLeftItemColor_off";
	}
}
function rowOver(location) {
	var menu_td = document.getElementById(location);
	if(menu_td!=null)
		if (menu_td.className != "rowItemOff rowItemColor_on") {
			menu_td.className = "rowItemOn rowItemColor_hover";
		}
}
function rowOut(location) {
	var menu_td = document.getElementById(location);
	if(menu_td!=null)
		if (menu_td.className == "rowItemOn rowItemColor_hover") {
			menu_td.className = "rowItemOff rowItemColor_off";
		}
}
function calendarImageOver(location) {
	var menu_td = document.getElementById(location.id);
	if(menu_td!=null)
	{
		menu_td.className = "font_12 padd_4 imageCalendar_Over";
		window.status="Click to select date";
	}
}
function calendarImageOut(location) {
	var menu_td = document.getElementById(location.id);
	if(menu_td!=null)
	{
		menu_td.className = "font_12 padd_4 imageCalendar_Out";
		window.status="";
	}
}
function getexpirydate(nodays)
{
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+nodays*24*60*60*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}
function getcookie(cookiename) 
{
	var cookiestring=""+document.cookie;
	var index1=cookiestring.indexOf(cookiename);
	if (index1==-1 || cookiename=="") return ""; 
	var index2=cookiestring.indexOf(';',index1);
	if (index2==-1) index2=cookiestring.length; 
	return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function setcookie(name,value,duration)
{
	cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
	document.cookie=cookiestring;
	if(!getcookie(name)){
		return false;
	}
	else
	{
		return true;
	}
}
