


function quicknav(url) {
	window.location.href=url;   
}

function checkUser(myVal){

var top=((screen.height-600) / 2);
var left=((screen.width-600) / 2);

	//alert(myVal);	
	var win;
	win=window.open("cookiecheck.cfm?information="+myVal,'self','Width=600,Height=600,dependent=yes,resizable=yes,status=no,location=no,top='+top+',left='+left+',scrollbars=yes');
	win.focus();
	
}
function TrimData(ctrl)
{

	OneChar = ctrl.value.substr( ctrl.value.length-1,1);
	while(OneChar == ' ')
	{
		ctrl.value = ctrl.value.substr(0, ctrl.value.length-1) ;
		OneChar = ctrl.value.substr(ctrl.value.length-1,1);
	}
    if (ctrl.value == ' '){ctrl.value = '';}
}

function butClick(myVal)
{
        if (Check())
        {
				document.usercreatefrom.submit();
				return true;
        }
		return false;
}

function Check(){	
	if (document.usercreatefrom.Title.value == "Please") {
		alert("Please select the title");
		document.usercreatefrom.Title.focus();
		return false;	    
	}
	else if (document.usercreatefrom.FirstName.value == "") {
		alert("Please enter a valid First Name");
		document.usercreatefrom.FirstName.focus();
		return false;	    
	}
	else if (document.usercreatefrom.LastName.value == "") {
		alert("Please enter a valid Last Name");
		document.usercreatefrom.LastName.focus();
		return false;	    
	}
	else if (document.usercreatefrom.EmailAddress.value == "") {
		alert("Please enter a valid Email Address");
		document.usercreatefrom.EmailAddress.focus();
		return false;	    
	}
	else if (document.usercreatefrom.EmailAddress.value == "") {
		alert("Please enter a valid Email Address");
		document.usercreatefrom.EmailAddress.focus();
		return false;	    
	}

	else if (document.usercreatefrom.CompanyAddress.value == "") {
		alert("Please enter a valid Company Address");
		document.usercreatefrom.CompanyAddress.focus();
		return false;	    
	}
	else if (document.usercreatefrom.PhoneNumber.value == "") {
		alert("Please enter a valid Phone Number");
		document.usercreatefrom.PhoneNumber.focus();
		return false;	    
	}
	
	else if (document.usercreatefrom.Reason.value == "Please") {
		alert("Please select a valid reason");
		document.usercreatefrom.Reason.focus();
		return false;	    
	}
	else if (document.usercreatefrom.Reason.value == "Other") {
		if(document.usercreatefrom.Other.value==""){
			alert("Please enter a valid other reason");
			document.usercreatefrom.Other.focus();
			return false;
		}
	}
	return true;
}

function checkmore() {
    document.usercreatefrom.MoreInfo.value="1";
	return false;
}
function goToURL(url) {

	var top=((screen.height-500) / 2);
	var left=((screen.width-600) / 2);
   	var winopen;	winopen=window.open(url,'self','Width=600,Height=500,dependent=yes,resizable=yes,status=yes,location=yes,toolbar=yes,top='+top+',left='+left+',scrollbars=yes');
	winopen.focus();
}

function deletevalue(){
	if(document.contact.contactID.value != ''){	
		if (!confirm("Do you want to delete this Record ?")){
			return false;
		}
		window.document.contact.submit();
		return true;		
		}
	else{
	alert("Please select a Record to delete");
	}
}

function CheckCookiesEnabled()        
{			
		SetCookie('varCook','True','','/','','');
		if (GetCookie() == "True"){
			//alert('Cookies are enabled and you can properly use this website!');
			return true;
		} else {		
   			return false;	
   		}		
}    
function GetCookie() {
		var strName = "varCook";
		if (document.cookie.indexOf(strName) == -1)
		{
   			alert("Cookies ARE NOT currently enabled!\nJavaScript and Browser Cookies must be enabled for certain website functionality to work properly.");
   			return false;
		}
		else
		{
		cookieStart = document.cookie.indexOf(strName);
		cookieValStart = (document.cookie.indexOf("=", cookieStart) + 1);
		cookieValEnd = document.cookie.indexOf(";", cookieStart);
		if (cookieValEnd == -1)
			{
			cookieValEnd = document.cookie.length;
			}
		cookieValue = document.cookie.substring(cookieValStart, cookieValEnd);
		}
		if (cookieValue = "True")
		{
			return ("True");
		}
	}


	function SetCookie(name,value,expires,path,domain,secure)
	{
		var strDNS = GetDNS();
	    	document.cookie = name + "=" +escape(value) +
	        ( (expires) ? ";expires=" + expires.toGMTString() + 1000*60*20 : "") +
        	( (path) ? ";path=" + path : "") +
	        //( (domain) ? ";domain=" + domain : "") +
        	( (domain) ? ";domain=" + strDNS : "") +
	        ( (secure) ? ";secure" : "");
		    return true
	}


	function GetDNS()
	{
		cookieDomain = document.location.hostname;
	}

	