function openClientLogin()
{
	clientLogin = window.open("http://www.harrisonassessments.com/servlet/HI?ENTITY=CL", "clientLogin", "HEIGHT=600,WIDTH=800,resizable,scrollbars");
}

function openDistributorLogin()
{
	distributorLogin = window.open("http://www.harrisonassessments.com/servlet/HI?ENTITY=DI", "distributorLogin", "HEIGHT=600,WIDTH=800,resizable,scrollbars");
}

function openTalentSolutionsLogin()
{
	ret = window.open("https://ha8.harrisonassessments.com/customer/jobFitLogin.do", "", "HEIGHT=660,WIDTH=1000,scrollbars=yes,resizable=no"); 	
}


var requestSent = false;

function validateAndSubmit()
{
	errorMessage = "";

	if (document.data.NAME.value == "")
	{
		errorMessage = "&#66;&#105;&#116;&#116;&#101;&#32;&#103;&#101;&#98;&#101;&#110;&#32;&#83;&#105;&#101;&#32;&#73;&#104;&#114;&#101;&#110;&#32;&#78;&#97;&#109;&#101;&#110;&#32;&#97;&#110;" + "<br>";
	}

	if (document.data.EMAIL.value == "")
	{
		errorMessage += "&#66;&#105;&#116;&#116;&#101;&#32;&#103;&#101;&#98;&#101;&#110;&#32;&#115;&#105;&#101;&#32;&#73;&#104;&#114;&#101;&#32;&#69;&#109;&#97;&#105;&#108;&#32;&#65;&#100;&#114;&#101;&#115;&#115;&#101;&#32;&#97;&#110;" + "<br>";
	}
	
	if ((document.data.COUNTRY.value == "United States") && (document.data.STATE.value == ""))
	{
		errorMessage += "When in the US, we require you to enter your state so we can best handle your enquiry. Please enter your state." + "<br>";
	}

	if (document.data.COMMENTS.value.indexOf("www") != -1 || document.data.COMMENTS.value.indexOf("http") != -1)
	{
		errorMessage += "&#83;&#105;&#101;&#32;&#107;&#246;&#110;&#110;&#101;&#110;&#32;&#104;&#105;&#101;&#114;&#32;&#107;&#101;&#105;&#110;&#101;&#32;&#85;&#82;&#76;&#39;&#115;&#32;&#101;&#105;&#110;&#116;&#114;&#97;&#103;&#101;&#110;&#32;&#117;&#109;&#32;&#83;&#112;&#97;&#109;&#109;&#101;&#114;&#32;&#97;&#98;&#122;&#117;&#119;&#101;&#104;&#114;&#101;&#110;&#46;&#32;&#83;&#105;&#101;&#32;&#107;&#246;&#110;&#110;&#101;&#110;&#32;&#100;&#105;&#101;&#115;&#32;&#101;&#114;&#115;&#116;&#32;&#100;&#97;&#110;&#110;&#32;&#116;&#117;&#110;&#44;&#32;&#119;&#101;&#110;&#110;&#32;&#83;&#105;&#101;&#32;&#97;&#117;&#102;&#32;&#101;&#105;&#110;&#101;&#32;&#118;&#111;&#110;&#32;&#117;&#110;&#115;&#101;&#114;&#101;&#110;&#32;&#77;&#105;&#116;&#97;&#114;&#98;&#101;&#105;&#116;&#101;&#114;&#110;&#32;&#103;&#101;&#115;&#97;&#110;&#100;&#116;&#101;&#32;&#77;&#97;&#105;&#108;&#32;&#97;&#110;&#116;&#119;&#111;&#114;&#116;&#101;&#110;&#46;";
	}

	if (errorMessage.length > 0)
	{
		generateErrorPage(errorMessage);
		return;
	}

	requestSent = true;
	document.data.submit();
}

function generateErrorPage(errorMessage)
{
	errorWindow = window.open("", "errorWin", "toolbar=no,location=no,scrollbars=yes,HEIGHT=50,WIDTH=350")
	errorWindow.focus();
	errorWindow.document.write("<html><head><title>Error Message<\/title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><\/head><body><table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr align=\"center\" valign=\"middle\"><td>" + errorMessage + "</td></tr></table></body\></html\>");
	errorWindow.document.close()
}


function openWindow(URL)
{
	newWindow = window.open(URL, "newWindow", "fullscreen=yes, scrollbars=auto");
}

function forward(URL)
{
	document.location.href = URL;
}

  	  
  	 
