/*function preloadImg(){  var emlOff = new Image(); emlOff.src="./img/l_email.jpg";  var emlOn = new Image(); emlOn.src="./img/l_email_ov.jpg";  var reqOff = new Image(); reqOff.src="./img/l_brosh.jpg";  var reqOn = new Image(); reqOn.src="./img/l_brosh_ov.jpg";  var ordOff = new Image(); ordOff.src="./img/l_myorder.jpg";  var ordOn = new Image(); ordOn.src="./img/l_myorder_ov.jpg";  var spoOff = new Image(); spoOff.src="./img/l_specoff.jpg";  var spoOn = new Image(); spoOn.src="./img/l_specoff_ov.jpg";}*///document.getElementById('eml']=emlOn;//////////drugie funki//////////////////////var ord_str_body="<tr><td valign='top' colspan='100'><table border='0' cellpadding='0' cellspacing='0' width='95%'><tr><td class='regtxt' colspan='100'><br />To change the quantity of any item in your order, update the quantity and click 'Amend order'.  To continue shopping click on 'Continue Shopping'. To confirm your order click on 'Confirm Order'</td></tr><tr><td class='regtxt_b' colspan='100'><br />ITEM</td></tr>";//alert(navigator.appName);function MM_swapImgRestore(){ //v3.0  var i,x,a=document.MM_sr;  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}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_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.getElementById(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_swapImage(){ //v3.0   var i,j=0,x,a=MM_swapImage.arguments;   document.MM_sr=new Array;   for(i=0;i<(a.length-2);i+=3)   {      if ((x=MM_findObj(a[i]))!=null)      {         document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];      }   }}function fi_ov(f_id){ f_pic="";//alert(f_id);  switch (f_id){	  case 10:	    f_pic='pictures/blackpaint_over.jpg';			break;		case 1:	    f_pic='pictures/beeswax_over.jpg';			break;		case 2:	    f_pic='pictures/antiqueoak_over.jpg';			break;		case 3:	    f_pic='pictures/oaklacquer_over.jpg';			break;		case 4:	    f_pic='pictures/darkmahogany_over.jpg';			break;		case 5:	    f_pic='pictures/buttermilkpaint_over.jpg';			break;      case 6:	    f_pic='pictures/lightmahoganylacquer_over.jpg';			break;      case 7:	    f_pic='pictures/eaudenilpaint_over.jpg';			break;      case 8:	    f_pic='pictures/antiquelacquer_over.jpg';			break;      case 9:	    f_pic='pictures/whitepaint_over.jpg';			break;				}  //alert(f_pic+"-"+f_id);  MM_swapImage(f_id+'_img','',f_pic,1);}function fi_ov_furn(f_id){ f_pic="";//alert(f_id);  switch (f_id){	  case 11:	    f_pic='pictures/blackpaint_over.jpg';			break;		case 1:	    f_pic='pictures/beeswax_over.jpg';			break;		case 2:	    f_pic='pictures/antiqueoak_over.jpg';			break;		case 3:	    f_pic='pictures/oaklacquer_over.jpg';			break;		case 4:	    f_pic='pictures/darkmahogany_over.jpg';			break;		case 5:	    f_pic='pictures/buttermilkpaint_over.jpg';			break;		case 6:	    f_pic='pictures/unfinished_over.jpg';			break;		case 7:	    f_pic='pictures/lightmahoganylacquer_over.jpg';			break;      case 8:	    f_pic='pictures/eaudenilpaint_over.jpg';			break;      case 9:	    f_pic='pictures/antiquelacquer_over.jpg';			break;      case 10:	    f_pic='pictures/whitepaint_over.jpg';			break;	}  //alert(f_pic+"-"+f_id);  MM_swapImage(f_id+'_img','',f_pic,1);}function set_size(id){  size=document.getElementById('bd_size').value;	mt=document.getElementById('matid').value;	//alert(mt);	//document.getElementById('bd_size'].value;	document.getElementById('src_ifrm').src="chng_slct.php?sz="+size+"&bed="+id+"&par=sz&mt="+mt;	//alert(size);  //document.location="./product.php?par=1&id="+bd+"&sz="+id;	//alert("under construction");}function dayselect(){   var f = document.forms.filter;   if (getSelected(f.strDays).value=='0')   {      f.startDbiodd.disabled=true;      f.startDbiomm.disabled=true;      f.startDbioyy.disabled=true;      f.finishDbiodd.disabled=true;      f.finishDbiomm.disabled=true;      f.finishDbioyy.disabled=true;   }   else   {      f.startDbiodd.disabled=false;      f.startDbiomm.disabled=false;      f.startDbioyy.disabled=false;      f.finishDbiodd.disabled=false;      f.finishDbiomm.disabled=false;      f.finishDbioyy.disabled=false;   }   }function set_mat(){  size=document.getElementById('bd_size').value;	//alert(document.getElementById('mat_div'].innerHTML);	matr=document.getElementById('matid').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?sz="+size+"&matr="+matr+"&par=mt";	}function set_under(){  und=document.getElementById('undid').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?und="+und+"&par=un";}function set_under_u(){  und=document.getElementById('undid').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?und="+und+"&par=und";}function goOrder(id){  id_size = document.getElementById('bd_size').value;	id_matr = document.getElementById('matid').value;	id_und  = document.getElementById('undid').value;	id_fin  = document.getElementById('bd_fin').value;	qn_bd   = document.getElementById('bd_quan').value;	qn_mt   = document.getElementById('mat_quan').value;	qn_un   = document.getElementById('un_quan').value;	document.location = "./vieworder.php?par=add&id="+id+"&mt="+id_matr+"&sz="+id_size+"&un="+id_und+"&fi="+id_fin+"&qn_bd="+qn_bd+"&qn_mt="+qn_mt+"&qn_un="+qn_un;}function OfferMatrUpdate(){   var CurrentTotal = 0;   matr = document.getElementById('matid').value;   for (Index = 0; Index < g_arrMatresses.length; Index++)   {      //alert(g_arrMatresses[Index][0]+'='+g_arrMatresses[Index][1]);      document.getElementById("mat_descr"+g_arrMatresses[Index][1]).style.display = "none";      if (g_arrMatresses[Index][1] == matr ) CurrentTotal = parseInt(g_strTotal) + parseInt(g_arrMatresses[Index][0]);   }   document.getElementById('upperTotal').innerHTML = CurrentTotal;   document.getElementById('lowerTotal').innerHTML = CurrentTotal;   document.getElementById("mat_descr"+matr).style.display = "";}function goShop(){  document.location = "./products_beds.php";}function goConfirmOrder(){  document.location = "./cusdetailes.php";}function set_size_mt(id){  mt=document.getElementById('mt_size').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?matr="+id+"&par=mt1&mt_sz="+mt;}function goOrderF(id){  fin = document.getElementById('finish').value;	qn = document.getElementById('quan').value;	document.location = "./vieworder.php?par=add&fn="+id+"&fi="+fin+"&qn_mt="+qn;}function goFBack(fid){  document.location='furnl2.php?f='+fid;}function goOrderMt(id){  id_size = document.getElementById('mt_size').value;	qn = document.getElementById('quan').value;	document.location = "./vieworder.php?par=add&mt="+id+"&sz="+id_size+"&qn_mt="+qn;}function goOrderPl(id){  qn = document.getElementById('quan').value;	document.location = "./vieworder.php?par=add&pl="+id+"&qn_pl="+qn;}function goOrderUn(){  un1 = 1;	un2 = 2;//document.getElementById('undid').value;	qn1 = document.getElementById('quan_1').value;	qn2 = document.getElementById('quan_2').value;	fi = document.getElementById('fin').value;	document.location = "./vieworder.php?par=add&un="+un1+"&un2="+un2+"&qn_un="+qn1+"&qn_un2="+qn2+"&fi="+fi;}function goFurn3(){  sz = document.getElementById('size').value;	document.location = "furnl3.php?t="+sz;}function chngImg(id, imag){  document.getElementById('id').src="./img/"+imag;}function chngImg1(id, id2){  //alert(id);	if(id=="[object]" || id=="[object HTMLImageElement]")	{	  //alert(id);	  id.style.display="none";		id2.style.display="";	}	else	{	if(document.getElementById(id) && document.getElementById(id2))	{    document.getElementById(id).style.display="none";	  document.getElementById(id2).style.display="";	}	}}function admGoOrder(id){  document.location="index.php?id="+id+"&par=vew";}function admGoOrderFromDispatch(id){  window.open ("../orders/index.php?id="+id+"&par=vew&windowmode=yes","view_window","location=1,status=1,scrollbars=1,width=1024,height=600");  //document.location="../orders/index.php?id="+id+"&par=vew";}function admGoOrderFromProblem(id){  window.open ("../orders/index.php?id="+id+"&par=vew&windowmode=yes&stock=yes","view_window","location=1,status=1,scrollbars=1,width=1024,height=600");  //document.location="../orders/index.php?id="+id+"&par=vew";}/*('bed','".$id_bed."','".$id_size."','".$id_finish."','".$quantity."');('mat','".$id_matr."','".$id_size."','".$quantity."','0')('draw','".$id_und."','".$id_fin."','".$quantity."','0')('fur','". $id_type."','".$id_fin."','".$quantity."','0')        <input type="hidden" name="stock" value="yes">        <input type="hidden" name="type" id="type" value="">        <input type="hidden" name="par1" id="par1" value="">        <input type="hidden" name="par2" id="par2" value="">        <input type="hidden" name="par3" id="par3" value="">        <input type="hidden" name="par4" id="par4" value="">*/function returnItem(type,par1,par2,par3,par4,refound,price){   document.getElementById('type').value=type;   document.getElementById('par1').value=par1;   document.getElementById('par2').value=par2;   document.getElementById('par3').value=par3;   document.getElementById('par4').value=par4;   document.getElementById('selQuantity').value=getSelected(document.getElementById(type+'_'+par1+'_'+par2+'_'+par3+'_'+par4)).value;   if (refound=='1')   {      document.getElementById('refound').value=getSelected(document.getElementById('ref_'+type+'_'+par1+'_'+par2+'_'+par3+'_'+par4)).value;      document.getElementById('refound_price').value = price * document.getElementById('selQuantity').value ;   }   else   {      document.getElementById('refound').value='0';      document.getElementById('refound_price').value = '0';   }      document.getElementById('removeItems').submit();   }function set_quan(){  qn=parent.document.getElementById('quan').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?quan="+qn+"&par=quan";}function admtoFactory(count){   if (count!=0)   {      strUrl="";      id="";      for (Index = 1; Index <= count; Index++)      {         if (document.getElementById('item'+Index).checked == true)         {            if (id=="")            {               id=document.getElementById('item'+Index).value;            }            strUrl+=document.getElementById('item'+Index).value+',';         }      }      if (strUrl!="")      {         window.open ("add_on_form.php?id="+id+"&"+"item="+strUrl,"mywindow1","location=1,status=1,scrollbars=1,width=1100,height=600");         //window.open ("factoryOrder.php?item="+strUrl,"view_factory","location=0,status=0,scrollbars=1,menubar=1,width=1024,height=600");      }      else      {         alert("No orders selected for breakdown!");      }   }   else   {        alert("No orders selected for breakdown!");   }}function admtoMFactory(count){   if (count!=0)   {      strUrl="";      id="";      for (Index = 1; Index <= count; Index++)      {         if (document.getElementById('item'+Index).checked == true)         {            if (id=="")            {               id=document.getElementById('item'+Index).value;            }            strUrl+=document.getElementById('item'+Index).value+',';         }      }      if (strUrl!="")      {         window.open ("add_matr.php?id="+id+"&"+"item="+strUrl+"","mywindow2","location=1,status=1,scrollbars=1,width=1100,height=600");         //window.open ("factoryOrder.php?item="+strUrl,"view_factory","location=0,status=0,scrollbars=1,menubar=1,width=1024,height=600");      }      else      {         alert("No orders selected for breakdown!");      }   }   else   {      alert("No orders selected for breakdown!");   }     /*   if (count!=0)   {      strUrl="";      for (Index = 1; Index <= count; Index++)      {         if (document.getElementById('item'+Index).checked == true)         {            strUrl+=document.getElementById('item'+Index).value+',';         }      }      if (strUrl!="")      {         window.open ("mfactoryOrder.php?item="+strUrl,"view_factory","location=0,status=0,scrollbars=1,menubar=1,width=1024,height=600");      }      else      {         alert("No orders selected for breakdown!");      }   }   else   {      alert("No orders selected for breakdown!");   }   */}function admtoDispatch(count){   if (count!=0)   {      strUrl="";      for (Index = 1; Index <= count; Index++)      {         if (document.getElementById('item'+Index).checked == true)         {            strUrl+=document.getElementById('item'+Index).value+',';         }      }      if (strUrl!="")      {         var http = false;         if(navigator.appName == "Microsoft Internet Explorer") {           http = new ActiveXObject("Microsoft.XMLHTTP");         } else {           http = new XMLHttpRequest();         }         http.abort();         http.open("GET", "changedispatch.php?item="+strUrl, true);         http.onreadystatechange=function()         {            if(http.readyState == 4)            {               window.location.reload( true );            }         }         http.send(null);      }      else      {         alert("No orders selected for breakdown!");      }   }}function admParentWinRefresh(url){   window.opener.location.href=url;   self.close();}function set_quan1(id){  qn=parent.document.getElementById('quan_'+id).value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?quan="+qn+"&par=quan1&und="+id;}function set_fin(id){  //alert('will be soon');	fin_id=document.getElementById('bd_fin').value;	 und=document.getElementById('undid').value;	document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin_id+"&bed="+id+"&par=fi&un="+und;}function set_fin_clk(id, fin){ und=document.getElementById('undid').value;document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin+"&bed="+id+"&par=fi&un="+und;}function set_finFclk(id, fin){  document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin+"&fur="+id+"&par=fif";}function setFfinish(id){  fin = parent.document.getElementById('finish').value;  document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin+"&fur="+id+"&par=fif";}function setFquan(id){  fin = parent.document.getElementById('finish').value;	fiq = parent.document.getElementById('quan').value;  document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin+"&fur="+id+"&par=fiq&quan="+fiq;}function set_fin_clk_u(fin){ document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin+"&par=fiu";}function set_fin_u(){  //alert('will be soon');	fin_id=document.getElementById('fin').value;	document.getElementById('src_ifrm').src="chng_slct.php?fn="+fin_id+"&par=fiu";}function bed_q(id_size, id_fin, id_bed){  q=document.getElementById(id_bed+'_bq').value;  document.getElementById('src_ifrm').src="view_chng.php?fn="+id_fin+"&bd="+id_bed+"&sz="+id_size+"&par=bd&q="+q;}function mat_q(id_size, id_matr){  q=document.getElementById(id_matr+'_mq').value;  document.getElementById('src_ifrm').src="view_chng.php?mt="+id_matr+"&sz="+id_size+"&par=mt&q="+q;}function un_q(id_und, id_fin){   q=document.getElementById(id_und+'_uq').value;  document.getElementById('src_ifrm').src="view_chng.php?fn="+id_fin+"&un="+id_und+"&par=un&q="+q;}function pl_q(id_und){   q=document.getElementById(id_und+'_pq').value;  document.getElementById('src_ifrm').src="view_chng.php?pl="+id_und+"&par=pl&q="+q;}function fi_q(id_tip, id_fin){   q=document.getElementById(id_tip+'_'+id_fin+'_fiq').value;  document.getElementById('src_ifrm').src="view_chng.php?fn="+id_fin+"&fr="+id_tip+"&par=fr&q="+q;}function goAmendOrder(){  //alert('will be soon');	str='amend_order.php?par=1';	t=document.getElementsByTagName('textarea');	//alert(t.length);	k=1;	for(i=0;i<t.length;i++) 	{ 	  		if(t[i].value!='')		{	    //alert(t[i].value);		 str+="&"+k+"="+t[i].value+"";		 k++;		}	}	k--;	str+="&col="+k;	document.getElementById('src_ifrm').src=str;	//alert(str+"--"+k);}function sel_furniture(id_type, funr_id){  //alert(document.getElementById(funr_id+'_hid').value);  if(document.getElementById(funr_id+'_hid').value!='0')	{	  par='edt';		dp_txt=document.getElementById('ord_str_body').value;		qn = document.getElementById(funr_id+"_quan").value;		//alert(quan);	}	else	{	  par='add';		dp_txt='';		qn = 1;	}	//alert(dp_txt);	finish=document.getElementById(funr_id+"_finish").value;	id_typ = document.getElementById(id_type).value;	document.getElementById('src_ifrm').src="furn_order.php?par="+par+"&id_type="+id_typ+"&id_f="+funr_id+"&finish="+finish+"&quan="+qn;}function sel_fquan(id_quan, id){  finish=document.getElementById(id+"_finish").value;	id_typ = document.getElementById(id+"_type").value;	qn = document.getElementById(id_quan).value;	document.getElementById('src_ifrm').src="furn_order.php?par=quan&id_type="+id_typ+"&id_f="+id+"&finish="+finish+"&quan="+qn;}function set_ffin(id){  finish=document.getElementById(id+"_finish").value;	id_typ = document.getElementById(id+"_type").value;	qn = document.getElementById(id+"_quan").value;	//alert("furn_order.php?par=fin&id_type="+id_typ+"&id_f="+id+"&finish="+finish+"&quan="+quan);	document.getElementById('src_ifrm').src="furn_order.php?par=fin&id_type="+id_typ+"&id_f="+id+"&finish="+finish+"&quan="+qn;}function del_f(id){//alert();  document.getElementById('src_ifrm').src="furn_order.php?par=del&id_f="+id}function goFurnOrd(){  document.getElementById('frm').submit();}function set_bd_quan(){  q=document.getElementById('bd_quan').value;	//alert(q);	document.getElementById('src_ifrm').src="chng_slct.php?quan="+q+"&par=bd_quan";}function set_mat_quan(){  q=document.getElementById('mat_quan').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?quan="+q+"&par=mt_quan";}function set_un_quan(){  q=document.getElementById('un_quan').value;	//alert(matr);	document.getElementById('src_ifrm').src="chng_slct.php?quan="+q+"&par=un_quan";}function form_check(){  //alert();	message="";	if(document.getElementById('name').value=='')	{	  message+="Enter Your Name Please \n";	}	if(document.getElementById('email').value=='')	{	  message+="Enter Your E-Mail Address Please \n";	}	if(document.getElementById('phone').value=='')	{	  message+="Enter Your Phone Number Please \n";	}	if(document.getElementById('address').value=='')	{	  message+="Enter Your Address Please \n";	}	if(document.getElementById('zip').value=='')	{	  message+="Enter Your Postcode Please \n";	}	//alert(message);	if(message!="")	{	  alert(message);		return false;	}	else	{	  return true;	}}function bed1(inp_prise, tot_pr, price){  //alert();  document.getElementById('matr_price').value=parseInt(inp_prise);  amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);	mtr=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);  und=parseInt(document.getElementById('und_price').value)*parseInt(document.getElementById('un_quan').value);  tot = amm + mtr + und + parseInt(tot_pr);  //alert(und);	document.getElementById('tot_price').innerHTML = '&#163;'+tot;  document.getElementById('bed_price').value = price;  document.getElementById('full_pr').value = tot;  document.getElementById('bd_quan').value=1;  //document.getElementById('bd_quan').value=1;  document.getElementById('full_pr').value=tot;}function matr1(mat_price, matr , strMatDescr){  	   amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);		und=parseInt(document.getElementById('und_price').value)*parseInt(document.getElementById('un_quan').value);		pr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);		//alert(pr);		aggr = parseInt(mat_price);		//alert(aggr);		tot = pr+aggr+amm+und;		document.getElementById('tot_price').innerHTML = '&#163;'+tot;		document.getElementById('matr_desc').innerHTML = strMatDescr;  		document.getElementById('matr_price').value=aggr;		if(matr=='0')		{		  document.getElementById('mat_quan').value=0;		  //document.getElementById('mat_quan').disabled="1";		}		else		{		  document.getElementById('mat_quan').value=1;		  //document.getElementById('mat_quan').disabled="";		}				document.getElementById('full_pr').value=tot;}function underbed1(price2, price1, un){  pr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);		amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);		mtr=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);		pr=parseInt(pr);		if(amm!=0)		{		  aggr = parseInt(price2);		}		else		{		  aggr = parseInt(price1);		}		tot = pr+aggr+mtr+amm;		document.getElementById('tot_price').innerHTML = '&#163;'+tot;		document.getElementById('full_pr').value=tot;				if(un=='0')		{		  //document.getElementById('un_quan').disabled="1";			document.getElementById('un_quan').value=0;		}		else		{		  //document.getElementById('un_quan').disabled="";			document.getElementById('un_quan').value=1;		}		document.getElementById('und_price').value = aggr;}function quan1(q){	tot1=parseInt(document.getElementById('full_pr').value);	//tot2=parseInt(tot1);	//alert(q);	qn=parseInt(q);	tot = tot1*qn;	parent.document.getElementById('tot_price').innerHTML = '&#163;'+tot;	parent.document.getElementById('full_pr_vs_quan').value=tot;}function quan2(q, id){	amm=parseInt(document.getElementById('fin_amm').value)*q;  und=parseInt(document.getElementById('und_price_'+id).value)*q;	if(id=='1'){	  id2='2';	}else{id2='1';}	und2=parseInt(document.getElementById('und_price_'+id2).value)*document.getElementById('quan_'+id2).value;	amm2 = parseInt(document.getElementById('fin_amm').value)*document.getElementById('quan_'+id2).value;	tot=und+amm+und2+amm2;	parent.document.getElementById('tot_price').innerHTML = '&#163;'+tot;}function bd_quan(q){  bd_pr = parseInt(document.getElementById('bed_price').value);	bd_q = bd_pr*parseInt(q);	amm=parseInt(document.getElementById('fin_amm').value)*parseInt(q);  mtr=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);  und=parseInt(document.getElementById('und_price').value)*parseInt(document.getElementById('un_quan').value);	tot=bd_q+und+mtr+amm;	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('full_pr_vs_quan').value=tot;}function mt_quan(q){  bd_pr = parseInt(document.getElementById('matr_price').value);	bd_q = bd_pr*parseInt(q);	amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);  mtr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);  und=parseInt(document.getElementById('und_price').value)*parseInt(document.getElementById('un_quan').value);	tot=bd_q+und+mtr+amm;	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('full_pr_vs_quan').value=tot;}function un_quan(q){	bd_pr = parseInt(document.getElementById('und_price').value);	bd_q = bd_pr*parseInt(q);	amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);  mtr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);  und=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);	tot=bd_q+und+mtr+amm;	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('full_pr_vs_quan').value=tot;}var g_BedAlt = "";function finish1(photo, tbl_str, un_price, price_amm, fn, photo1, photo2, AltBed){//// Changing underbed select ////	//alert("<?=$tbl_str?>");	document.getElementById('pr_img').src = "./pictures/"+photo;	document.getElementById('pr_img').alt = AltBed;		sel_val = document.getElementById('undid').value;	//alert(sel_val);	document.getElementById('underb').innerHTML=tbl_str;	document.getElementById('undid').value=sel_val;	new_pr = parseInt(un_price);	if(sel_val!=0)	{	  pr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);		amm=parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('bd_quan').value);		mtr=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);		pr=parseInt(pr);		aggr = new_pr;		tot = pr+aggr+amm+mtr;		document.getElementById('tot_price').innerHTML = '&#163;'+tot;		document.getElementById('full_pr').value=tot;		document.getElementById('und_price').value = new_pr;	}	und=parseInt(document.getElementById('und_price').value)*parseInt(document.getElementById('un_quan').value);	pr=parseInt(document.getElementById('bed_price').value)*parseInt(document.getElementById('bd_quan').value);	mat=parseInt(document.getElementById('matr_price').value)*parseInt(document.getElementById('mat_quan').value);	qn=parseInt(document.getElementById('bd_quan').value);	tot=und+pr+mat+(parseInt(price_amm)*qn);	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('fin_amm').value = price_amm;	document.getElementById('bd_fin').value=fn;	document.getElementById('full_pr').value=tot;	if (document.getElementById('sm_1') && document.getElementById('sm_2'))	{      if (photo1!="") document.getElementById('sm_1').src = "./pictures/small/"+photo1;      if (photo2!="") document.getElementById('sm_2').src = "./pictures/small/"+photo2;   }}function finish2(price_amm, fn){//// Changing underbed select ////	und=parseInt(document.getElementById('und_price_1').value)*parseInt(document.getElementById('quan_1').value);	und2=parseInt(document.getElementById('und_price_2').value)*parseInt(document.getElementById('quan_2').value);	tot=0;	tot+=und+(parseInt(price_amm)*parseInt(document.getElementById('quan_1').value));	tot+=und2+(parseInt(price_amm)*parseInt(document.getElementById('quan_2').value));	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('fin_amm').value = price_amm;	document.getElementById('fin').value=fn;	document.getElementById('full_pr').value=tot;}function underbed2(pr){//// Changing underbed select ////	und=parseInt(pr)*parseInt(document.getElementById('quan').value);	//alert(parseInt(document.getElementById('fin_amm').value));	tot=und+(parseInt(document.getElementById('fin_amm').value)*parseInt(document.getElementById('quan').value));	document.getElementById('und_price').value = pr;	document.getElementById('tot_price').innerHTML = '&#163;'+tot;	document.getElementById('full_pr').value=tot;}function amend_order(){  var ret_val=null;  //if(navigator.appName=='Microsoft Internet Explorer'){  //  window.showModalDialog('pop_up.php','','dialogHeight:300px;dialogwidth:400px;scroll:no;status:no;help:no');	//}	//else	//{	  //alert("asas");	  ret_val=window.open('pop_up.php', "pop_up", "menubar=no,toolbar=no,scrollbars=no,resizable=no,status=no,height=300px,width=400px,left=300px,top=200px");		//alert(ret_val);	//}  parent.document.location="vieworder.php";}