function SelectThisStyle(objThis)
{
	if ((objThis.className == "MenuTDNoTopNoBottom")||(objThis.className == "MenuTDNoTop"))
	{
	objThis.oldClass = objThis.className;
	objThis.className = "MenuTDIsSelected";
	objThis.cursor = "pointer";
	objThis.title  = "Select This Camp Area";
	objThis.toolTip  = "Select This Camp Area";
	
	}
}

function UnSelectThisStyle(objThis)
{
	if (objThis.className == "MenuTDIsSelected")
	objThis.className = objThis.oldClass;
	objThis.cursor = "default";
}

function ChangeSearchPage(objThis)
{
	var tdID = objThis.id;
	var g_UnSecureUrl = document.forms[0].LeftMenu1_hidUnSecureUrl.value;
    var g_SecureUrl = document.forms[0].LeftMenu1_hidSecureUrl.value;

	switch(tdID)
	{
		case "TDHome":
			location.replace(g_UnSecureUrl + "Default.aspx?main=1");
		break;
		
		case "TDRegion":
			location.replace(g_UnSecureUrl + "SearchRegion.aspx");
		break;
		
		case "TDAmenity":
			location.replace(g_UnSecureUrl + "SearchAmenity.aspx?reg=0");
		break;
		
		case "TDPark":
			location.replace(g_UnSecureUrl + "Searchpark.aspx");
		break;
		case "TDPass":
			location.replace(g_UnSecureUrl + "ParkPasses.aspx");
			break;
		case "TDMerchandise":
			location.replace(g_UnSecureUrl + "AddRetail.aspx");	
		break;
		default:
			location.replace(g_UnSecureUrl + "Default.aspx");
		break;
	}
}

function CheckedItemInList(objThis)
{
	objThis.className = "CheckedItemInList";
}

function HighLight(objThis)
{
	objThis.className = "GrayRow";
}
function UnHighLight(objThis)
{
	objThis.className = '';
}

function FocusOnTagOfType(typeofFormElem, pos)
{
	var arrFormsCollection = document.getElementsByTagName(typeofFormElem);
	if(arrFormsCollection.length > parseInt(pos))
	{
		arrFormsCollection[pos].focus();
	}
	
}
function testCookies() { 
	 var exp = new Date(); 
	 exp.setTime(exp.getTime() + 1800000); 
	 // first write a test cookie 
	 setCookie("cookies", "cookies", exp, false, false, false); 
	 if (document.cookie.indexOf('cookies') != -1) 
	 { 	 
		return true; 
	 } 
	 else 
	 { 
		return false;
	 } 
	 // now delete the test cookie 
	  exp = new Date(); 
	  exp.setTime(exp.getTime() - 1800000); 
	  setCookie("cookies", "cookies", exp, false, false, false); 
	 }
	
	function setCookie(name, value, expires, path, domain, secure) { 
	 var curCookie = name + "=" + escape(value) + 
		((expires) ? "; expires=" + expires.toGMTString() : "") + 
		((path) ? "; path=" + path : "") + 
		((domain) ? "; domain=" + domain : "") + 
		((secure) ? "; secure" : ""); 
	 document.cookie = curCookie; 
	}
	
	function EnterDisabled(ev, OkElementName)
	{
	    var target=ev.target||ev.srcElement;
	    if(target.id == OkElementName)
	    {
	        if('returnValue' in ev)
	        {
	            ev.returnValue=true;
	        }
	    }
	    else
	    {
	        if(ev.preventDefault)
	        {
	            ev.preventDefault();
	        } 
	        else 
	        {
	            ev.returnValue=false;
	        }
	    }
		return ev;
    }
