function initproduct()
{
	product_size = document.getElementById('product_size');
	// change form target based on product_size selection
	product_size.onchange = function(){
		document.forms[0].action = product_size.value;
		text = product_size.options[product_size.selectedIndex].text;
		document.getElementById('price').innerHTML = "" + parsePrice(text) + "";
	}
}

// format number
function formatPrice(price) {
  if (price % 1 > 0)
    return price.toFixed(2);
  else
    return price.toFixed(0);
}

// fix displayed price
function parsePrice(text)
{
	return parseFloat(text.split("$")[1]);
}

// JavaScript Document

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;


//popup

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}
