/*
Copyright 2003, Active Media Architects - www.activema.com
Usage of these scripts is limited to their original intent as developed and deployed for ccdresellers.com by Active Media Architects. Copying, selling or distributing of these scripts, in whole or in part, is strictly prohibited. Changing these scripts by anyone other than Active Media Architects  will void any and all warranties, guarantees, promises, etc., whether communicated in writing, in person, electronically, or by any other means, made by Active Media Architects.
*/



	///////////////////////////////////////
	// Frame Buster
	///////////////////////////////////////

if (window != window.top)
  top.location.href = location.href;


	///////////////////////////////////////
	// Row-Over Effect
	///////////////////////////////////////

	function mouseOverWhite(i) {
		i.style.backgroundColor='#F2F2F2';
	}
	function mouseOutWhite(i) {
		i.style.backgroundColor='#FFFFFF';
	}
	
	function mouseOverGray(i) {
		i.style.backgroundColor='#F2F2F2';
	}
	function mouseOutGray(i) {
		i.style.backgroundColor='#F2F2F2';
	}
	


	///////////////////////////////////////
	// On-Click-Pop-Center
	///////////////////////////////////////
	// Requires "onClick="NewWindow(this.href,'title','400','300','no');return false;"" in the A HREF tag
	// Example: <a href="doc.html" onClick="NewWindow(this.href,'title','400','300','no');return false;">LINK</a>

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}




	///////////////////////////////////////
	// Auto-Select Field
	///////////////////////////////////////
	// Requires "onLoad=ready()" in the BODY tag
	// Example: <body onLoad=ready()>
	// Requires form name to match where it reads "form" in script
	// Example: <form name="form">
	// Requires form field name to match where it reads "field" in script
	// Example: <input name="field">

function ready(){document.form.field.focus();}


	///////////////////////////////////////
	// Form Validation
	///////////////////////////////////////


function validateStart(form) {
	return (
				 checkSelect(form.elements["userid"],"V","","Please enter your User ID.",false) &&
				 checkSelect(form.elements["passwd"],"V","","Please enter your Temporary Password.",false) &&
				 checkSelect(form.elements["newpass1"],"V","","Please enter a New Password.",false) &&
				 checkSelect(form.elements["newpass2"],"V","","Please enter the New Password again.",false));
}

function validateLogin(form) {
	return (
				 checkSelect(form.elements["userid"],"V","","Please enter your User ID.",false) &&
				 checkSelect(form.elements["passwd"],"V","","Please enter your Password.",false));
}


function validateReset(form) {
	return (
				 checkEmail(form.elements["email"],false) &&
				 checkSelect(form.elements["email"],"V","joe@example.com","Please supply valid E-mail Address.",false));
}


function validateJoinFirstHalf(form) {
	return (
				 checkString(form.elements["firstname"],sUSFirstName,false) &&
				 checkString(form.elements["lastname"],sUSLastName,false) &&
				 checkEmail(form.elements["email"],false) &&
				 checkSelect(form.elements["email"],"V","joe@example.com","Please supply valid E-mail Address.",false));
}


function validateJoin(form) {
	return (
				 checkString(form.elements["firstname"],sUSFirstName,false) &&
				 checkString(form.elements["lastname"],sUSLastName,false) &&
				 checkEmail(form.elements["email"],false) &&
				 checkSelect(form.elements["email"],"V","joe@example.com","Please supply valid E-mail Address.",false) &&
				 checkUSPhone(form.elements["phone"],false) &&
				 checkSelect(form.elements["comptype"],"V","","Please select your Company Type.",false) &&
				 checkSelect(form.elements["companyname"],"V","","Please supply a Company Name.",false) &&
				 checkString(form.elements["address"],sUSAddress,false) &&
				 checkSelect(form.elements["city"],"V","","Please supply the name of your City.",false) &&
				 checkSelect(form.elements["state"],"V","","Please select your State from the dropdown.",false) &&
				 checkZIPCode(form.elements["zip"],false) &&
				 checkSelect(form.elements["platform"],"V","","Please tell us your Primary Computer Platform.",false) &&
				 checkSelect(form.elements["browser"],"V","","Please tell us your Primary Web Browser.",false) &&
				 checkSelect(form.elements["speed"],"V","","Please tell us your Internet Connection Speed.",false));
}