var home_off;
var home_on;
var res_off;
var res_on;
var comm_off;
var comm_on;
var test_off;
var test_on;
var contact_off;
var contact_on;
var em_off;
var em_on;

function insert_montage()
{
	document.write( "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"302\" height=\"400\" id=\"montage\" align=\"middle\">" );
	document.write( "<param name=\"allowScriptAccess\" value=\"sameDomain\" />" );
	document.write( "<param name=\"movie\" value=\"montage.swf\" />" );
	document.write( "<param name=\"quality\" value=\"high\" />" );
	document.write( "<param name=\"bgcolor\" value=\"#c5c1b5\" />" );
	document.write( "<embed src=\"montage.swf\" quality=\"high\" bgcolor=\"#c5c1b5\" width=\"302\" height=\"400\" name=\"montage\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />" );
	document.write( "</object>" );
}

function preload_images()
{
	est_off = new Image(); est_off.src = "est_off_btn.gif";
	est_on = new Image(); est_on.src = "est_on_btn.gif";

	home_off = new Image(); home_off.src = "btn_home_off.gif";
	home_on = new Image(); home_on.src = "btn_home_on.gif";
	res_off = new Image(); res_off.src = "btn_res_off.gif";
	res_on = new Image(); res_on.src = "btn_res_on.gif";
	comm_off = new Image(); comm_off.src = "btn_comm_off.gif";
	comm_on = new Image(); comm_on.src = "btn_comm_on.gif";
	test_off = new Image(); test_off.src = "btn_test_off.gif";
	test_on = new Image(); test_on.src = "btn_test_on.gif";
	contact_off = new Image(); contact_off.src = "btn_contact_off.gif";
	contact_on = new Image(); contact_on.src = "btn_contact_on.gif";
	em_off = new Image(); em_off.src = "btn_em_off.gif";
	em_on = new Image(); em_on.src = "btn_em_on.gif";
}

function checkemform()
{
	v1 = document.getElementById("pn").value;
	v2 = document.getElementById("emd").value;
	v3 = document.getElementById("emd").value;
	if ( v1 == "" || v2 == "" || v3 == "" )
	{
		alert( "You must provide your name, phone number and a description of your emergency before submitting this form." );
		return false;
	}
	else
	{
		return true;
	}
}

function checktestform()
{
	v1 = document.getElementById("comment").value;
	if ( v1 == "" )
	{
		alert( "Please provide your testimonial in the space above before submitting this form." );
		return false;
	}
	else
	{
		return true;
	}
}

function checkprojectform()
{
	failed = false;
	v1 = document.getElementById("cn").value;
	v2 = document.getElementById("pn").value;
	v3 = document.getElementById("em").value;
	v4 = document.getElementById("project").value;

	if ( v1 == "" || v4 == "" )
	{
		alert( "You must provide us with all of the requested information so that we can process your request." );
		return false;
	}

	if ( v2 == "" && v3 == "" )
	{
		alert( "You must provide us with at least one form of contact.  Please enter your phone number and/or e-mail address above, and re-submit the form." );
		return false;
	}

	return true;
}