<!--

/*********************************************************************
ValidateForm:
	Requirement: 
	  1.) All forms fields that need validation
	  2.) the name of your form
	  
	Use this function as the OnSubmit call.
	This function allows you to add all of your form
	elements that you want validated to it.  
	Form fields are added like this:
	flds[flds.length] = [frm.YOUR_FIELD_NAME, "THE_TEXT_YOU_WANT_DISPLAYED", "INPUT_TYPE"];

	example:
	flds[flds.length] = [frm.FirstName, "your First Name", "text"];
*********************************************************************/
function ValidateForm()
{
	// put the name of your form here
	var frm = document.contactform;
	
	var flds = new Array();
	
	// these fields get swapped out with the form field names in your form!!
	flds[flds.length] = [frm.prefix, "your name prefix.", "select"];
	flds[flds.length] = [frm.firstName, "your first name.", "text"];
	flds[flds.length] = [frm.lastName, "your last name.", "text"];
	flds[flds.length] = [frm.company, "your company's name.", "text"];
	flds[flds.length] = [frm.address1, "your street address.", "text"];
	flds[flds.length] = [frm.city, "your city.", "text"];
	flds[flds.length] = [frm.state, "your state.", "select"];
	flds[flds.length] = [frm.zip, "your zip or postal code.", "text"];
	flds[flds.length] = [frm.country, "your country.", "select"];
	flds[flds.length] = [frm.phone, "your primary phone number.", "text"];
	flds[flds.length] = [frm.email, "your complete e-mail address.", "email"];
	 
	return validateFieldArray( flds );
}

/***********************************************************************
The following code declares variables for the on() and off() functions
***********************************************************************/
var browserOK = false;
var pics;
var NameString;
var objCount = 0;
NameString = navigator.appname + navigator.appCodeName + navigator.appVersion;
if (NameString.indexOf("Explorer") == -1)
{
	if (NameString.indexOf("2.0") == -1)
    {
		browserOK = true;
	    pics = new Array();
    }
}
/********************************************************************
preload:
This function will preload all of your rollover images into cache
Required parameters:
name - this is the name of your image
first - this is the location of the off image
second - this is the location of the on image
*********************************************************************/
function preload(name, first, second)
{
	if (browserOK)
    {
		pics[objCount] = new Array(3);
	    pics[objCount][0] = new Image();
	    pics[objCount][0].src = first;
	    pics[objCount][1] = new Image();
	    pics[objCount][1].src = second;
	    pics[objCount][2] = name;
	    objCount++;
    }
}

/********************************************************************
on:
This functions swaps the off image with the on image
Required parameters:
on - this is the name of the rollover image
*********************************************************************/
function on(name)
{
	if (browserOK)
    {
		for (i = 0; i < objCount; i++)
        {
			if (document.images[pics[i][2]] != null)
	        {
				if (name != pics[i][2])
		        {
					document.images[pics[i][2]].src = pics[i][0].src;
		        }
		        else
		       {
			   	document.images[pics[i][2]].src = pics[i][1].src;
		       }
	        }
    	}
     }
}


/********************************************************************
off:
This functions swaps the on image with the off image
Required parameters:
There are no required parameters for this function
*********************************************************************/
function off()
{
	if (browserOK)
    {
		for (i = 0; i < objCount; i++)
        {
			if (document.images[pics[i][2]] != null) document.images[pics[i][2]].src = pics[i][0].src;
      	}
    }
}

// preload all of your images here


/***********************************************************************
popWin:
This function pops up a new window with the specified url.
Parameter are as follows:
url - this is the url that you want the user to be directed to
name - this is the name of the popup window
features - this is the width,height,scrollbars,etc...
***********************************************************************/
function popWin(url,name,features)
{
 	var the_win;
	the_win = window.open(url,name,features);
  	the_win.focus();
}

function ShowPrivacy(url,name,features)
{
 	var the_win;
	the_win = window.open('/privacy/','privacy','scrollbars=1,resizable=1,width=675,height=500');
  	the_win.focus();
}

//show and hide nav bars

showing = new Array("none","");
function show(id)
{
	el = document.getElementById(id);
	if (el.style.display == 'none')
	{
		el.style.display = '';
		el = document.getElementById('more' + id);
	} else {
		el.style.display = 'none';
		el = document.getElementById('more' + id);
	}
}
function show_all(){
	if(document.getElementById('hideall').style.visibility == 'hidden'){
		document.getElementById('showall').style.visibility = 'hidden';
		document.getElementById('showall').style.position = 'absolute';
		document.getElementById('hideall').style.visibility = 'visible';
		document.getElementById('hideall').style.position = 'fixed';
	} else {
	document.getElementById('showall').style.visibility = 'visible';
		document.getElementById('showall').style.position = 'fixed';
	document.getElementById('hideall').style.visibility = 'hidden';
		document.getElementById('hideall').style.position = 'absolute';
	}
	for (i=0;i<=100;i++){
		if(document.getElementById('info'+i)!=null){
		//show('info'+i);
		id = "info"+i
		el = document.getElementById(id);
		el.style.display = showing[1];
		
			}
	}
	showing.reverse();
}

function show(id)
{
	el = document.getElementById(id);
	if (el.style.display == 'none')
	{
		el.style.display = '';
		el = document.getElementById('more' + id);
	} else {
		el.style.display = 'none';
		el = document.getElementById('more' + id);
	}
}
var navmenu = "none; visibility:hidden;";
var navmain = "none";
var navcareers = "none";
var navfranchise = "none";
var navrealestate = "none";





function getArgs() {
	var args = new Object();
	var query = location.search.substring(1); // Get Query String
	var pairs = query.split("&"); // Split query at the comma
	// Begin loop through the querystring
	for(var i = 0; i < pairs.length; i++) {
		var pos = pairs[i].indexOf('='); // Look for "name=value"
		if (pos == -1) continue; // if not found, skip to next
		var argname = pairs[i].substring(0,pos); // Extract the name
		var value = pairs[i].substring(pos+1); // Extract the value
		args[argname] = unescape(value); // Store as a property
	}
	return args; // Return the Object
}
var args = getArgs(); //Get the querystring arguments
//-->