function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function CalcPrice() {
    var answer = 0;
    for (var i = 0; i<document.form1.elements.length; i++) {
        if ((document.form1.elements[i].type == 'hidden')) {
			if ((document.form1.elements[i].name == 'PriceTotal')) {
				}else{
			  answer += eval("parseFloat(document.form1.elements[i].value)")
			}
        }	
    }
	 document.all['PriceTotal'].value = round(answer,2);
   document.all['PRICE'].innerHTML = '$'+round(answer,2);
  document.all['PRICE2'].innerHTML = '$'+round((answer*1.1),2);
	
}

function UpdPrice(selObj) {
	var fName = selObj
		var fString = document.forms[0].elements[fName].value;
			var splits = fString.split("|");
				var price = eval("parseFloat(splits[0])");
				var hide = fName.concat('hide');
				var stockavail = fName+'avail';
				//alert(stockavail);
				var divname = fName.concat('a');
				var divnameinc = fName.concat('inc');
				document.all[stockavail].innerHTML = splits[3]; 
			document.all[divname].innerHTML = '$'+price;
			
			document.all[divnameinc].innerHTML = '$'+round(price*1.1,2);
		document.all[hide].value = price;
CalcPrice();
}

function UpdatePriceAcc(vPrice,vPid) {
	var fPrice = vPrice
		var fPid = vPid
			var price = eval("parseFloat(fPrice)");
				var hideAcc = fPid.concat('check')
				var Acc = fPid.concat('checkbox')
				document.all[hideAcc].value = price;
			if (!(document.all[Acc].checked)) {
		document.all[hideAcc].value = 0;	

}
CalcPrice();

}
function round (n, d) {
  	n = n - 0; 
 		if (d == null) d = 2;
  	 		var f = Math.pow(10, d);
         		n += Math.pow(10, - (d + 1)); 
         		n = Math.round(n * f) / f;
         	n += Math.pow(10, - (d + 1)); 
         n += ''; 
       return d == 0 ? n.substring(0, n.indexOf('.')) :
      n.substring(0, n.indexOf('.') + d + 1);
}