// JavaScript Document
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
function itemAddCheck() {
  var missing = '';
  var invalid = '';
            
  if (document.itemAdd.item_number.value == '' ) {
    missing += (missing != '') ? ', "Item Number"' : '"Item Number"';
  }
  if (document.itemAdd.item_category.value == '' ) {
    missing += (missing != '') ? ', "Item Category"' : '"Item Category"';
  }
  if (document.itemAdd.item_name.value == '' ) {
    missing += (missing != '') ? ', "Item Name"' : '"Item Name"';
  }
  if (document.itemAdd.item_description.value == '' ) {
    missing += (missing != '') ? ', "Item Description"' : '"Item Description"';
  }
  if (document.itemAdd.item_price.value == '' ) {
    missing += (missing != '') ? ', "Item Price"' : '"Item Price"';
  }
        
  if (missing != '') {
    alert("Required fields missing: " + missing);
    return false;
  } else if (invalid != '') {
    alert("Error: \n" + invalid);
    return false;
 } else {

    document.itemAdd.action;

    return true;
  }

  return false;

}
function itemUpdateCheck() {
  var missing = '';
  var invalid = '';
            
  if (document.itemUpdate.item_number.value == '' ) {
    missing += (missing != '') ? ', "Item Number"' : '"Item Number"';
  }
  if (document.itemUpdate.item_category.value == '' ) {
    missing += (missing != '') ? ', "Item Category"' : '"Item Category"';
  }
  if (document.itemUpdate.item_name.value == '' ) {
    missing += (missing != '') ? ', "Item Name"' : '"Item Name"';
  }
  if (document.itemUpdate.item_description.value == '' ) {
    missing += (missing != '') ? ', "Item Description"' : '"Item Description"';
  }
  if (document.itemUpdate.item_price.value == '' ) {
    missing += (missing != '') ? ', "Item Price"' : '"Item Price"';
  }
        
  if (missing != '') {
    alert("Required fields missing: " + missing);
    return false;
  } else if (invalid != '') {
    alert("Error: \n" + invalid);
    return false;
 } else {

    document.itemUpdate.action;

    return true;
  }

  return false;

}
function submitContactForm() {
		if(document.ContactForm.Name.value.length < 1) {
			alert("Your Name Is Required.");
			document.ContactForm.Name.focus();
			return;
		} else if(document.ContactForm.email.value.length < 1) {
			alert("Your Email Address Is Required.");
			document.ContactForm.email.focus();
			return;
		} else if(document.ContactForm.Message.value.length < 1) {
			alert("A Message Is Required.");
			document.ContactForm.Message.focus();
			return;
		} document.ContactForm.submit();
}

