// js_javascript.js # ADW # Oct 1998 # Revised Apr 2011 # V9.42E;
// 10% off over £25 + PayPal
//See js_javascript.htm for Working Notes;

	var i=0; 
	var k,nq,ea;
	var tup=0;
	var po=0;
	var email=('adw232bhr+orderhc@gmail.com');
	var subject=('Order to Hampstead Castle');
	var body=buddy;
 	var buddy="";
	var cr=" ___ ";
//	var byr=top.buyer;


	function cpns(middle,bottom){
		parent.R_mid.location.href=middle;
		parent.R_bot.location.href=bottom;
		}


	function pod(num){
		num+="";
		idx=(num).indexOf(".");
		if(idx==-1){return padn=num+".00"};
		if(idx==num.length-2){return padn=num+"0"};
		{return padn=num};
		}


	function sB(de,ea,sx,fr){
		i=parent.si;
		for (ix=0; ix<i; ix++)
			if(de==parent.selection[ix]){
				if(parent.rg[ix]==1){
					parent.rg[ix]=0
					return};				 
				parent.qty[ix]=0;
				parent.selection[ix]="["+parent.selection[ix]+"]";
				parent.cost[ix]=0;
				parent.each[ix]=0;
				parent.special[ix]="*UNTICKED*";
				parent.fr[ix]="DEL";
				totup(i-1);
				rts();
				return};
		parent.selection[i]=de;
		parent.each[i]=ea;
		parent.special[i]=sx;
		parent.fr[i]=fr; 
		parent.qty[i]=1; parent.ufg[i]=0; parent.cost[i]=ea;
		totup(i);
		rts();
		parent.si++;
		}


	function rk(fr){
		end=parent.si;
		count=0;
		while(count<end){
			if(parent.fr[count]==fr){
				parent.rg[count]=1
				document.adw.elements[parent.selection[count]].click()
				}
			count++
			}
		}


	function rut(){
		parent.R_bot.document.selectForm.total.value=pod(parent.fdt);
		} 

		
	function rts(){
		parent.R_bot.document.selectForm.total.value=pod(parent.totsing/100);
		} 


	function newTotal(kname,newQty){
		k=parseInt(kname.substring(4,8))-1000;
		nq=parseInt(newQty);
		if((nq!=newQty)||(nq<0))
			{nq=prompt("QUANTITY ERROR!    Only figures of 0 or greater are accepted.\n\nPlease enter the new Quantity here:","");
			if ((nq==null)||(parseInt(nq)!=nq))
				{nq="0"};
			document.orderHC.elements[k*3].value=nq};
		parent.qty[k]=nq;
		if(nq==0){
			parent.special[k]="*CANCELLED*";
			parent.selection[k]="00";
			parent.each[k]=0;
			parent.fr[k]="DEL";
			document.orderHC.elements[k*3+1].value="*CANCEL*";
			};
		document.orderHC.elements[k*3+2].value=parent.special[k];
		parent.cost[k]=pod(nq*(parent.each[k]*100)/100);
		totup(parent.si-1);
		ft();
		if(parent.pix>0){
			tf(parent.xp)
			}
		}


	function specIns(kname,newTxt){
		k=parseInt(kname.substring(2,6))-1000;
		parent.special[k]=newTxt;
		}


	function mu(kname,newUfg){
		k=parseInt(kname.substring(1,5))-1000;
		parent.ufg[k]=newUfg;
		}


	function details(){
		for(j=0;j<end;j++){
			var desc=parent.selection[j]+" @ "+parent.each[j];
			}
		}


	function addOther(lv){
		parent.other=0;
		if(lv==""){lv="0"};
		sstr=lv.substring(0,1);
		lv=lv-0;
		sv=""+lv;
		sstrlh=sv.substring(0,3);
		if(sstrlh=="NaN"){alert("PRICE FORMAT INCORRECT\nPlease enter total as Pounds-dot-Pence.\n(For example: 13.75)");
			lv=0;
			document.orderHC.xr_Extras_Cost_ct.focus()};
		if(sstr=="."){lv="0"+lv};
		pv=parseInt(100*lv);
		document.orderHC.xr_Extras_Cost_ct.value=pod(lv);
		parent.other=pv;
		totup(parent.si-1);
		ft();
		}


	function textwrite(){
//alert("textwrite called");
		document.open();
		document.write('<SCRIPT SRC="js_javascript.js"></SCRIPT>');
		document.write("<H3><font color=brown>Please supply the following Order:</font></H3>");
//		document.write("<p>"+top.buyer);
//		document.write("<p>"+top.addr+"<p>");
//		buddy=buddy+top.buyer+cr+top.addr+cr;
		i=0; j=0;
		while(i<end){
			if(parent.qty[i]>0){
				document.write(parent.qty[i]+" x ");
//				buddy=buddy+(parent.qty[i]+" x ");
				document.write(parent.selection[i]+" @ "+parent.each[i]+" ");
//				buddy=buddy+(parent.selection[i]+" @ "+parent.each[i]+" ");
				document.write(parent.special[i]+"<br>");
//				buddy=buddy+(parent.special[i]+" ___ ");
				};
			j++
			i++
			};
		if(parent.otherTxt>""){
			document.write("<p>Also<br>"+parent.otherTxt);
//			buddy=buddy+("Also: "+parent.otherTxt);
			};
		if(parent.other>0){
			document.write(" (total: "+pod(parent.other/100)+")")
//			buddy=buddy+(" (total: "+pod(parent.other/100)+")")
			};
		document.write("<p>Total of All Items: "+pod(parent.totall/100));
//		buddy=buddy+(" ___ Total of All Items: "+pod(parent.totall/100));
		document.write("<br>Less Discount: "+pod(parent.dc));
//		buddy=buddy+(" ___ Less Discount: "+pod(parent.dc));
		document.write("<br>Makes: "+parent.fdt);
//		buddy=buddy+(" ___ Makes: "+parent.fdt);
		document.write("<br>Plus Postage: "+pod(parent.xp/100));
//		buddy=buddy+(" ___ Plus Postage: "+pod(parent.xp/100));
		document.write("<br>Total Due: £"+pod(parent.due));
//		buddy=buddy+(" ___ Total Due: £"+pod(parent.due));
		if (parent.pyx==1){word="Cheque"};
		if (parent.pyx==2){word="Other Method: please specify!"};
		if (parent.pyx<1){word="PayPal"};
		document.write("<br>Payment by: "+word);
//		buddy=buddy+(" ___ Payment by: "+word);
//		document.write("<p><font color=red size=+1>Holiday Time again!");
//		document.write("<br>Your order may be sent at any time, but please note that nothing can be processed until 24th Oct 2011.</font>");
//		document.write("<p>If you have an Email Client installed, the following link will write this email, ready for you to send.<p>");
//		document.write('<a href="mailto:' + email +'?subject=' +subject+ '&body=' +("Please supply to: ___ "+buddy)+ '">' + 'Create Email Order' + '<'+'/a>');
		document.write("<p>You now need to copy the above text (Select, Copy, then Paste) into an ordinary email, together with your name and address, and send it by your usual system to:<p>");
		document.write('<A HREF="MAILTO: hc@machin-stamp.co.uk">hc@machin-stamp.co.uk</A>');
		document.write("<p>Your order will be confirmed as soon as possible.");
		document.close();
		}


	function formwrite(){
//alert("formwrite called");
	document.write("<H3>These are your selections:</H3><PRE><P></PRE>");
	document.write("<TABLE BGCOLOR=FFFFE0 width=82% border=0>");
	document.write("<TR><TD WIDTH=7><FONT COLOR=navy><PRE> <U>QTY</U></TD><TD WIDTH=8><FONT COLOR=navy><PRE>  <U>ITEM</U>  <U>&amp;</U></TD><TD WIDTH=9><FONT COLOR=navy><PRE> <U>PRICE</U></TD><TD><FONT COLOR=navy><PRE>  <U>DETAILS (Add comments)</U></TD></TR>");
	end=parent.si;
	if(parent.fdt==0){
	    document.write("<TR><TD colspan=4 align=center><FONT COLOR='NAVY'><PRE><I><B>** NOTHING SELECTED, SO FAR. **</B></I></TD></TR>");
		};
	i=0; j=0;
	while(i<end){
			document.write("<TR><TD colspan=4 NOWRAP><input name='xrc_"+(j+1000)+"q' size=3 value=0 onChange='newTotal(this.name,this.value)'>&nbsp;");
			document.orderHC.elements[j*3].value=parent.qty[i];
			document.write("<INPUT TYPE='TEXT' NAME='c_"+(j+1000)+"s' TYPE='text' SIZE=20 onFocus='blur()'>&nbsp;");
			document.orderHC.elements[j*3+1].value=parent.selection[i]+" @ "+parent.each[i];
			document.write("<INPUT NAME='c_"+(j+1000)+"x' TYPE='text' value='' SIZE=29 onChange='specIns(this.name,this.value)'></TD></TR>");
			document.orderHC.elements[j*3+2].value=parent.special[i];
		j++
		i++
		};
	document.write("<TR><TD colspan=2 valign=parent><FONT COLOR='NAVY'><CENTER><PRE><B>Extra Items: </B>\n\n\n\nPlease enter \nthe  <B>Total   \nprice</B> of any \n<B>Extra  items </B>\nbelow.       </CENTER></FONT></TD><TD colspan=2><TextArea name='xr_Extras_ct' rows=7 cols=37 onChange='parent.otherTxt=this.value'></textarea></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE><B>Extras Total: </B>&#163;</TD><TD><INPUT NAME='xr_Extras_Cost_ct' TYPE='text' SIZE=9 onChange='addOther(this.value)'></TD><TD><FONT COLOR='NAVY'><PRE> Please add, if applicable.</FONT></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>+ Selections= &#163;</TD><TD ><INPUT NAME='xr_Items_Total_ct' TYPE='text' SIZE=9 value='0' onFocus='blur()'></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>- Discount: &#163;</TD><TD><INPUT NAME='xr_Discount_ct' TYPE='text' SIZE=8 value='0' onFocus='blur()'></TD><TD><FONT COLOR='NAVY'><PRE>(Where applicable).</FONT></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>Making: &#163;</TD><TD><INPUT NAME='xr_Makes_ct' TYPE='text' SIZE=9 value='0' onFocus='blur()'></TD><TD><FONT COLOR='NAVY'><PRE> Postage is extra, see below.</FONT></TD></TR>");
	ft();
	details();
	if(parent.otherTxt>""){
		document.orderHC.xr_Extras_ct.value=parent.otherTxt};
	if(parent.other>0){
		document.orderHC.xr_Extras_Cost_ct.value=pod(parent.other/100)};
	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* Postage:</B> </TD><TD COLSPAN=3><PRE><select name="xr_Post_ct" size=1 onChange="psb(this.selectedIndex);"><option value="0_blank">Please select a postage method<option value="46_UK Ord">UK Ordinary (46p)<option value="0_UK Free">FREE (UK only, orders over &#163;15)<option value="545_UK Spec">UK Special Delivery (&pound;5.45)<option value="130_Europe">EUROPE Airmail [own risk] (&pound;1.30)<option value="894_EU Sig">EUROPE Signed for Airmail (&pound;8.94)<option value="207_WW Ord">WORLDWIDE Airmail [own risk](&pound;2.07)<option value="952_WW Sig">WORLDWIDE Signed for Airmail (&pound;9.52)</select></TD></TR>');
	document.write("<TR><TD colspan=2 align=right><FONT COLOR='NAVY'><PRE>Final Total: &#163; </TD><TD COLSPAN=1><INPUT NAME='xr_Final_Total_ct' TYPE='text' SIZE=9> </FONT></TD><TD> </TD></TR>");
	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* Payment:</B> </TD><TD COLSPAN=2><PRE><select name="xr_Pay_By_ct" size=1 onChange="pyb(this.selectedIndex);"><option value="PayPal">PayPal&nbsp;<option value="chq">Sterling Cheque<option value="Other">Other Method</select></TD></TR>');
//	document.write("<TR><TD colspan=2 valign=parent><FONT COLOR='NAVY'><CENTER><PRE><B>* Your Name: </B></CENTER></FONT></TD><TD colspan=2><Input Type='text' name='xr_Name_ct' rows=7 cols=37 onChange='top.buyer=this.value'></TD></TR>");
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE>Customer No: </TD><TD><input name="xr_Customer_No_ct" size=6></TD><TD><FONT COLOR="NAVY"><PRE> (if known)</TD></TR>');
//	document.write('<TR><TD colspan=2 align=right valign=parent><FONT COLOR="NAVY"><PRE><B>* Address:</B> </TD><TD colspan=2><Input Type="text" name="xr_Address_ct" size=60 onChange="top.addr=this.value"></FONT></TD></TR>');
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* E-mail:</B> </TD><TD colspan=2><input name="xr_E_mail_ct" size=36></FONT></TD></TR>');
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE>Telephone: </TD><TD colspan=2><input name="xr_Phone_ct" size=36></FONT></TD></TR>');
	document.write("<TR><TD colspan=4><PRE> </TD></TR>");
	document.write('<TR><td> </td><td> </td><td><input type="button" value="Prepare List of Ordered Items" onClick="textwrite()"></td><TD>&nbsp;&nbsp;</td><TD>&nbsp;&nbsp;<input type="reset" value="Clear All Items" onClick="clearall()"></TD></TR>');
	document.write("<TR><TD colspan=4><PRE> </TD></TR>");
	document.write("</TABLE>");
	if (end==0){
		document.orderHC.reset();
		};
	}


	function ft(){
			document.orderHC.xr_Items_Total_ct.value=pod(parent.totall/100);
			if (parent.totall>=1){
				document.orderHC.xr_Discount_ct.value=parent.dc;
				document.orderHC.xr_Makes_ct.value=parent.fdt;
							}
			else{
		 		 document.orderHC.xr_Discount_ct.value=0;
		 		 document.orderHC.xr_Makes_ct.value=pod(parent.totall/100);
				 		 	};
			}


	function totup(nd){
		tup=0;
		for(j=0;j<nd+1;j++){
			tup+=parseInt(eval(parent.cost[j]*100+.01))
			};
		parent.totsing=tup;
		parent.totall=eval(tup+parent.other);
		if (parent.totall>=2500){
		    ta10=parent.totall*10;
			d10=Math.round(ta10/100)*10;
			m10=ta10-d10;
			parent.dc=pod(d10/1000);
			parent.fdt=pod(m10/1000);
			parent.due=parent.fdt;
			
			}
		else{
			parent.dc=0; //Discount;
			parent.fdt=pod(parent.totall/100);
			}
		}


	function psb(ix){
		po=document.orderHC.xr_Post_ct.options[ix].value;
		px=parseInt(po);
		tf(px);
		parent.pix=ix;
		parent.xp=px;
		htp();
	}


	function pyb(ix){
		parent.pyx=ix;
		htp();
	}


	 function tf(px){
		mkn=Math.round(document.orderHC.xr_Makes_ct.value*100+px)/100;
		document.orderHC.xr_Final_Total_ct.value=pod(mkn);
		parent.due=mkn;
	}


	  function htp(){
		document.orderHC.xr_Pay_By_ct.focus();
	}


	function clearall(){
		parent.si=0;parent.totsing=0;parent.other=0;parent.otherTxt="";
		parent.totall=0;parent.dc=0;parent.fdt=0;parent.pix=0;parent.xp=0;
	}		


	function validate(){
		if(document.orderHC.xr_E_mail_ct.value==""){
			alert("Error: Form is still incomplete. Please enter at least your E-Mail Address!");}
		else {document.orderHC.submit();}
	}


		var email=('adw232bhr+orderhc@gmail.com');
		var subject=('Order to Hampstead Castle');
		var body=buddy;
	function form12write(){
alert("form12write called");
	document.write("<H3>These are your selections:</H3><PRE><P></PRE>");
	document.write("<TABLE BGCOLOR=FFFFE0 width=82% border=0>");
	document.write("<TR><TD WIDTH=7><FONT COLOR=navy><PRE> <U>QTY</U></TD><TD WIDTH=8><FONT COLOR=navy><PRE>  <U>ITEM</U>  <U>&amp;</U></TD><TD WIDTH=9><FONT COLOR=navy><PRE> <U>PRICE</U></TD><TD><FONT COLOR=navy><PRE>  <U>DETAILS (Add comments)</U></TD></TR>");
	end=parent.si;
	if(parent.fdt==0){
	    document.write("<TR><TD colspan=4 align=center><FONT COLOR='NAVY'><PRE><I><B>** NOTHING SELECTED, SO FAR. **</B></I></TD></TR>");
		};
	i=0; j=0;
	while(i<end){
			document.write("<TR><TD colspan=4 NOWRAP><input name='xrc_"+(j+1000)+"q' size=3 value=0 onChange='newTotal(this.name,this.value)'>&nbsp;");
			document.orderHC.elements[j*3].value=parent.qty[i];
			document.write("<INPUT TYPE='TEXT' NAME='c_"+(j+1000)+"s' TYPE='text' SIZE=20 onFocus='blur()'>&nbsp;");
			document.orderHC.elements[j*3+1].value=parent.selection[i]+" @ "+parent.each[i];
			document.write("<INPUT NAME='c_"+(j+1000)+"x' TYPE='text' value='' SIZE=29 onChange='specIns(this.name,this.value)'></TD></TR>");
			document.orderHC.elements[j*3+2].value=parent.special[i];
		j++
		i++
		};
	document.write("<TR><TD colspan=2 valign=parent><FONT COLOR='NAVY'><CENTER><PRE><B>Extra Items: </B>\n\n\n\nPlease enter \nthe  <B>Total   \nprice</B> of any \n<B>Extra  items </B>\nbelow.       </CENTER></FONT></TD><TD colspan=2><TextArea name='xr_Extras_ct' rows=7 cols=37 onChange='parent.otherTxt=this.value'></textarea></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE><B>Extras Total: </B>&#163;</TD><TD><INPUT NAME='xr_Extras_Cost_ct' TYPE='text' SIZE=9 onChange='addOther(this.value)'></TD><TD><FONT COLOR='NAVY'><PRE> Please add, if applicable.</FONT></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>+ Selections= &#163;</TD><TD ><INPUT NAME='xr_Items_Total_ct' TYPE='text' SIZE=9 value='0' onFocus='blur()'></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>- Discount: &#163;</TD><TD><INPUT NAME='xr_Discount_ct' TYPE='text' SIZE=8 value='0' onFocus='blur()'></TD><TD><FONT COLOR='NAVY'><PRE>(Where applicable).</FONT></TD></TR>");
	document.write("<TR><TD COLSPAN=2 align=right><FONT COLOR='NAVY'><PRE>Making: &#163;</TD><TD><INPUT NAME='xr_Makes_ct' TYPE='text' SIZE=9 value='0' onFocus='blur()'></TD><TD><FONT COLOR='NAVY'><PRE> Postage is extra, see below.</FONT></TD></TR>");
	ft();
	details();
	if(parent.otherTxt>""){
		document.orderHC.xr_Extras_ct.value=parent.otherTxt};
	if(parent.other>0){
		document.orderHC.xr_Extras_Cost_ct.value=pod(parent.other/100)};
	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* Postage:</B> </TD><TD COLSPAN=3><PRE><select name="xr_Post_ct" size=1 onChange="psb(this.selectedIndex);"><option value="0_blank">Please select a postage method<option value="46_UK Ord">UK Ordinary (46p)<option value="0_UK Free">FREE (UK only, orders over &#163;15)<option value="545_UK Spec">UK Special Delivery (&pound;5.45)<option value="130_Europe">EUROPE Airmail [own risk] (&pound;1.30)<option value="894_EU Sig">EUROPE Signed for Airmail (&pound;8.94)<option value="207_WW Ord">WORLDWIDE Airmail [own risk](&pound;2.07)<option value="952_WW Sig">WORLDWIDE Signed for Airmail (&pound;9.52)</select></TD></TR>');
	document.write("<TR><TD colspan=2 align=right><FONT COLOR='NAVY'><PRE>Final Total: &#163; </TD><TD COLSPAN=1><INPUT NAME='xr_Final_Total_ct' TYPE='text' SIZE=9> </FONT></TD><TD> </TD></TR>");
	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* Payment:</B> </TD><TD COLSPAN=2><PRE><select name="xr_Pay_By_ct" size=1 onChange="pyb(this.selectedIndex);"><option value="PayPal">PayPal&nbsp;<option value="chq">Sterling Cheque<option value="Other">Other Method</select></TD></TR>');
//	document.write("<TR><TD colspan=2 valign=parent><FONT COLOR='NAVY'><CENTER><PRE><B>* Your Name: </B></CENTER></FONT></TD><TD colspan=2><Input Type='text' name='xr_Name_ct' rows=7 cols=37 onChange='top.buyer=this.value'></TD></TR>");
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE>Customer No: </TD><TD><input name="xr_Customer_No_ct" size=6></TD><TD><FONT COLOR="NAVY"><PRE> (if known)</TD></TR>');
//	document.write('<TR><TD colspan=2 align=right valign=parent><FONT COLOR="NAVY"><PRE><B>* Address:</B> </TD><TD colspan=2><Input Type="text" name="xr_Address_ct" size=60 onChange="top.addr=this.value"></FONT></TD></TR>');
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE><B>* E-mail:</B> </TD><TD colspan=2><input name="xr_E_mail_ct" size=36></FONT></TD></TR>');
//	document.write('<TR><TD colspan=2 align=right><FONT COLOR="NAVY"><PRE>Telephone: </TD><TD colspan=2><input name="xr_Phone_ct" size=36></FONT></TD></TR>');
	document.write("<TR><TD colspan=4><PRE> </TD></TR>");
	document.write('<TR><td> </td><td> </td><td><input type="button" value="Prepare List of Ordered Items" onClick="textwrite()"></td><TD>&nbsp;&nbsp;</td><TD>&nbsp;&nbsp;<input type="reset" value="Clear All Items" onClick="clearall()"></TD></TR>');
	document.write("<TR><TD colspan=4><PRE> </TD></TR>");
	document.write("</TABLE>");
	if (end==0){
		document.orderHC.reset();
		};
	}


	function text12write(){
alert("text12write called");
	document.open();
	document.write('<SCRIPT SRC="js_javascript.js"></SCRIPT>');
	document.write("<H3><font color=brown>Please supply the following Order:</font></H3>");
//	document.write("<p>"+top.buyer);
//	document.write("<p>"+top.addr+"<p>");
//	buddy=buddy+top.buyer+cr+top.addr+cr;
	i=0; j=0;
	while(i<end){
		if(parent.qty[i]>0){
			document.write(parent.qty[i]+" x ");
//			buddy=buddy+(parent.qty[i]+" x ");
			document.write(parent.selection[i]+" @ "+parent.each[i]+" ");
//			buddy=buddy+(parent.selection[i]+" @ "+parent.each[i]+" ");
			document.write(parent.special[i]+"<br>");
//			buddy=buddy+(parent.special[i]+" ___ ");
			};
		j++
		i++
		};
	if(parent.otherTxt>""){
		document.write("<p>Also<br>"+parent.otherTxt);
//		buddy=buddy+("Also: "+parent.otherTxt);
		};
	if(parent.other>0){
	   document.write(" (total: "+pod(parent.other/100)+")")
//	   buddy=buddy+(" (total: "+pod(parent.other/100)+")")
	   };
	document.write("<p>Total of All Items: "+pod(parent.totall/100));
//	buddy=buddy+(" ___ Total of All Items: "+pod(parent.totall/100));
	document.write("<br>Less Discount: "+pod(parent.dc));
//	buddy=buddy+(" ___ Less Discount: "+pod(parent.dc));
	document.write("<br>Makes: "+parent.fdt);
//	buddy=buddy+(" ___ Makes: "+parent.fdt);
	document.write("<br>Plus Postage: "+pod(parent.xp/100));
//	buddy=buddy+(" ___ Plus Postage: "+pod(parent.xp/100));
	document.write("<br>Total Due: £"+pod(parent.due));
//	buddy=buddy+(" ___ Total Due: £"+pod(parent.due));
		if (parent.pyx==1){word="Cheque"};
		if (parent.pyx==2){word="Other Method: please specify!"};
		if (parent.pyx<1){word="PayPal"};
	document.write("<br>Payment by: "+word);
//	buddy=buddy+(" ___ Payment by: "+word);
//	document.write("<p><font color=red size=+1>Holiday Time again!");
//	document.write("<br>Your order may be sent at any time, but please note that nothing can be processed before Oct 19th 2010.</font>");
	
//	document.write("<p>If you have an Email Client installed, the following link will write this email, ready for you to send.<p>");
//	document.write('<a href="mailto:' + email +'?subject=' +subject+ '&body=' +("Please supply to: ___ "+buddy)+ '">' + 'Create Email Order' + '<'+'/a>');
	document.write("<p>You now need to copy the above text (Select, Copy, then Paste) into an ordinary email, together with your name and address, and send it by your usual system to:<p>");
	document.write('<A HREF="MAILTO: hc@machin-stamp.co.uk">hc@machin-stamp.co.uk</A>');
	document.write("<p>Your order will be confirmed as soon as possible.");
	document.close();
	};


