<!--

function initArray() {
 for(i=0;i<initArray.arguments.length; i++)
  this[i] = initArray.arguments[i];
}

var isnMonths=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDays= new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today=new Date();

var stnr="";
var ns="0123456789";
var a="";

imag = new Array()
imag[1] = "../../images/qc-navlite-on.gif"
imag[2] = "../../images/qc-navlite-off.gif"
imag[3] = "../../images/qc-bullet-on.gif"
imag[4] = "../../images/qc-bullet-off.gif"
imag[5] = "../../images/qc-back_on.gif"
imag[6] = "../../images/qc-back_off.gif"
imag[7] = "../../images/qc-login_on.gif"
imag[8] = "../../images/qc-login_off.gif"
imag[9] = "../../images/qc-submit_on.gif"
imag[10] = "../../images/qc-submit_off.gif"
function swtch(num,imgname){ imgname.src = im[num].src}

im = new Array()
for (var i = 0; i < imag.length; i++)
{
im[i] = new Image()
im[i].src = imag[i]
}

function sitemap()
{
window.open("../../html/content/sitemap.htm","quickcommerce","height=350,width=250,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,status=no");
}

var capable;
var name = navigator.appName.toLowerCase();
var vers = parseFloat(navigator.appVersion);

if ((name.indexOf("netscape") >= 0 && vers >= 4) || (name.indexOf("microsoft") >= 0 && vers >= 4))
capable = true;
else
capable = false;

// Constants.

var FLDSEP;    // Special characters used as separators in cookie data string.
var IDXSEP;

if (capable) 
{
FLDSEP = String.fromCharCode(1);
IDXSEP = String.fromCharCode(2);
}

// Stores data currently entered on a form as cookies. Always returns true.
//
//   name    - The form name.
//   days    - Number of days to keep the cookies.
//   exclude - A comma-delimited list of field names that should not be
//             stored. Use to exclude sensitive data such as password,
//             credit card numbers, etc.

function storeData(name, days, exclude) 
{

var f;
var expdate;
var list, include;
var i;
var fld;
var data;

if (!capable)
return true;

// Get the named form, skip processing if not found.

if (!(f = document.forms[name]))
return true;

// Initialize the data field.

// Set the expiration date.

if (days == "")
days = 0;
expdate = new Date();
expdate.setTime (expdate.getTime() + (86400 * 1000 * days));

// Build a list of field names for exclusion.

list = new Array();
if (exclude != "") {
i = 0;
while ((i = exclude.indexOf(",")) >= 1) {
list[list.length] = exclude.substr(0, i);
exclude = exclude.substr(i + 1)
}
list[list.length] = exclude;
}

// Run through the fields and add field name/value pairs to the data string.

data = FLDSEP;
for (i = 0; i < f.length; i++) {
fld = f.elements[i];

// Is field in exclusion list?

include = true;
for (j = 0; j < list.length; j++)
if (fld.name == list[j])
include = false;

if (include) {

// Checkboxes and radio buttons.

if ((fld.type == "checkbox" || fld.type == "radio") && fld.checked)
data += setData(fld.name, fld.value);

// Selection lists (single).

if (fld.type == "select-one")
if (fld.selectedIndex >= 0)
data += setData(fld.name, fld.options[fld.selectedIndex].value);

// Selection lists (multiple). Add a unique name/value pair for each selected item.

if (fld.type == "select-multiple")
for (j = 0; j < fld.options.length; j++)
if (fld.options[j].selected)
  data += setData(fld.name + IDXSEP + j, fld.options[j].value);

// Text fields.

if (fld.type == "hidden" || fld.type == "password" || fld.type == "text" || fld.type == "textarea")
data += setData(fld.name, fld.value);
}
}

// Set the cookie.

deleteCookie(name);
setCookie(name, data, expdate);

return true;
}

// Retrieves data from the cookie and sets the values in the corresponding
// form fields. Returns true if data was found, false otherwise.
//
//   name - The form name.

function retrieveData(name) {

var f;
var i, j;
var fld;
var s;
var data;

if (!capable)
return false;

// Get the named form, return if not found.

if (!(f = document.forms[name]))
return false;

// Get the cookie for this form.

data = getCookie(name);
if (data == "")
return false;

// Run through the fields and retrieve the values.

for (i = 0; i < f.elements.length; i++) {
fld = f.elements[i];

// Checkboxes and radio buttons.

if ((fld.type == "checkbox" || fld.type == "radio") && (s = getData(fld.name, data)) != null && fld.value == s)
fld.checked = true;

// Selection lists (single).

if (fld.type == "select-one" && (s = getData(fld.name, data)) != null)
for (j = 0; j < fld.options.length; j++)
if (fld.options[j].value == s)
fld.options[j].selected = true;

// Selection lists (multiple).

if (fld.type == "select-multiple")
for (j = 0; j < fld.options.length; j++)
if ((s = getData(fld.name + IDXSEP + j, data)) != null && fld.options[j].value == s)
fld.options[j].selected = true;

// Text fields.

if ((fld.type == "hidden" || fld.type == "password" || fld.type == "text" || fld.type == "textarea") && (s = getData(fld.name, data)) != null)
fld.value = s;
}

return true;
}
function setData(name, value) {

if (value != "")
return name + "=" + value + FLDSEP;
else
return "";
}

function getData(name, data) {

var i, j;
var s;

if (data == "")
return null;

s = FLDSEP + name + "=";
i = data.indexOf(s);
if (i >= 0) {
i += s.length;
j = data.indexOf(FLDSEP, i);
if (j >= 0)
return data.substr(i, j - i);
}

return null;
}


function setCookie (name, value, expires) {

document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +  "; path=/";
}


function getCookie(name) {

var search;

search = name + "="
offset = document.cookie.indexOf(search) 
if (offset != -1) {
offset += search.length ;
end = document.cookie.indexOf(";", offset) ;
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(offset, end));
}
else
return "";
}

function deleteCookie(name) {

var expdate = new Date();
expdate.setTime(expdate.getTime() - (86400 * 1000 * 1));
setCookie(name, "", expdate);
}

//-- pulls data from the FIRST NAME field and checks it
function checkFname()
{
	var str = document.signup.fname.value;
// Return false if name field is blank.
	if (str == "")
	{
		alert("\nThe NAME field is blank.\n\nPlease enter your first name.");
		document.signup.fname.focus();
		return false;
	}
// Return false if data is not alphabetic or a space.
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ')
		{
			alert("\nThe NAME field accepts letters and spaces only.\n\nPlease re-enter your first name");
			document.signup.fname.select();
			document.signup.fname.focus();
			return false;
		}
	}
	return true;
}

//-- pulls data from the LAST NAME field and checks it
function checkLname()
{
	var str = document.signup.lname.value;
// Return false if name field is blank.
	if (str == "")
	{
		alert("\nThe NAME field is blank.\n\nPlease enter your last name.");
		document.signup.lname.focus();
		return false;
	}
// Return false if data is not alphabetic or a space.
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ')
		{
			alert("\nThe NAME field accepts letters and spaces only.\n\nPlease re-enter your last name");
			document.signup.lname.select();
			document.signup.lname.focus();
			return false;
		}
	}
	return true;
}

//-- pulls data from the E-MAIL field and checks it
function checkEmail()
{
	var str = document.signup.email.value;
	// Return false if E-MAIL field is blank.
	if (str == "")
	{
		alert("\nThe E-MAIL field is blank.\n\nPlease enter your e-mail address.");
		document.signup.email.focus();
		return false;
	}
	if (document.signup.email.value.indexOf ('@',0) == -1 || 
	document.signup.email.value.indexOf ('.',0) == -1)
		{
		alert("\nThe E-MAIL appears to be invalid.\n\nPlease re-enter your e-mail address.")
		document.signup.email.select();
		document.signup.email.focus();
		return false;
		}
		else
		{
	return true;
	}
}

//-- pulls data from the PHONE AREA CODE field and checks it
function checkPhoneac()
{
	var str = document.signup.phoneac.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your home phone area code.");
		document.signup.phoneac.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your home phone area code");
			document.signup.phoneac.select();
			document.signup.phoneac.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the PHONE PREFIX field and checks it
function checkPhonepre()
{
	var str = document.signup.phonepre.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your home phone prefix.");
		document.signup.phonepre.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your home phone prefix");
			document.signup.phonepre.select();
			document.signup.phonepre.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the PHONE SUFFIX field and checks it
function checkPhonesfx()
{
	var str = document.signup.phonesfx.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your home phone suffix.");
		document.signup.phonesfx.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your home phone suffix");
			document.signup.phonesfx.select();
			document.signup.phonesfx.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the BUSINESS PHONE AREA CODE field and checks it
function checkBusphoneac()
{
	var str = document.signup.busphoneac.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your business phone area code.");
		document.signup.busphoneac.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your business phone area code");
			document.signup.busphoneac.select();
			document.signup.busphoneac.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the BUSINESS PHONE PREFIX field and checks it
function checkBusphonepre()
{
	var str = document.signup.busphonepre.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your business phone prefix.");
		document.signup.busphonepre.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your business phone prefix");
			document.signup.busphonepre.select();
			document.signup.busphonepre.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the BUSINESS PHONE SUFFIX field and checks it
function checkBusphonesfx()
{
	var str = document.signup.busphonesfx.value;
// Return false if PHONE AREA CODE field is blank.
	if (str == "")
	{
		alert("\nThe PHONE NUMBER field is blank.\n\nPlease enter your business phone suffix.");
		document.signup.busphonesfx.focus();
		return false;
	}
//-- Return false if data is not numeric
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((((((ch < "0" || "9" < ch)) && ch != ' ') && ch != '(') && ch != ')') && ch != '-')
		{
			alert("\nThe PHONE NUMBER field accepts numbers only.\n\nPlease re-enter your business phone suffix");
			document.signup.busphonesfx.select();
			document.signup.busphonesfx.focus();
			return false;
		}
	
	}
	return true;
}

//-- pulls data from the ZIP field and checks it
function checkZip()
{
	var str = document.signup.zip.value;
// Return false if request ZIP field is blank.
	if (str == "")
	{
		alert("\nThe ZIP CODE field is blank.\n\nPlease enter your zip.");
		document.signup.zip.focus();
		return false;
	}
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if (ch < "0" || ch > "9")
		{
			alert("\nThe ZIP CODE field accepts numbers only.\n\nPlease re-enter your zip code");
			document.signup.zip.select();
			document.signup.zip.focus();
			return false;
		}
	}
	return true;
}

//-->