function allprice(p,n,np,nd,m){	
	if(n==1){
	    x=document.form1.WS.value;
		var fy =x.split(",");
		a=fy[2]*1;
		y=3;
	}
	else
	{
		a=0;
		y=0;
	}

	xsnum=document.form1.z.value;
	for(i=0;i<xsnum;i++){
		x=document.form1.elements["z"+(i+1)].value;
		//x=document.form1.elements[y+i].value;
		if(x!="See Picture"){//其实这个if没有用
			var fy =x.split(",");
			if(fy[3]>0) a=a+fy[3]*1+fy[2]*1000;
			else a=a+fy[2]*1;
		}
	}
	
	zj=p+a*1;		
	xs=Math.round(zj*100)/100-Math.floor(zj);
	xs=Math.round(xs*100);
	
	zj2=zj;
	xs2=xs
	if(np>0) zj2=p-np+a*1;
	if(nd>0) zj2=(p+a*1)*(1-nd/100);
	xs2=Math.round(zj2*100)/100-Math.floor(zj2);
	xs2=Math.round(xs2*100);
	
	if(xs==0) xs="00";
    if(m==1) pr.innerHTML="$"+Math.floor(zj)+"."+xs;
	if(m==2) {		
		    pr.innerHTML="Regular Price:<STRIKE>$"+Math.floor(zj)+"."+xs+"</STRIKE>";
		    pr2.innerHTML="Promotion Price:$"+Math.floor(zj2)+"."+xs2+"";
	}	
	
}
ord=new Array(100);
txt=new Array(100);
vau=new Array(100);
pic=new Array(100);

var NUMS=0;
function add(opt,text,value){

    var newOpt =new Option(text,value,false,false);
    opt.options[opt.options.length] = newOpt;
   //var el=document.createElement("OPTION");
   //el.text=text;
   //el.value=value;
   //opt.add(el);
}
function del(opt,n){ opt.remove(n);}
function changelist(sOpt,p){
   for(i=0;i<sOpt.length;i++)  {del(sOpt,i);i--;}
   n=document.form1.wood.value;
   for(i=1;i<=NUMS;i++)
   {
	if(ord[i]==n) {
		add(sOpt,txt[i],vau[i]); 
	}
   }
}
function changepic(pid,x,wname){
   window.open ("pinfo_pic.aspx?gn="+x+"&pid="+pid+"&wname="+wname, "newwindow", "height=300, width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no");
}


//for show and Hidden top
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

