function MM_validateForm() { //v2.0
  var i,objStr,field,theCheck,atPos,theNum,colonPos,min,max,errors='';
  for (i=0; i<(MM_validateForm.arguments.length-2); i+=3) {
    objStr = MM_validateForm.arguments[(navigator.appName == 'Netscape')?i:i+1];
    field = eval(objStr);
    field.name = (field.name)?field.name:objStr;
    theCheck = MM_validateForm.arguments[i+2];
    if (field.value) { //IF NOT EMPTY FIELD
        if (theCheck != 'R') { //START NUM CHECKS
        theNum = parseFloat(field.value);
        if (field.value != ''+theNum) errors += 1;
    }
  }}
  if (errors) {
	alert('Error: Todos los campos deben ser numéricos');
	document.forma.total.value='- Error -';
  }
  document.MM_returnValue = (errors == '')
}

function calcularTotal(){
	valorItem1 = document.forma.item1.value * 19.95;//el número corresponde al valor del Item respectivo
	valorItem2 = document.forma.item2.value * 29.95;
	valorItem3 = document.forma.item3.value * 39.95;
	valorItem4 = document.forma.item4.value * 25.00;
	valorItem5 = document.forma.item5.value * 89.95;
	valorItem6 = document.forma.item6.value * 149.95;
	valorTotal = valorItem1 + valorItem2 + valorItem3 + valorItem4 + valorItem5+  valorItem6;

	document.forma.valorItem1.value = '$' + trim(valorItem1);
	document.forma.valorItem2.value = '$' + trim(valorItem2);
	document.forma.valorItem3.value = '$' + trim(valorItem3);
	document.forma.valorItem4.value = '$' + trim(valorItem4);
	document.forma.valorItem5.value = '$' + trim(valorItem5);
	document.forma.valorItem6.value = '$' + trim(valorItem6);
	document.forma.total.value = '$' + trim(valorTotal);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_popupMsg(theMsg) { //v2.0
  alert(theMsg);
}

function trim(number,X) {
// rounds number to X decimal places, defaults to 2
X = (!X ? 2 : X);
return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

