// JavaScript Document

function showbio(id){
fineline=eval(win2=window.open("bio.asp?id="+id,"","width=550,height=400,scrollbars=1"))
width=(screen.width/2)-275
height=(screen.height/2)-200
fineline.window.moveTo(width,height)
win2.creator=self
}
function ShowTransientMessage() {
	window.status="Please wait while loading data...";
//	DisplayMessageBox.innerText=sMessage;
	DisplayMessageBox.style.display='';
	DisplayMessageBox.style.pixelTop=(document.body.clientHeight/2)-(DisplayMessageBox.offsetHeight/2)+(document.body.scrollTop);
	DisplayMessageBox.style.pixelLeft=(document.body.clientWidth/2)-(DisplayMessageBox.offsetWidth/2)+(document.body.scrollLeft);
}

function HideTransientMessage() {
	window.status="";
	DisplayMessageBox.style.display='none';
}
//*****************************************************************************************
function checkFields() {
missinginfo = "";
if ((document.enroll.login.value == "") || 
(document.enroll.login.value.indexOf('@') == -1) || 
(document.enroll.login.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email address";
}
if ((document.enroll.confirmEmail.value == "") || 
(document.enroll.confirmEmail.value.indexOf('@') == -1) || 
(document.enroll.confirmEmail.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Confirm Email address";
}
var a=document.enroll.login.value;
var b=document.enroll.confirmEmail.value;
if (a != b) {
missinginfo += "\n     -  Check the spelling of your email address";
}
if (document.enroll.firstname.value == "") {
missinginfo += "\n     -  First Name";
}

if (document.enroll.lastname.value == "") {
missinginfo += "\n     -  Last Name";
}

if (document.enroll.adr1.value == "") {
missinginfo += "\n     -  Street Address";
}

if (document.enroll.city.value == "") {
missinginfo += "\n     -  City";
}

if (document.enroll.state.value == "") {
missinginfo += "\n     -  State";
}

if (document.enroll.zip.value == "") {
missinginfo += "\n     -  Zip Code";
}

if (document.enroll.agecheck.checked == false) {
missinginfo += "\n     -  Please verify your age";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}

function freeEmail(){
message="";
if ((document.enroll.login.value.indexOf('@aim.') != -1) || 
(document.enroll.login.value.indexOf('@hotmail.') != -1) ||	
(document.enroll.login.value.indexOf('@lycos.') != -1) ||
(document.enroll.login.value.indexOf('@yahoo.') != -1)) {
message += "\n     Please try not to use a free email provider\n" +
			"such as yahoo, hotmail, etc. Free email hosts often\n" +
			"filter important emails into a separate inbox or may\n" +
			"even delete incoming email without your knowledge.\n" +
			"By using your main email address (whether your\n" +
			"personal or your business email), you can help ensure\n" +
			"that you receive important information, including\n" +
			"confirmation emails and receipts that are sent after\n" +
			"you place orders, service requests, update your\n" +
			"personal profile, or change your password.";
}
if (message != "") {
message = "__________________________________________\n" +
message + "\n__________________________________________";
alert(message);
}
}
function chkCountry()
{
	var country = document.getElementById("country");
	var stateBox = document.getElementById("state");
	var stateText = document.getElementById("stateText");
	
	if (country.value=="United States" || country.value=="USA")
	{
		//activate state box if de-active
		if (stateBox.disabled==true)
		{
			stateBox.disabled=false;
		}
		//change stateText to "State"
		if (document.all)
		{
			stateText.innerHTML="State";
		} else {
			stateText.textContent="State";
		}		
	}
	else if (country.value=="Canada")
	{
		//activate state box if de-active
		if (stateBox.disabled==true)
		{
			stateBox.disabled=false;
		}
		//change stateText to "Province"
		if (document.all)
		{
			stateText.innerHTML="Province";
		} else {
			stateText.textContent="Province";
		}	
	}
	else
	{
		//not US or Canada, so de-activate state box
		if (stateBox.disabled==false)
		{
			stateBox.disabled=true;
		}
		//empty stateText
		if (document.all)
		{
			stateText.innerHTML="";
		} else {
			stateText.textContent="";
		}	
	}
}