<!--
// replacement for getElementById fixes Mozilla bug with form elements that use .value
function getElementByName(name) {
	temp = document.getElementsByName(name);
	if(temp.length > 0) {
		return temp[0];
	} else {
alert('Null value: ' + name);
		return null;
	}
}

function debug(s) {
	alert(s);
}

function changecolor(obj) {
	temp = obj.style.backgroundColor;
	obj.style.backgroundColor = color;
}

function restorecolor(obj) {
	obj.style.backgroundColor = temp;
}

function setTextColor(obj,c) {
	temp = obj.style.color;
	obj.style.color = c;
}

function resetTextColor(obj) {
	obj.style.color = temp;
}

function setFocus(id) {
	obj = document.getElementById(id);
	obj.focus();
}

function setURL(urlSTR) {
	document.location = urlSTR;
}

function setColor(id,color) {
	id.style.color = color;
}

function debugForms() {   // show all form data
	var i=0;
	var j=0;
	var s='Number of forms: ' + document.forms.length + '\n';
	
	for (i=0;i<document.forms.length;i++) {
		for (j=0;j<document.forms[i].length;j++) {
			current = document.forms[i].elements[j];
			if (current!=null) {
				s = s + 'Form[' + i + '].' + j + ' Name: ' + current.name;
				s = s + ' Value: ' + current.value + ' Type: ' + current.type + '\n';
			}
		}
	}
	debug(s);
}

var temp;

function xferToPage() {   // xfer contents of hidden to actual
	var temp;
	var theButton;
	var i=0;
	var j=0;
//debugForms();	

	for (i=0;i<document.forms.length;i++) {
		for (j=0;j<document.forms[i].length;j++) {
			current = document.forms[i].elements[j];
			if (current.type=='hidden'& current.name.length > 0) {
				// if there is more than one item with this name
				// it must exist on the page, this is our guy!
				temp = document.getElementsByName(current.name);
				if(temp.length > 1) {
					// x out name so it isn't seen by this system...
					// requests, being specific, will not see a mangled name
					// see formutil:get_form_data
					// future requests will see page data for this item
					current.name = 'x' + current.name;
					switch (temp[1].type)
					{
						case 'radio':
							if(current.value.length>0) {
								theButton=document.getElementById(current.value);
								theButton.checked = true;
							}
						break
						case 'checkbox':
							temp[1].checked = true;
						break
						case 'text':
							temp[1].value = current.value;
						break
						case 'textarea':
							temp[1].value = current.value;
						break
						default:
							temp[1].value = current.value;
					}
				}
			}
		}
	}
}

function deleteHidden() {   // for use when form is reset
	var temp;
	var i=0;
	var j=0;

	for (i=0;i<document.forms.length;i++) {
		for (j=0;j<document.forms[i].length;j++) {
			current = document.forms[i].elements[j];
			if (current.type=='hidden'& current.name.length > 0) {
				// if there is more than one item with this name
				// it must exist on the page, this is our guy!
				temp = document.getElementsByName(current.name);
				if(temp.length > 1) {
					// x out name so it isn't seen by this system...
					// requests, being specific, will not see a mangled name
					// see formutil:get_form_data
					// future requests will see page data for this item
					current.name = 'x' + current.name;
				}
			}
		}
	}
}

/*
switch (theDay)
{
	case 5:
		document.write("Finally Friday")
	break
	case 6:
		document.write("Super Saturday")
	break
	case 0:
		document.write("Sleepy Sunday")
	break
	default:
		document.write("I'm really looking forward to this weekend!")
}

function xferToPage() {   // xfer contents of hidden to actual
	var temp;
	var i=0;

	for (i=0;i<document.forms[0].length;i++)
	{
		current = document.forms[0].elements[i];
		if (current.id.substring(0,1) == 'x') {
			temp=document.getElementById('q' + current.id.substring(1));
			if(temp!=null) { // if a matching real element exists
				temp.value=current.value;
				temp=document.getElementById(current.id.substring(1));
				if (temp.type == 'radio') {
					temp.checked=true;
				} else {
					temp.value=current.value;
				}
				current.id='-' + current.id.substring(1);
				current.name='-' + current.name.substring(1);
			}
		}
		if (current.id.substring(0,1) == 'y') {
			temp=document.getElementById('h' + current.id.substring(1));
			if(temp!=null) {
				temp.value=current.value;
				current.id='-' + current.id.substring(1);
				current.name='-' + current.name.substring(1);
//	alert(current.id);
			}
		}
	}

	for (i=0;i<document.forms[0].length;i++) {
		current = document.forms[0].elements[i];
		if (current.id.substring(0,1) == 'h') {
			price=document.getElementById('p' + current.id.substring(1));
			if(price) price.innerHTML=current.value;
			SubTotal = SubTotal + parseFloat(current.value.substring(1));
		}
	}
	total.innerHTML='$'+SubTotal.toFixed(2);
	hiddenTotal.value=total.innerHTML;
}
*/

//-->