	// JavaScript Document
	/*
	function dropDownMenu(form)  {
	
	var myindex=document.forms[0].menu.selectedIndex;
	if (myindex==0) {
	alert("\nYou must make a selection from the drop-down menu.");
	document.forms[0].menu.focus();
	}
	else {
	menu_selection=document.forms[0].menu.options[myindex].value;
	return true;
	   }
	}
*/
	// Javascript to make sure users select product options
	function checkOptions(myForm) {
		// the first n-10 (myForm.elemetns.length - 10) elemts of the form.elements array are the options select fields
	// return confirm('Hi');
		var numOptions = myForm.elements.length - 10; 
		
		//alert(numOptions);
		
		for (i=0; i<=numOptions; i++) {
			if (myForm.elements[i].value==0) {
				myName = myForm.elements[i].name;
				start = myName.indexOf("[")+1;
				to = myName.indexOf("]");
				alert('Please select a ' + myName.substring(start, to));
				myForm.elements[i].focus();
				return false;
			}
		}
		
		return true; 
	}

	// function to validate customer entered price - donations
	function checkPrice(val, minval) {
			//alert ('Price is being checked -- ' +  val + ' -- ' + minval);
			var myPrice = val; //myForm.price.value;
			var minPrice = minval; // myForm.min_price.value;
			var regReplace = /\$/g; // find the $
			myPrice = myPrice.replace(regReplace, ""); // remove the $
			
			var myRegExp1 = /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/; // numbers only
			var myRegExp2 = /^-?[1-9][0-9]*/; // non-zero
	
			if (parseFloat(myPrice) < minPrice) {
				alert ('The minimum amount is $' + minPrice + '. Please enter at least this amount.');
				return false;
			}
	
			if (!myRegExp1.test(myPrice) || !myRegExp2.test(myPrice)) {
				alert ('Please enter a dollar amount in the format 9999.99');
				return false;	
			}
			else {
				return true;	
			}
		}



	/*Parse number to currency format:
	By JavaScript Kit (www.javascriptkit.com)
	Over 200+ free scripts here!
	*/
	
	//Remove the $ sign if you wish the parse number to NOT include it
	var prefix="$"
	var wd
	function parseelement(thisone){
		if (thisone.value.charAt(0)=="$")
		return
		wd="w"
		var tempnum=thisone.value
		for (i=0;i<tempnum.length;i++) {
			if (tempnum.charAt(i)==".") {
				wd="d"
				break
			}
		}
		if (wd=="w")
			thisone.value=prefix+tempnum+".00"
		else{
			if (tempnum.charAt(tempnum.length-2)==".") {
				thisone.value=prefix+tempnum+"0"
			}
			else {
				tempnum=Math.round(tempnum*100)/100
				thisone.value=prefix+tempnum
			}
		}
	}


	// change row colors when a check box is selected 
	// used in to highlight products being added to stores
	function rowHighlight(obj, defVal) {
		if (obj.checked) {
			obj.parentNode.parentNode.className = 'onrow';
		} else {
			obj.parentNode.parentNode.className = defVal;
		}
	}
