function Validator(theForm)
{
	if (theForm.firstname.value == "" || theForm.firstname.value == "First name")
	{
		alert("Please enter a proper value for the \"First Name\" field.");
		theForm.firstname.focus();
		return (false);
	}
	if (theForm.lastname.value == "" || theForm.lastname.value == "Last name")
	{
		alert("Please enter a proper value for the \"Last Name\" field.");
		theForm.lastname.focus();
		return (false);
	}
	if (theForm.email.value == "" || theForm.email.value.indexOf ('@', 0) == -1)
	{
		alert("Please enter proper value for the \"Email Address\" field.");
		theForm.email.focus();
		return (false);
	}
	if (theForm.email.value.length < 5)
	{
		alert("Please enter proper value for the \"Email Address\" field.");
		theForm.email.focus();
		return (false);
	}
	if (theForm.email.value.length > 80)
	{
		alert("Please enter proper value for the \"Email Address\" field.");
		theForm.email.focus();
		return (false);
	}
	return (true);
}

function doFocus(id, str) {
	var elem = document.getElementById(id);
	if (elem.value == str) {
		elem.value = ""
    }
}

function doBlur(id, str) {
	var elem = document.getElementById(id);
	if (elem.value == "") {
		elem.value = str
	}
}

function DoPopCommunity() {
	document.write("<div id='panelJoin' onClick='quickhide(\"panelJoin\"); quickhide(\"dialogJoin\")' style='display:none;' ></div>");
	document.write("<div id='horizonJoin'><div id='dialogJoin' style='display:none; background-image:url(/images/newsletter/newsletterbox.jpg);padding:10px 20px 10px 40px;text-align:left;'>");
	document.write("<form action='/newsletter/thankyou.asp' method='post' name='Form1' id='Form1' style='margin:242px 0 0 7px;padding:0;text-align:left;' onSubmit='return Validator(this)'>");
    document.write("<input name='firstname' type='text' id='firstname' style='margin:1px 0 6px 0;padding-left:3px;width:200px;font-size:11px;' onFocus='doFocus(\"firstname\", \"First name\")' onBlur='doBlur(\"firstname\", \"First name\")' value='First name' size='20' class='frm-req'  ><br />");
    document.write("<input name='lastname' type='text' id='lastname' style='margin:1px  0 6px 0;padding-left:3px;width:200px;font-size:11px;' onFocus='doFocus(\"lastname\", \"Last name\")' onBlur='doBlur(\"lastname\", \"Last name\")' value='Last name' size='20' class='frm-req' ><br />");		   
	document.write("<input name='email' type='text' id='email' style='margin:1px  0 6px 0;padding-left:3px;width:200px;font-size:11px;' onFocus='doFocus(\"email\", \"Your email address\")' onBlur='doBlur(\"email\", \"Your email address\")' value='Your email address' size='20' class='frm-req' ><br />");
	document.write("<input type='hidden' name='message' value='Thank you. Your information has been submitted. To ensure delivery of your newsletter(s), please add newsletter@unibluenews.com to your address book, spam filter whitelist, or tell your companys IT group to allow this address to pass through any filtering software they may have set up.'>"); 
	document.write("<input name='SubmitBullsEye' type='image' src='/images/newsletter/newsletterbox_register.gif' alt='Sign up now' align='middle' style='margin:15px 0 0 0;padding:0;border:0;' />");
	document.write("</form>");
	document.write("<div style='margin:20px 0 0 0;display:block;width:100%;height:80px;cursor:pointer' onClick='quickhide(\"panelJoin\"); quickhide(\"dialogJoin\")'></div>");
	document.write("</div></div>");
}