if (document.images){
sales_builderOn = new Image();
sales_builderOn.src = "images/sales_builder_mouse.gif";
sales_builderOff = new Image();
sales_builderOff.src = "images/sales_builder.gif";

about_tomOn = new Image();
about_tomOn.src = "images/about_tom_mouse.gif";
about_tomOff = new Image();
about_tomOff.src = "images/about_tom.gif";

about_lauraOn = new Image();
about_lauraOn.src = "images/about_laura_mouse.gif";
about_lauraOff = new Image();
about_lauraOff.src = "images/about_laura.gif";

get_certifiedOn = new Image();
get_certifiedOn.src = "images/get_certified_mouse.gif";
get_certifiedOff = new Image();
get_certifiedOff.src = "images/get_certified.gif";

}

function activate(image_name) {
if (document.images) {
document[image_name].src = eval(image_name + "On.src");
}
}
function deactivate(image_name) {
if (document.images) {
document[image_name].src = eval(image_name + "Off.src");
}
}

var newwindow;
function MM_openBrWindow(theURL,winName,features)
{
	newwindow=window.open(theURL,winName,features);
	if (window.focus) {newwindow.focus()}
}


function registration_validate()
{
complete=true;
var number_attending = document.form.number_attending.value;
var gender=document.form.salutation.value;
var first=document.form.first_name.value;
var last=document.form.last_name.value;
var address=document.form.address1.value;
var city=document.form.city.value;
var state=document.form.state.value;
var zip=document.form.zip.value;
var cc=document.form.cc.value;
var exp_date=document.form.exp_date.value;
var exp_date1=exp_date.substring(0,2);
var exp_date2=exp_date.substring(2,3);
var exp_date3=exp_date.substring(3,5);
var email=document.form.email.value;
var phone=document.form.phone.value;
var attendee_gender=document.form.attendee_salutation.value;
var attendee_first=document.form.attendee_first_name.value;
var attendee_last=document.form.attendee_last_name.value;
var attendee_email=document.form.attendee_email.value;
var attendee_phone=document.form.attendee_phone.value;
var attendee_position=document.form.attendee_position.value;
var marketing=document.form.marketing.value;

if ((number_attending == "") || (number_attending == null)) 
{
alert ("Please enter the number attending.");
complete=false;
}

if (gender == "") 
{
alert ("Under Billing Information - Please select the appropriate salutation.");
complete=false;
}

if ((first == "") || (first == null))
{
alert ("Under Billing Information - Please enter your first name.");
complete=false;
}

if ((last == "") || (last == null))
{
alert ("Under Billing Information - Please enter your last name.");
complete=false;
}

if ((address == "") || (address == null))
{
alert ("Under Billing Information - Please enter your address.");
complete=false;
}

if ((city == "") || (city == null))
{
alert ("Under Billing Information - Please enter your city.");
complete=false;
}

if ((state == "") || (state == null))
{
alert ("Under Billing Information - Please enter the state you live in.");
complete=false;
}

if ((zip == "") || (zip == null))
{
alert ("Under Billing Information - Please enter your zip code.");
complete=false;
}

if ((cc == "") || (cc == null))
{
alert ("Under Billing Information - Please enter your credit card number.");
complete=false;
}

if (exp_valid(exp_date) == true)
{
alert ("Under Billing Information - Please enter the expiration date in the format mm/yy for example 01/04.");
complete=false;
}

if (((email == "") || (email == null)) || ((email.indexOf("@")==-1) || (email.indexOf(".")==-1))) 
{
alert ("Under Billing Information - Please enter in a valid e-mail address.");
complete=false;
}

if ((phone == "") || (phone == null))
{
alert ("Under Billing Information - Please enter your phone number.");
complete=false;
}

if (attendee_gender == "") 
{
alert ("Under Attendee Information - Please select the appropriate salutation.");
complete=false;
}

if ((attendee_first == "") || (attendee_first == null))
{
alert ("Under Attendee Information - Please enter your first name.");
complete=false;
}

if ((attendee_last == "") || (attendee_last == null))
{
alert ("Under Attendee Information - Please enter your last name.");
complete=false;
}

if (((attendee_email == "") || (attendee_email == null)) || ((attendee_email.indexOf("@")==-1) || (attendee_email.indexOf(".")==-1))) 
{
alert ("Under Attendee Information - Please enter in a valid e-mail address.");
complete=false;
}

if ((attendee_phone == "") || (attendee_phone == null))
{
alert ("Under Attendee Information - Please enter your phone number.");
complete=false;
}

if ((attendee_position == "") || (attendee_position == null))
{
alert ("Under Attendee Information - Please enter your position.");
complete=false;
}

if (marketing == "") 
{
alert ("Please tell us how you heard about the seminar.");
complete=false;
}

return complete;
}


function newsletter_validate()
{
complete=true;
var first=document.form.first_name.value;
var last=document.form.last_name.value;
var email=document.form.email.value;
var email2=document.form.email2.value;
if ((first == "") || (first == null))
{
alert ("Please enter your first name.");
complete=false;
}
if ((last == "") || (last == null))
{
alert ("Please enter your last name.");
complete=false;
}
if ((((email == "") || (email == null)) || ((email.indexOf("@")==-1) || (email.indexOf(".")==-1))) || (((email2 == "") || (email2 == null)) || ((email2.indexOf("@")==-1) || (email2.indexOf(".")==-1))))
{
alert ("Please enter in a valid e-mail address.");
complete=false;
}
if (email != email2)
{
alert ("Please verify your e-mail addresses - they don't match");
complete=false;
}

return complete;
}

function eastside () {
document.form.area_e0.checked = document.form.area_e.checked;
document.form.area_e1.checked = document.form.area_e.checked;
document.form.area_e2.checked = document.form.area_e.checked;
document.form.area_e3.checked = document.form.area_e.checked;
document.form.area_e4.checked = document.form.area_e.checked;
document.form.area_e5.checked = document.form.area_e.checked;
document.form.area_e6.checked = document.form.area_e.checked;
document.form.area_e7.checked = document.form.area_e.checked;
document.form.area_e8.checked = document.form.area_e.checked;
document.form.area_e9.checked = document.form.area_e.checked;
document.form.area_e10.checked = document.form.area_e.checked;
document.form.area_e11.checked = document.form.area_e.checked;
document.form.area_e12.checked = document.form.area_e.checked;
document.form.area_e13.checked = document.form.area_e.checked;
document.form.area_e14.checked = document.form.area_e.checked;
document.form.area_e15.checked = document.form.area_e.checked;
document.form.area_e16.checked = document.form.area_e.checked;
document.form.area_e17.checked = document.form.area_e.checked;
	}
	
function seattle () {
document.form.area_s0.checked = document.form.area_s.checked;
document.form.area_s1.checked = document.form.area_s.checked;
document.form.area_s2.checked = document.form.area_s.checked;
document.form.area_s3.checked = document.form.area_s.checked;
document.form.area_s4.checked = document.form.area_s.checked;
document.form.area_s5.checked = document.form.area_s.checked;
document.form.area_s6.checked = document.form.area_s.checked;
document.form.area_s7.checked = document.form.area_s.checked;
document.form.area_s8.checked = document.form.area_s.checked;
document.form.area_s9.checked = document.form.area_s.checked;
document.form.area_s10.checked = document.form.area_s.checked;
document.form.area_s11.checked = document.form.area_s.checked;
document.form.area_s12.checked = document.form.area_s.checked;
document.form.area_s13.checked = document.form.area_s.checked;
document.form.area_s14.checked = document.form.area_s.checked;
document.form.area_s15.checked = document.form.area_s.checked;
document.form.area_s16.checked = document.form.area_s.checked;
document.form.area_s17.checked = document.form.area_s.checked;
document.form.area_s18.checked = document.form.area_s.checked;
document.form.area_s19.checked = document.form.area_s.checked;
document.form.area_s20.checked = document.form.area_s.checked;
document.form.area_s21.checked = document.form.area_s.checked;
document.form.area_s22.checked = document.form.area_s.checked;
document.form.area_s23.checked = document.form.area_s.checked;
document.form.area_s24.checked = document.form.area_s.checked;
	}	
	
	
function north () {
document.form.area_n0.checked = document.form.area_n.checked;
document.form.area_n1.checked = document.form.area_n.checked;
document.form.area_n2.checked = document.form.area_n.checked;
document.form.area_n3.checked = document.form.area_n.checked;
document.form.area_n4.checked = document.form.area_n.checked;
document.form.area_n5.checked = document.form.area_n.checked;
document.form.area_n6.checked = document.form.area_n.checked;
document.form.area_n7.checked = document.form.area_n.checked;
document.form.area_n8.checked = document.form.area_n.checked;
document.form.area_n9.checked = document.form.area_n.checked;
document.form.area_n10.checked = document.form.area_n.checked;

}

function south () {
document.form.area_so0.checked = document.form.area_so.checked;
document.form.area_so1.checked = document.form.area_so.checked;
document.form.area_so2.checked = document.form.area_so.checked;
document.form.area_so3.checked = document.form.area_so.checked;
document.form.area_so4.checked = document.form.area_so.checked;
document.form.area_so5.checked = document.form.area_so.checked;
document.form.area_so6.checked = document.form.area_so.checked;
document.form.area_so7.checked = document.form.area_so.checked;
document.form.area_so8.checked = document.form.area_so.checked;
document.form.area_so9.checked = document.form.area_so.checked;
document.form.area_so10.checked = document.form.area_so.checked;

}

function island () {
document.form.area_i0.checked = document.form.area_i.checked;
document.form.area_i1.checked = document.form.area_i.checked;
document.form.area_i2.checked = document.form.area_i.checked;
document.form.area_i3.checked = document.form.area_i.checked;
document.form.area_i4.checked = document.form.area_i.checked;
document.form.area_i5.checked = document.form.area_i.checked;

}


function selectall(t){ 
for(i=1; i<t.length; i++) t[i].checked=t[0].checked; 
}


function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}
