<!--
//New 2008 version to work with order.php on https


// PDB (2008) - corrected bug whereby deleting an item threw the numbering of the items out of sync resulting, in turn, in the variables sent to orders.php being wrongly numbered.

// PDB (Oct 2008) - New version to work with paypal and Worldpay

// PDB (Dec 2008) - New version to work with paypal, Worldpay + protx

// PDB (Feb 2009) - Postage Rate message

// PDB (March 2009) - Modifications to Protx part - delivery instructions

// PDB (June 2009) - Charities using worldpay / impress now get delivery and billing fields
// PDB (June 2009) - amended functions  ProdQuote() and AddProdToQuote() to get pack size from datafile

// PDB (Feb 2010) - added fields to enabled emailing of orders to charities



function ProdQuote(cd,d,size,catN,up,q,h,ps)

{this.psize=size;
	this.cd=cd;

	this.desc=d;
	this.cat=catN;

	this.up=up;

	this.qty=q;

	this.cost=fa(q*up);

	this.h=h;

	this.ps=ps;

	return this;}

window.name="W142465";
var iNextProd=1,fOrderTotal=0.0,prods=new Array(), DelivCost=0.0,iItems=0,iDS=0,Sch="",TName="",Tu1=0.0,PCode=null,iTT=0;

function DelItem(i3)

{with (prods[i3]) 

	{iItems-=qty;

		qty=0;

		fOrderTotal-=cost;

		cost=0.0;}					

ShowBasket();
}

var ln,lq,lup,agt=navigator.userAgent.toLowerCase(),is32=((agt.indexOf("95")!=-1)||(agt.indexOf("nt"!=-1))),isie=(agt.indexOf("msie")!=-1),iver=parseInt(navigator.appVersion);

function GetProdDet(inp,cd,res,but)

{ var i=iNextProd-1;

  for (var n =1;n<=i;n++)

  { if (cd==prods[n].cd)

    { inp.value=prods[n].qty;

      res.value=fa(prods[n].qty*prods[n].up);

      but.value="add to basket";}

  }}



function Reset()

{for (m=0; m<iNextProd; m++) 	

	prods[m]=null;

	iNextProd=1;

	fOrderTotal=0.00;

	iItems=0;

	Tu1=0.0;

	return true;}

function cp(in1,up,out1) {lq=in1.value;

	if (!IsInt(lq)) 

		lq=0;

		ln=eval(fa(lq*up));

		lup=up;

		out1.value=fa(lq*up);}

function fa(nVal)

{nVal=Math.round(parseFloat(nVal)*100)/100;

	sVal=""+nVal;

 	if (sVal.indexOf(".")==0)

		nVal="0"+sVal;

	if (sVal.indexOf(".")==-1)

		sVal=sVal+".";

	while ((sVal.indexOf(".")+1)>(sVal.length-2))

		sVal=sVal+"0";

		return sVal;}

function IsInt(s)

{if (s.length == 0)

	return false;

 	for (var n=0; n<s.length; n++)

  		if (s.substring(n,n+1)<"0"||s.substring(n, n+1)>"9")

			{alert("invalid number ["+s+"]");

				return false;}

		return true;}


function OrderForm()	{parent.frames[1].document.location="order.htm"}
var iNoSelects=0, sln=new Array("");

function AddProdToQuote(cd,desc,psize,cat,up,qty,h,ps)

{ var i=iNextProd,iP=i;

 if (cd!="")

	{for (n=1; n<i; n++) 

		if (prods[n].cd==cd)

			{iP=n;

			self.status=desc+" updated";

			break}

  		if (iP==i)

			{self.status=desc+" added"; 

			prods[iNextProd++]=new ProdQuote(cd,desc,psize,cat,lup,lq,h,ps);}

  		else

			{with (prods[iP])

				{iItems-=qty;

				qty=lq;

				up=lup;	

				fOrderTotal-=cost;cost=ln;}

	}

  	fOrderTotal+=ln;

	iItems+=(lq*1); }

ShowBasket();
parent.frames[1].document.OrderButton.focus(); 

return false;}


function ShowBasket()			//Must have <form> tags even though no send action

{top.dc(top.iDS);  



var cDoc = parent.frames[1].document; 

cDoc.open();









wr("<HEAD>");
wr("<LINK REL=\"StyleSheet\" HREF=\"../cccs10.css\" type=\"text/css\"><style>a.info{position:relative; z-index:24; background-color:#ccc;color:#000;text-decoration:none}a.info:hover{z-index:25; background-color:#fff}a.info span{display: none}a.info:hover span{display:block;position:absolute;top:2em; left:-10em; width:15em;border:1px solid #0cf;background-color:#cff; color:#000;text-aligncenter}</style>");


// validation script
wr("<script>function MM_validateForm() {if (document.getElementById){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);if (val) { nm=val.name; if ((val=val.value)!='') {if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.';} else if (test!='R') { num = parseFloat(val);if (isNaN(val)) errors+='- '+nm+' must contain a number.';if (test.indexOf('inRange') != -1) { p=test.indexOf(':');min=test.substring(8,p); max=test.substring(p+1);if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.'; }} if (errors) alert('The following error(s) occurred:'+errors);document.MM_returnValue = (errors == '');} }</script>");

// email validation
wr("<script language = 'Javascript'>function echeck(str) {var at='@';var dot='.';var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if (str.indexOf(at)==-1){alert('Invalid E-mail Address');return false;}if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert('Invalid E-mail Address'); return false;}if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert('Invalid E-mail Address'); return false;} if (str.indexOf(at,(lat+1))!=-1){ alert('Invalid E-mail Address'); return false; }if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){  alert('Invalid E-mail Address');  return false } if (str.indexOf(dot,(lat+2))==-1){ alert('Invalid E-mail Address');  return false } if (str.indexOf(' ')!=-1){alert('Invalid E-mail Address');  return false }return true					}function ValidateForm(){var emailID=document.form1.Email;if ((emailID.value==null)||(emailID.value=='')){alert('Please Enter your Email Address');emailID.focus();return false}if (echeck(emailID.value)==false){emailID.value='';	emailID.focus();return false}return true}</script>");
																																																																																																																																																																																																																																																																	   
																																																																																																																																																																																																																																																																	   








 wr("</HEAD><BODY TEXT=NAVY BGCOLOR=white LINK=NAVY VLINK=NAVY><BASEFONT SIZE=2 FACE='arial'>");



// If using cardstream need to email
if (cardstream_ID != "") {

wr("<!--<p id=t7>Shopping Basket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Order date: "+lastDate+"</p>--><FORM action=\"../order_process.php\" method=\"post\" onSubmit=\"MM_validateForm('Name','','R','Address1','','R','Delivery_Address','','R','Town','','R','County','','R','Postcode','','R','donation','','NisNum');return document.MM_returnValue&&ValidateForm()\" name=form1><TABLE CELLBORDER=0 CELLPADDING=0 CELLSPACING=0 BORDER=1 BORDERCOLOR=#006300 BGCOLOR=WHITE WIDTH=100%>");
}




// If using sagepay need to validate form
if (sagepay_VendorName != "") {

wr("<p id=t7>Shopping Basket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Order date: "+lastDate+"</p><FORM action=\"../order_process.php\" method=\"post\" onSubmit=\"MM_validateForm('name','','R','Billing_address','','R','Billing_postcode','','R','Delivery_Address','','R','Delivery_postcode','','R','donation','','NisNum');return document.MM_returnValue&&ValidateForm()\" name=form1><TABLE CELLBORDER=0 CELLPADDING=0 CELLSPACING=0 BORDER=1 BORDERCOLOR=#006300 BGCOLOR=WHITE WIDTH=100%>");
}



// If using worldpay / impress need to validate form  
else if (worldpay_impress == "TRUE") { 

wr("<p id=t7>Shopping Basket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Order date: "+lastDate+"</p><FORM action=\"../order_process.php\" method=\"post\" onSubmit=\"MM_validateForm('First_Name','','R','Second_Name','','R','Address1','','R','Delivery_Address','','R','Town','','R','County','','R','Postcode','','R','donation','','NisNum');return document.MM_returnValue&&ValidateForm()\" name=form1><TABLE CELLBORDER=0 CELLPADDING=0 CELLSPACING=0 BORDER=1 BORDERCOLOR=#006300 BGCOLOR=WHITE WIDTH=100%>");
}

else { 

wr("<p id=t7>Shopping Basket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Order date: "+lastDate+"</p><FORM action=\"../order_process.php\" method=\"post\"><TABLE CELLBORDER=0 CELLPADDING=0 CELLSPACING=0 BORDER=1 BORDERCOLOR=#006300 BGCOLOR=WHITE WIDTH=100%>");
}





wr("<input type=\"hidden\" name=\"cmd\" value=\"_cart\"><input type=\"hidden\" name=\"upload\" value=\"1\"><input type=\"hidden\" name=\"currency_code\" value=\"GBP\"><input type=\"hidden\" name=\"upload\" value=\"1\">");
wr("<input type=\"hidden\" name=\"basketLive\" value=\""+basketLive+"\">");

wr("<input type=\"hidden\" name=\"sagepay_VendorName\" value=\""+sagepay_VendorName+"\">");
wr("<input type=\"hidden\" name=\"sagepay_EncryptionPassword\" value=\""+sagepay_EncryptionPassword+"\">");
wr("<input type=\"hidden\" name=\"sagepayStatus\" value=\""+sagepayStatus+"\">");

wr("<input type=\"hidden\" name=\"enqEM1\" value=\""+enqEM1+"\">");
wr("<input type=\"hidden\" name=\"enqEM2\" value=\""+enqEM2+"\">");

wr("<input type=\"hidden\" name=\"cardstream_ID\" value=\""+cardstream_ID+"\">");
wr("<input type=\"hidden\" name=\"cardstream_Password\" value=\""+cardstream_Password+"\">");
wr("<input type=\"hidden\" name=\"cardstream_email1\" value=\""+cardstream_email1+"\">");
wr("<input type=\"hidden\" name=\"cardstream_email2\" value=\""+cardstream_email2+"\">");


wr("<input type=\"hidden\" name=\"instId\" value=\""+worldpay_instId+"\">");
wr("<input type=\"hidden\" name=\"accId\" value=\""+worldpay_accId+"\">");
wr("<input type=\"hidden\" name=\"worldpayStatus\" value=\""+worldpayStatus+"\">");
wr("<input type=\"hidden\" name=\"worldpay_impress\" value=\""+worldpay_impress+"\">");

wr("<input type=\"hidden\" name=\"business1\" value=\""+paypal_email1+"\">");
wr("<input type=\"hidden\" name=\"business2\" value=\""+paypal_email2+"\">");
wr("<input type=\"hidden\" name=\"paypal_charityLogo\" value=\""+paypal_charityLogo+"\">");
wr("<input type=hidden value=\""+charityName+"\" name=charityName><input type=hidden value=\""+folder+"\" name=folder>");


wr("<input type=\"hidden\" name=\"notify_a_email1\" value=\""+notify_a_email1+"\">");
wr("<input type=\"hidden\" name=\"notify_a_email2\" value=\""+notify_a_email2+"\">");
wr("<input type=\"hidden\" name=\"notify_b_email1\" value=\""+notify_b_email1+"\">");
wr("<input type=\"hidden\" name=\"notify_b_email2\" value=\""+notify_b_email2+"\">");
wr("<input type=\"hidden\" name=\"notify_c_email1\" value=\""+notify_c_email1+"\">");
wr("<input type=\"hidden\" name=\"notify_c_email2\" value=\""+notify_c_email2+"\">");
wr("<input type=\"hidden\" name=\"newsletter_email1\" value=\""+newsletter_email1+"\">");
wr("<input type=\"hidden\" name=\"newsletter_email2\" value=\""+newsletter_email2+"\">");


wr("<TR><TD id=t4>Item</td><TD id=t4>Unit Price</td><TD id=t4>Quantity</td><TD id=t4>Cost (&#163;)</td>");
wr("<TD id=t4>Remove</td></tr>");

var q=0;
  for (var n=1;n<iNextProd;n++)with (prods[n])
  { if(qty==0)continue;
  q++;
  
var rand=Math.floor(Math.random()*999);
wr("<input type=\"hidden\" name=\"rand\" value=\""+rand+"\">");
  
wr("<TR><TD>&nbsp;<A id=t7 HREF="+h+">" + desc +"</A><input type=hidden value=\""+desc+"\" name=item_name_"+q+"><input type=hidden value=\""+cat+"\" name=item_number_"+q+"><input type=hidden value=\""+psize+"\" name=packsize_"+q+"></td>");
wr("<TD id=t6>"+fa(up)+ " &nbsp;<input type=hidden value="+fa(up)+" name=amount_"+q+"></td><TD id=t6> "+qty+"&nbsp;<input type=hidden value="+qty+" name=quantity_"+q+"></td>");
wr("<td id=t6>"+fa(eval(up*qty))+" &nbsp;</td><input type=hidden value=\""+fa(eval(up*qty))+"\" name=cost"+q+">");
wr("<TD ALIGN=CENTER><INPUT TYPE=CHECKBOX OnClick=\"parent.DelItem("+n+")\"></td></tr>");
}
wr("<TR><TD COLSPAN=3>&nbsp;</td>");
wr("<TD id=t3>"+fa(fOrderTotal)+" &nbsp;<input type=hidden value=\""+fa(fOrderTotal)+"\" name=total></td>");
wr("<TD>&nbsp;</td></tr></TABLE>&nbsp;<BR>");
wr("<CENTER><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=1  width=500 cellpadding=3><TR>");

var po=top.fa(top.DelivCost);
var to=top.fa(fOrderTotal);
var to2=parseFloat(po)+parseFloat(to);

wr("<TD id=t7>Delivery zone<br><SELECT  NAME=ds OnChange=\"top.dc(ds.selectedIndex);parent.frames[1].document.forms[0].dc.value=top.fa(top.DelivCost);parent.frames[1].document.forms[0].DelivCost.value=top.fa(top.DelivCost);parent.frames[1].document.forms[0].dc2.value=(parseFloat(top.fa(top.DelivCost))+parseFloat(top.fa(top.fOrderTotal))).toFixed(2);\">");

szSel=" SELECTED ";szNull="";

displayPost();
wr("</SELECT></td>");

wr("<TD id=t7><nobr>Delivery Cost</nobr><br><INPUT TYPE=TEXT SIZE=8 NAME=dc VALUE="+po+" class='inp'><input type=hidden value="+top.fa(top.DelivCost)+" name=DelivCost><input type=hidden value="+q+" name=totalno></td>");
wr("<TD id=t7><nobr>Total Cost</nobr><br><INPUT TYPE=TEXT SIZE=8 NAME=dc2 VALUE="+to2.toFixed(2)+" class='inp'></td></tr></TABLE>");






// Fields for SagePay
if (sagepay_VendorName != "") {
	
	
wr("<TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=0 width=500 cellpadding=3><TR><TD align=center><b>");
wr("Once you have finished shopping please complete the fields below</b></td></tr></table>");
	
wr("<br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=1 width=500 cellpadding=3>");

wr("<TR><TD id=t3 colspan=2 width=50%>Name  <span class=ast>*</span>&nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"name\"  id=\"name\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Email <span class=ast>*</span> &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"email\" id=\"Email\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");

wr("<TR><TD id=t3 colspan=2>Telephone &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"tel\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");

wr("<TR><TD id=t3 colspan=2>Billing Address <span class=ast>*</span> &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Billing_address\"  id=\"Billing_address\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Billing Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"addss2\" id=\"addss2\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Billing Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"addss3\"   id=\"addss3\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Billing Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"addss4\" id=\"addss4\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Billing Postal Code <span class=ast>*</span> &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Billing_postcode\"  id=\"Billing_postcode\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");

wr("<TR><TD id=t3 colspan=3  align=left><i>Delivery Address</i></td><td><font face=arial size=2>Same as Billing Address</font><input type=\"checkbox\" onclick=\"");
// auto complete delivery fields
wr("(parent.frames[1].document.forms[0].Delivery_Address.value=parent.frames[1].document.forms[0].Billing_address.value);");
wr("(parent.frames[1].document.forms[0].Delivery_Address2.value=parent.frames[1].document.forms[0].addss2.value);");
wr("(parent.frames[1].document.forms[0].Delivery_Address3.value=parent.frames[1].document.forms[0].addss3.value);");
wr("(parent.frames[1].document.forms[0].Delivery_Address4.value=parent.frames[1].document.forms[0].addss4.value);");
wr("(parent.frames[1].document.forms[0].Delivery_postcode.value=parent.frames[1].document.forms[0].Billing_postcode.value);");

																																														wr(" \"></td></tr>");
																																														
																																														wr("<TR><TD id=t3 colspan=2>Delivery Address <span class=ast>*</span> &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address\"  id=\"Delivery_Address\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Delivery Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address2\" id=\"Delivery_Address2\"    ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Delivery Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address3\"  id=\"Delivery_Address3\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Delivery Address &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address4\"  id=\"Delivery_Address4\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Delivery Postal Code <span class=ast>*</span> &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_postcode\"  id=\"Delivery_postcode\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
																																														
																																														
wr("<TR><TD id=t3 colspan=2>Delivery Country &nbsp;</td>");
wr("<TD colspan=2>");
wr("<SELECT NAME='DeliveryCountry' tabindex=230>");
wr("<OPTION VALUE='AF'>Afghanistan");
wr("<OPTION VALUE='AX'>Aland Islands");
wr("<OPTION VALUE='AL'>Albania");
wr("<OPTION VALUE='DZ'>Algeria");

wr("<OPTION VALUE='AS'>American Samoa");
wr("<OPTION VALUE='AD'>Andorra");
wr("<OPTION VALUE='AO'>Angola");
wr("<OPTION VALUE='AI'>Anguilla");
wr("<OPTION VALUE='AQ'>Antarctica");
wr("<OPTION VALUE='AG'>Antigua and Barbuda");
wr("<OPTION VALUE='AR'>Argentina");
wr("<OPTION VALUE='AM'>Armenia");
wr("<OPTION VALUE='AW'>Aruba");
wr("<OPTION VALUE='AU'>Australia");
wr("<OPTION VALUE='AT'>Austria");
wr("<OPTION VALUE='AZ'>Azerbaijan");
wr("<OPTION VALUE='BS'>Bahamas");
wr("<OPTION VALUE='BH'>Bahrain");
wr("<OPTION VALUE='BD'>Bangladesh");
wr("<OPTION VALUE='BB'>Barbados");
wr("<OPTION VALUE='BY'>Belarus");

wr("<OPTION VALUE='BE'>Belgium");
wr("<OPTION VALUE='BZ'>Belize");
wr("<OPTION VALUE='BJ'>Benin");
wr("<OPTION VALUE='BM'>Bermuda");
wr("<OPTION VALUE='BT'>Bhutan");
wr("<OPTION VALUE='BO'>Bolivia");
wr("<OPTION VALUE='BA'>Bosnia and Herzegovina");
wr("<OPTION VALUE='BW'>Botswana");
wr("<OPTION VALUE='BV'>Bouvet Island");
wr("<OPTION VALUE='BR'>Brazil");
wr("<OPTION VALUE='IO'>British Indian Ocean Territory");
wr("<OPTION VALUE='BN'>Brunei Darussalam");
wr("<OPTION VALUE='BG'>Bulgaria");
wr("<OPTION VALUE='BF'>Burkina Faso");
wr("<OPTION VALUE='BI'>Burundi");
wr("<OPTION VALUE='KH'>Cambodia");
wr("<OPTION VALUE='CM'>Cameroon");

wr("<OPTION VALUE='CA'>Canada");
wr("<OPTION VALUE='CV'>Cape Verde");
wr("<OPTION VALUE='KY'>Cayman Islands");
wr("<OPTION VALUE='CF'>Central African Republic");
wr("<OPTION VALUE='TD'>Chad");
wr("<OPTION VALUE='CL'>Chile");
wr("<OPTION VALUE='CN'>China");
wr("<OPTION VALUE='CX'>Christmas Island");
wr("<OPTION VALUE='CC'>Cocos (Keeling) Islands");
wr("<OPTION VALUE='CO'>Colombia");
wr("<OPTION VALUE='KM'>Comoros");
wr("<OPTION VALUE='CG'>Congo");
wr("<OPTION VALUE='CK'>Cook Islands");
wr("<OPTION VALUE='CR'>Costa Rica");
wr("<OPTION VALUE='CS'>country.CS");
wr("<OPTION VALUE='HR'>Croatia");
wr("<OPTION VALUE='CU'>Cuba");

wr("<OPTION VALUE='CY'>Cyprus");
wr("<OPTION VALUE='CZ'>Czech Republic");
wr("<OPTION VALUE='CI'>Côte d'Ivoire");
wr("<OPTION VALUE='DK'>Denmark");
wr("<OPTION VALUE='DJ'>Djibouti");
wr("<OPTION VALUE='DM'>Dominica");
wr("<OPTION VALUE='DO'>Dominican Republic");
wr("<OPTION VALUE='TP'>East Timor");
wr("<OPTION VALUE='EC'>Ecuador");
wr("<OPTION VALUE='EG'>Egypt");
wr("<OPTION VALUE='SV'>El salvador");
wr("<OPTION VALUE='GQ'>Equatorial Guinea");
wr("<OPTION VALUE='ER'>Eritrea");
wr("<OPTION VALUE='EE'>Estonia");
wr("<OPTION VALUE='ET'>Ethiopia");
wr("<OPTION VALUE='FK'>Falkland Islands");
wr("<OPTION VALUE='FO'>Faroe Islands");

wr("<OPTION VALUE='FJ'>Fiji");
wr("<OPTION VALUE='FI'>Finland");
wr("<OPTION VALUE='FR'>France");
wr("<OPTION VALUE='FX'>France Metropolitan");
wr("<OPTION VALUE='GF'>French Guiana");
wr("<OPTION VALUE='PF'>French Polynesia");
wr("<OPTION VALUE='TF'>French Southern Territories");
wr("<OPTION VALUE='GA'>Gabon");
wr("<OPTION VALUE='GM'>Gambia");
wr("<OPTION VALUE='GE'>Georgia");
wr("<OPTION VALUE='DE'>Germany");
wr("<OPTION VALUE='GH'>Ghana");
wr("<OPTION VALUE='GI'>Gibraltar");
wr("<OPTION VALUE='GR'>Greece");
wr("<OPTION VALUE='GL'>Greenland");
wr("<OPTION VALUE='GD'>Grenada");
wr("<OPTION VALUE='GP'>Guadeloupe");

wr("<OPTION VALUE='GU'>Guam");
wr("<OPTION VALUE='GT'>Guatemala");
wr("<OPTION VALUE='GG'>Guernsey");
wr("<OPTION VALUE='GN'>Guinea");
wr("<OPTION VALUE='GW'>Guinea-Bissau");
wr("<OPTION VALUE='GY'>Guyana");
wr("<OPTION VALUE='HT'>Haiti");
wr("<OPTION VALUE='HM'>Heard Island and McDonald Islands");
wr("<OPTION VALUE='VA'>Holy See (Vatican City State)");
wr("<OPTION VALUE='HN'>Honduras");
wr("<OPTION VALUE='HK'>Hong Kong");
wr("<OPTION VALUE='HU'>Hungary");
wr("<OPTION VALUE='IS'>Iceland");
wr("<OPTION VALUE='IN'>India");
wr("<OPTION VALUE='ID'>Indonesia");
wr("<OPTION VALUE='IR'>Iran");
wr("<OPTION VALUE='IQ'>Iraq");

wr("<OPTION VALUE='IE'>Ireland");
wr("<OPTION VALUE='IM'>Isle of Man");
wr("<OPTION VALUE='IL'>Israel");
wr("<OPTION VALUE='IT'>Italy");
wr("<OPTION VALUE='JM'>Jamaica");
wr("<OPTION VALUE='JP'>Japan");
wr("<OPTION VALUE='JE'>Jersey");
wr("<OPTION VALUE='JO'>Jordan");
wr("<OPTION VALUE='KZ'>Kazakstan");
wr("<OPTION VALUE='KE'>Kenya");
wr("<OPTION VALUE='KI'>Kiribati");
wr("<OPTION VALUE='KW'>Kuwait");
wr("<OPTION VALUE='KG'>Kyrgystan");
wr("<OPTION VALUE='LA'>Lao");
wr("<OPTION VALUE='LV'>Latvia");
wr("<OPTION VALUE='LB'>Lebanon");
wr("<OPTION VALUE='LS'>Lesotho");

wr("<OPTION VALUE='LR'>Liberia");
wr("<OPTION VALUE='LY'>Libyan Arab Jamahiriya");
wr("<OPTION VALUE='LI'>Liechtenstein");
wr("<OPTION VALUE='LT'>Lithuania");
wr("<OPTION VALUE='LU'>Luxembourg");
wr("<OPTION VALUE='MO'>Macau");
wr("<OPTION VALUE='MK'>Macedonia (FYR)");
wr("<OPTION VALUE='MG'>Madagascar");
wr("<OPTION VALUE='MW'>Malawi");
wr("<OPTION VALUE='MY'>Malaysia");
wr("<OPTION VALUE='MV'>Maldives");
wr("<OPTION VALUE='ML'>Mali");
wr("<OPTION VALUE='MT'>Malta");
wr("<OPTION VALUE='MH'>Marshall Islands");
wr("<OPTION VALUE='MQ'>Martinique");
wr("<OPTION VALUE='MR'>Mauritania");
wr("<OPTION VALUE='MU'>Mauritius");

wr("<OPTION VALUE='YT'>Mayotte");
wr("<OPTION VALUE='MX'>Mexico");
wr("<OPTION VALUE='FM'>Micronesia");
wr("<OPTION VALUE='MD'>Moldova");
wr("<OPTION VALUE='MC'>Monaco");
wr("<OPTION VALUE='MN'>Mongolia");
wr("<OPTION VALUE='MS'>Montserrat");
wr("<OPTION VALUE='MA'>Morocco");
wr("<OPTION VALUE='MZ'>Mozambique");
wr("<OPTION VALUE='MM'>Myanmar");
wr("<OPTION VALUE='NA'>Namibia");
wr("<OPTION VALUE='NR'>Nauru");
wr("<OPTION VALUE='NP'>Nepal");
wr("<OPTION VALUE='NL'>Netherlands");
wr("<OPTION VALUE='AN'>Netherlands Antilles");
wr("<OPTION VALUE='NC'>New Caledonia");
wr("<OPTION VALUE='NZ'>New Zealand");

wr("<OPTION VALUE='NI'>Nicaragua");
wr("<OPTION VALUE='NE'>Niger");
wr("<OPTION VALUE='NG'>Nigeria");
wr("<OPTION VALUE='NU'>Niue");
wr("<OPTION VALUE='NF'>Norfolk Island");
wr("<OPTION VALUE='KP'>North Korea");
wr("<OPTION VALUE='MP'>Northern Mariana Islands");
wr("<OPTION VALUE='NO'>Norway");
wr("<OPTION VALUE='OM'>Oman");
wr("<OPTION VALUE='PK'>Pakistan");
wr("<OPTION VALUE='PW'>Palau");
wr("<OPTION VALUE='PS'>Palestinian Territory Occupied");
wr("<OPTION VALUE='PA'>Panama");
wr("<OPTION VALUE='PG'>Papua New Guinea");
wr("<OPTION VALUE='PY'>Paraguay");
wr("<OPTION VALUE='PE'>Peru");
wr("<OPTION VALUE='PH'>Philippines");

wr("<OPTION VALUE='PN'>Pitcairn");
wr("<OPTION VALUE='PL'>Poland");
wr("<OPTION VALUE='PT'>Portugal");
wr("<OPTION VALUE='PR'>Puerto Rico");
wr("<OPTION VALUE='QA'>Qatar");
wr("<OPTION VALUE='ME'>Republic of Montenegro");
wr("<OPTION VALUE='RS'>Republic of Serbia");
wr("<OPTION VALUE='RE'>Reunion");
wr("<OPTION VALUE='RO'>Romania");
wr("<OPTION VALUE='RU'>Russian Federation");
wr("<OPTION VALUE='RW'>Rwanda");
wr("<OPTION VALUE='SH'>Saint Helena");
wr("<OPTION VALUE='KN'>Saint Kitts and Nevis");
wr("<OPTION VALUE='LC'>Saint Lucia");
wr("<OPTION VALUE='PM'>Saint Pierre and Miquelon");
wr("<OPTION VALUE='VC'>Saint Vincent and the Grenadines");
wr("<OPTION VALUE='WS'>Samoa");

wr("<OPTION VALUE='SM'>San Marino");
wr("<OPTION VALUE='ST'>Sao Tome and Principe");
wr("<OPTION VALUE='SA'>Saudi Arabia");
wr("<OPTION VALUE='SN'>Senegal");
wr("<OPTION VALUE='SC'>Seychelles");
wr("<OPTION VALUE='SL'>Sierra Leone");
wr("<OPTION VALUE='SG'>Singapore");
wr("<OPTION VALUE='SK'>Slovakia");
wr("<OPTION VALUE='SI'>Slovenia");
wr("<OPTION VALUE='SB'>Solomon Islands");
wr("<OPTION VALUE='SO'>Somalia");
wr("<OPTION VALUE='ZA'>South Africa");
wr("<OPTION VALUE='GS'>South Georgia");
wr("<OPTION VALUE='KR'>South Korea");
wr("<OPTION VALUE='ES'>Spain");
wr("<OPTION VALUE='LK'>Sri Lanka");
wr("<OPTION VALUE='SD'>Sudan");

wr("<OPTION VALUE='SR'>Suriname");
wr("<OPTION VALUE='SJ'>Svalbard and Jan Mayen Islands");
wr("<OPTION VALUE='SZ'>Swaziland");
wr("<OPTION VALUE='SE'>Sweden");
wr("<OPTION VALUE='CH'>Switzerland");
wr("<OPTION VALUE='SY'>Syria");
wr("<OPTION VALUE='TW'>Taiwan");
wr("<OPTION VALUE='TJ'>Tajikistan");
wr("<OPTION VALUE='TZ'>Tanzania");
wr("<OPTION VALUE='TH'>Thailand");
wr("<OPTION VALUE='CD'>The Democratic Republic of the Congo");
wr("<OPTION VALUE='TL'>Timor-Leste");
wr("<OPTION VALUE='TG'>Togo");
wr("<OPTION VALUE='TK'>Tokelau");
wr("<OPTION VALUE='TO'>Tonga");
wr("<OPTION VALUE='TT'>Trinidad and Tobago");
wr("<OPTION VALUE='TN'>Tunisia");

wr("<OPTION VALUE='TR'>Turkey");
wr("<OPTION VALUE='TM'>Turkmenistan");
wr("<OPTION VALUE='TC'>Turks and Caicos Islands");
wr("<OPTION VALUE='TV'>Tuvalu");
wr("<OPTION VALUE='UG'>Uganda");
wr("<OPTION VALUE='UA'>Ukraine");
wr("<OPTION VALUE='AE'>United Arab Emirates");
wr("<OPTION VALUE='GB' selected=selected>United Kingdom");
wr("<OPTION VALUE='US'>United States");
wr("<OPTION VALUE='UM'>United States Minor Outlying Islands");
wr("<OPTION VALUE='UY'>Uruguay");
wr("<OPTION VALUE='UZ'>Uzbekistan");
wr("<OPTION VALUE='VU'>Vanuatu");
wr("<OPTION VALUE='VE'>Venezuela");
wr("<OPTION VALUE='VN'>Viet Nam");
wr("<OPTION VALUE='VG'>Virgin Islands (British)");
wr("<OPTION VALUE='VI'>Virgin Islands (U.S.)");

wr("<OPTION VALUE='WF'>Wallis and Futuna Islands");
wr("<OPTION VALUE='EH'>Western Sahara");
wr("<OPTION VALUE='YE'>Yemen");
wr("<OPTION VALUE='YU'>Yugoslavia");
wr("<OPTION VALUE='ZR'>Zaire");
wr("<OPTION VALUE='ZM'>Zambia");
wr("<OPTION VALUE='ZW'>Zimbabwe");	
   
   
wr("</td></tr>");




wr("<TR><TD id=t3 colspan=2 valign=top>Delivery Instructions &nbsp;</td>");
wr("<TD colspan=2><textarea NAME=\"info\"  cols=30 rows=3></textarea></td></tr>");

wr("</table>");

}

// End fields for Sagepay


// fields for cardstream
if (cardstream_ID != "") {
	
	
	
wr("<TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=0 width=500 cellpadding=3><TR><TD align=center><b>");
wr("Once you have finished shopping please complete the fields below</b></td></tr></table>");
	
wr("<br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=1 width=500 cellpadding=3>");
wr("<TR><TD id=t3 colspan=3 align=left><i>Billing Address</i></td><td>&nbsp;</td></tr>");

wr("<TR><TD id=t3 colspan=2 width=50%>Name (As printed on card)<span class=ast>*</span>&nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"Name\"  id=\"Name\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Email <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"email\" id=\"Email\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");


wr("<TR><TD id=t3 colspan=2>Address<span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Address1\"    ID=\"Address1\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
//wr("<TR><TD id=t3 colspan=2>Address 2&nbsp;</td>");
//wr("<TD colspan=2><INPUT NAME=\"b_add2\"  ID=\"b_add2\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Town <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Town\"   ID=\"Town\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>County <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"County\" ID=\"County\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");

wr("<TR><TD id=t3 colspan=2>Postal Code <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Postcode\"  id=\"Postcode\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");


wr("<TR><TD id=t3 colspan=2>Country <span class=ast></span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Country\"  id=\"Country\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT value='UK'></td></tr>");
wr("<TR><TD id=t3 colspan=2>Telephone &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Telephone\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");



wr("<TR><TD id=t3 colspan=3  align=left><i>Delivery Address</i></td><td><font face=arial size=2>Same as Billing Address</font><input type=\"checkbox\" onclick=\"");
// auto complete delivery fields
wr("(parent.frames[1].document.forms[0].Delivery_Address.value=parent.frames[1].document.forms[0].Address1.value);");
//wr("(parent.frames[1].document.forms[0].del_add2.value=parent.frames[1].document.forms[0].b_add2.value);");
wr("(parent.frames[1].document.forms[0].del_town.value=parent.frames[1].document.forms[0].Town.value);");
wr("(parent.frames[1].document.forms[0].del_county.value=parent.frames[1].document.forms[0].County.value);");
wr("(parent.frames[1].document.forms[0].del_code.value=parent.frames[1].document.forms[0].Postcode.value);");

wr("(parent.frames[1].document.forms[0].del_name3.value=parent.frames[1].document.forms[0].Name.value);");
//wr("(parent.frames[1].document.forms[0].del_email.value=parent.frames[1].document.forms[0].Email.value);");
//wr("(parent.frames[1].document.forms[0].del_tel.value=parent.frames[1].document.forms[0].Telephone.value)");

																																																wr(" \"></td></tr>");
																																																
																																																
wr("<TR><TD id=t3 colspan=2 width=50%>Name &nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"del_name3\"  id=\"del_name3\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
																																						wr("<TR><TD id=t3 colspan=2>Address<span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address\"  ID=\"Delivery_Address\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
//wr("<TR><TD id=t3 colspan=2>Address 2 &nbsp;</td>");
//wr("<TD colspan=2><INPUT NAME=\"del_add2\"  ID=\"del_add2\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Town &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_town\"  ID=\"del_town\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>County &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_county\"  ID=\"del_county\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Postal Code &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_code\"  id=\"del_code\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");

wr("<TR><TD id=t3 colspan=2>Country <span class=ast></span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_country\"  id=\"del_country\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT value='UK'></td></tr>");



wr("</table>");
}
	


// End fields for cardstream



// Fields for worldpay / Impress
if (worldpay_impress == "TRUE") {
	
wr("<TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=0 width=500 cellpadding=3><TR><TD align=center><b>");
wr("Once you have finished shopping please complete the fields below</b></td></tr></table>");
	
wr("<br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=1 width=500 cellpadding=3>");
wr("<TR><TD id=t3 colspan=3 align=left><i>Billing Address</i></td><td>&nbsp;</td></tr>");
wr("<TR><TD id=t3 colspan=2 width=50%>Title &nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"b_name1\"  id=\"b_name1\"  ALIGN=LEFT SIZE=6 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2 width=50%>First Name <span class=ast>*</span>&nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"First_Name\"  id=\"First_Name\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2 width=50%>Second Name <span class=ast>*</span>&nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"Second_Name\"  id=\"Second_Name\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Email <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Email\" id=\"Email\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");


wr("<TR><TD id=t3 colspan=2>Address 1 <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Address1\"    ID=\"Address1\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Address 2&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"b_add2\"  ID=\"b_add2\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Town <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Town\"   ID=\"Town\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>County <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"County\" ID=\"County\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Postal Code <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Postcode\"  id=\"Postcode\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Telephone &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Telephone\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");



wr("<TR><TD id=t3 colspan=3  align=left><i>Delivery Address</i></td><td><font face=arial size=2>Same as Billing Address</font><input type=\"checkbox\" onclick=\"");
// auto complete delivery fields
wr("(parent.frames[1].document.forms[0].Delivery_Address.value=parent.frames[1].document.forms[0].Address1.value);");
wr("(parent.frames[1].document.forms[0].del_add2.value=parent.frames[1].document.forms[0].b_add2.value);");
wr("(parent.frames[1].document.forms[0].del_town.value=parent.frames[1].document.forms[0].Town.value);");
wr("(parent.frames[1].document.forms[0].del_county.value=parent.frames[1].document.forms[0].County.value);");
wr("(parent.frames[1].document.forms[0].del_code.value=parent.frames[1].document.forms[0].Postcode.value);");
wr("(parent.frames[1].document.forms[0].del_name1.value=parent.frames[1].document.forms[0].b_name1.value);");
wr("(parent.frames[1].document.forms[0].del_name2.value=parent.frames[1].document.forms[0].First_Name.value);");
wr("(parent.frames[1].document.forms[0].del_name3.value=parent.frames[1].document.forms[0].Second_Name.value);");
wr("(parent.frames[1].document.forms[0].del_email.value=parent.frames[1].document.forms[0].Email.value);");
wr("(parent.frames[1].document.forms[0].del_tel.value=parent.frames[1].document.forms[0].Telephone.value)");

																																																wr(" \"></td></tr>");
																																																
																																																wr("<TR><TD id=t3 colspan=2 width=50%>Title &nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"del_name1\"  id=\"del_name1\"  ALIGN=LEFT SIZE=6 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2 width=50%>First Name &nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"del_name2\"  id=\"del_name2\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2 width=50%>Second Name &nbsp;</td>");
wr("<TD width=50% colspan=2><INPUT NAME=\"del_name3\"  id=\"del_name3\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Email &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_email\" id=\"del_email\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
																																																
																																																
wr("<TR><TD id=t3 colspan=2>Address 1 <span class=ast>*</span>&nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"Delivery_Address\"  ID=\"Delivery_Address\"   ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Address 2 &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_add2\"  ID=\"del_add2\"  ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Town &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_town\"  ID=\"del_town\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>County &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_county\"  ID=\"del_county\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");
wr("<TR><TD id=t3 colspan=2>Postal Code &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_code\"  id=\"del_code\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");


wr("<TR><TD id=t3 colspan=2>Telephone &nbsp;</td>");
wr("<TD colspan=2><INPUT NAME=\"del_tel\"  id=\"del_tel\" ALIGN=LEFT SIZE=40 MAXLENGTH=40 TYPE=TEXT></td></tr>");


wr("<TR><TD id=t3 colspan=2>Country &nbsp;</td>");
wr("<TD colspan=2>");
wr("<SELECT NAME='delvCountry' tabindex=230>");
wr("<OPTION VALUE='AF'>Afghanistan");
wr("<OPTION VALUE='AX'>Aland Islands");
wr("<OPTION VALUE='AL'>Albania");
wr("<OPTION VALUE='DZ'>Algeria");

wr("<OPTION VALUE='AS'>American Samoa");
wr("<OPTION VALUE='AD'>Andorra");
wr("<OPTION VALUE='AO'>Angola");
wr("<OPTION VALUE='AI'>Anguilla");
wr("<OPTION VALUE='AQ'>Antarctica");
wr("<OPTION VALUE='AG'>Antigua and Barbuda");
wr("<OPTION VALUE='AR'>Argentina");
wr("<OPTION VALUE='AM'>Armenia");
wr("<OPTION VALUE='AW'>Aruba");
wr("<OPTION VALUE='AU'>Australia");
wr("<OPTION VALUE='AT'>Austria");
wr("<OPTION VALUE='AZ'>Azerbaijan");
wr("<OPTION VALUE='BS'>Bahamas");
wr("<OPTION VALUE='BH'>Bahrain");
wr("<OPTION VALUE='BD'>Bangladesh");
wr("<OPTION VALUE='BB'>Barbados");
wr("<OPTION VALUE='BY'>Belarus");

wr("<OPTION VALUE='BE'>Belgium");
wr("<OPTION VALUE='BZ'>Belize");
wr("<OPTION VALUE='BJ'>Benin");
wr("<OPTION VALUE='BM'>Bermuda");
wr("<OPTION VALUE='BT'>Bhutan");
wr("<OPTION VALUE='BO'>Bolivia");
wr("<OPTION VALUE='BA'>Bosnia and Herzegovina");
wr("<OPTION VALUE='BW'>Botswana");
wr("<OPTION VALUE='BV'>Bouvet Island");
wr("<OPTION VALUE='BR'>Brazil");
wr("<OPTION VALUE='IO'>British Indian Ocean Territory");
wr("<OPTION VALUE='BN'>Brunei Darussalam");
wr("<OPTION VALUE='BG'>Bulgaria");
wr("<OPTION VALUE='BF'>Burkina Faso");
wr("<OPTION VALUE='BI'>Burundi");
wr("<OPTION VALUE='KH'>Cambodia");
wr("<OPTION VALUE='CM'>Cameroon");

wr("<OPTION VALUE='CA'>Canada");
wr("<OPTION VALUE='CV'>Cape Verde");
wr("<OPTION VALUE='KY'>Cayman Islands");
wr("<OPTION VALUE='CF'>Central African Republic");
wr("<OPTION VALUE='TD'>Chad");
wr("<OPTION VALUE='CL'>Chile");
wr("<OPTION VALUE='CN'>China");
wr("<OPTION VALUE='CX'>Christmas Island");
wr("<OPTION VALUE='CC'>Cocos (Keeling) Islands");
wr("<OPTION VALUE='CO'>Colombia");
wr("<OPTION VALUE='KM'>Comoros");
wr("<OPTION VALUE='CG'>Congo");
wr("<OPTION VALUE='CK'>Cook Islands");
wr("<OPTION VALUE='CR'>Costa Rica");
wr("<OPTION VALUE='CS'>country.CS");
wr("<OPTION VALUE='HR'>Croatia");
wr("<OPTION VALUE='CU'>Cuba");

wr("<OPTION VALUE='CY'>Cyprus");
wr("<OPTION VALUE='CZ'>Czech Republic");
wr("<OPTION VALUE='CI'>Côte d'Ivoire");
wr("<OPTION VALUE='DK'>Denmark");
wr("<OPTION VALUE='DJ'>Djibouti");
wr("<OPTION VALUE='DM'>Dominica");
wr("<OPTION VALUE='DO'>Dominican Republic");
wr("<OPTION VALUE='TP'>East Timor");
wr("<OPTION VALUE='EC'>Ecuador");
wr("<OPTION VALUE='EG'>Egypt");
wr("<OPTION VALUE='SV'>El salvador");
wr("<OPTION VALUE='GQ'>Equatorial Guinea");
wr("<OPTION VALUE='ER'>Eritrea");
wr("<OPTION VALUE='EE'>Estonia");
wr("<OPTION VALUE='ET'>Ethiopia");
wr("<OPTION VALUE='FK'>Falkland Islands");
wr("<OPTION VALUE='FO'>Faroe Islands");

wr("<OPTION VALUE='FJ'>Fiji");
wr("<OPTION VALUE='FI'>Finland");
wr("<OPTION VALUE='FR'>France");
wr("<OPTION VALUE='FX'>France Metropolitan");
wr("<OPTION VALUE='GF'>French Guiana");
wr("<OPTION VALUE='PF'>French Polynesia");
wr("<OPTION VALUE='TF'>French Southern Territories");
wr("<OPTION VALUE='GA'>Gabon");
wr("<OPTION VALUE='GM'>Gambia");
wr("<OPTION VALUE='GE'>Georgia");
wr("<OPTION VALUE='DE'>Germany");
wr("<OPTION VALUE='GH'>Ghana");
wr("<OPTION VALUE='GI'>Gibraltar");
wr("<OPTION VALUE='GR'>Greece");
wr("<OPTION VALUE='GL'>Greenland");
wr("<OPTION VALUE='GD'>Grenada");
wr("<OPTION VALUE='GP'>Guadeloupe");

wr("<OPTION VALUE='GU'>Guam");
wr("<OPTION VALUE='GT'>Guatemala");
wr("<OPTION VALUE='GG'>Guernsey");
wr("<OPTION VALUE='GN'>Guinea");
wr("<OPTION VALUE='GW'>Guinea-Bissau");
wr("<OPTION VALUE='GY'>Guyana");
wr("<OPTION VALUE='HT'>Haiti");
wr("<OPTION VALUE='HM'>Heard Island and McDonald Islands");
wr("<OPTION VALUE='VA'>Holy See (Vatican City State)");
wr("<OPTION VALUE='HN'>Honduras");
wr("<OPTION VALUE='HK'>Hong Kong");
wr("<OPTION VALUE='HU'>Hungary");
wr("<OPTION VALUE='IS'>Iceland");
wr("<OPTION VALUE='IN'>India");
wr("<OPTION VALUE='ID'>Indonesia");
wr("<OPTION VALUE='IR'>Iran");
wr("<OPTION VALUE='IQ'>Iraq");

wr("<OPTION VALUE='IE'>Ireland");
wr("<OPTION VALUE='IM'>Isle of Man");
wr("<OPTION VALUE='IL'>Israel");
wr("<OPTION VALUE='IT'>Italy");
wr("<OPTION VALUE='JM'>Jamaica");
wr("<OPTION VALUE='JP'>Japan");
wr("<OPTION VALUE='JE'>Jersey");
wr("<OPTION VALUE='JO'>Jordan");
wr("<OPTION VALUE='KZ'>Kazakstan");
wr("<OPTION VALUE='KE'>Kenya");
wr("<OPTION VALUE='KI'>Kiribati");
wr("<OPTION VALUE='KW'>Kuwait");
wr("<OPTION VALUE='KG'>Kyrgystan");
wr("<OPTION VALUE='LA'>Lao");
wr("<OPTION VALUE='LV'>Latvia");
wr("<OPTION VALUE='LB'>Lebanon");
wr("<OPTION VALUE='LS'>Lesotho");

wr("<OPTION VALUE='LR'>Liberia");
wr("<OPTION VALUE='LY'>Libyan Arab Jamahiriya");
wr("<OPTION VALUE='LI'>Liechtenstein");
wr("<OPTION VALUE='LT'>Lithuania");
wr("<OPTION VALUE='LU'>Luxembourg");
wr("<OPTION VALUE='MO'>Macau");
wr("<OPTION VALUE='MK'>Macedonia (FYR)");
wr("<OPTION VALUE='MG'>Madagascar");
wr("<OPTION VALUE='MW'>Malawi");
wr("<OPTION VALUE='MY'>Malaysia");
wr("<OPTION VALUE='MV'>Maldives");
wr("<OPTION VALUE='ML'>Mali");
wr("<OPTION VALUE='MT'>Malta");
wr("<OPTION VALUE='MH'>Marshall Islands");
wr("<OPTION VALUE='MQ'>Martinique");
wr("<OPTION VALUE='MR'>Mauritania");
wr("<OPTION VALUE='MU'>Mauritius");

wr("<OPTION VALUE='YT'>Mayotte");
wr("<OPTION VALUE='MX'>Mexico");
wr("<OPTION VALUE='FM'>Micronesia");
wr("<OPTION VALUE='MD'>Moldova");
wr("<OPTION VALUE='MC'>Monaco");
wr("<OPTION VALUE='MN'>Mongolia");
wr("<OPTION VALUE='MS'>Montserrat");
wr("<OPTION VALUE='MA'>Morocco");
wr("<OPTION VALUE='MZ'>Mozambique");
wr("<OPTION VALUE='MM'>Myanmar");
wr("<OPTION VALUE='NA'>Namibia");
wr("<OPTION VALUE='NR'>Nauru");
wr("<OPTION VALUE='NP'>Nepal");
wr("<OPTION VALUE='NL'>Netherlands");
wr("<OPTION VALUE='AN'>Netherlands Antilles");
wr("<OPTION VALUE='NC'>New Caledonia");
wr("<OPTION VALUE='NZ'>New Zealand");

wr("<OPTION VALUE='NI'>Nicaragua");
wr("<OPTION VALUE='NE'>Niger");
wr("<OPTION VALUE='NG'>Nigeria");
wr("<OPTION VALUE='NU'>Niue");
wr("<OPTION VALUE='NF'>Norfolk Island");
wr("<OPTION VALUE='KP'>North Korea");
wr("<OPTION VALUE='MP'>Northern Mariana Islands");
wr("<OPTION VALUE='NO'>Norway");
wr("<OPTION VALUE='OM'>Oman");
wr("<OPTION VALUE='PK'>Pakistan");
wr("<OPTION VALUE='PW'>Palau");
wr("<OPTION VALUE='PS'>Palestinian Territory Occupied");
wr("<OPTION VALUE='PA'>Panama");
wr("<OPTION VALUE='PG'>Papua New Guinea");
wr("<OPTION VALUE='PY'>Paraguay");
wr("<OPTION VALUE='PE'>Peru");
wr("<OPTION VALUE='PH'>Philippines");

wr("<OPTION VALUE='PN'>Pitcairn");
wr("<OPTION VALUE='PL'>Poland");
wr("<OPTION VALUE='PT'>Portugal");
wr("<OPTION VALUE='PR'>Puerto Rico");
wr("<OPTION VALUE='QA'>Qatar");
wr("<OPTION VALUE='ME'>Republic of Montenegro");
wr("<OPTION VALUE='RS'>Republic of Serbia");
wr("<OPTION VALUE='RE'>Reunion");
wr("<OPTION VALUE='RO'>Romania");
wr("<OPTION VALUE='RU'>Russian Federation");
wr("<OPTION VALUE='RW'>Rwanda");
wr("<OPTION VALUE='SH'>Saint Helena");
wr("<OPTION VALUE='KN'>Saint Kitts and Nevis");
wr("<OPTION VALUE='LC'>Saint Lucia");
wr("<OPTION VALUE='PM'>Saint Pierre and Miquelon");
wr("<OPTION VALUE='VC'>Saint Vincent and the Grenadines");
wr("<OPTION VALUE='WS'>Samoa");

wr("<OPTION VALUE='SM'>San Marino");
wr("<OPTION VALUE='ST'>Sao Tome and Principe");
wr("<OPTION VALUE='SA'>Saudi Arabia");
wr("<OPTION VALUE='SN'>Senegal");
wr("<OPTION VALUE='SC'>Seychelles");
wr("<OPTION VALUE='SL'>Sierra Leone");
wr("<OPTION VALUE='SG'>Singapore");
wr("<OPTION VALUE='SK'>Slovakia");
wr("<OPTION VALUE='SI'>Slovenia");
wr("<OPTION VALUE='SB'>Solomon Islands");
wr("<OPTION VALUE='SO'>Somalia");
wr("<OPTION VALUE='ZA'>South Africa");
wr("<OPTION VALUE='GS'>South Georgia");
wr("<OPTION VALUE='KR'>South Korea");
wr("<OPTION VALUE='ES'>Spain");
wr("<OPTION VALUE='LK'>Sri Lanka");
wr("<OPTION VALUE='SD'>Sudan");

wr("<OPTION VALUE='SR'>Suriname");
wr("<OPTION VALUE='SJ'>Svalbard and Jan Mayen Islands");
wr("<OPTION VALUE='SZ'>Swaziland");
wr("<OPTION VALUE='SE'>Sweden");
wr("<OPTION VALUE='CH'>Switzerland");
wr("<OPTION VALUE='SY'>Syria");
wr("<OPTION VALUE='TW'>Taiwan");
wr("<OPTION VALUE='TJ'>Tajikistan");
wr("<OPTION VALUE='TZ'>Tanzania");
wr("<OPTION VALUE='TH'>Thailand");
wr("<OPTION VALUE='CD'>The Democratic Republic of the Congo");
wr("<OPTION VALUE='TL'>Timor-Leste");
wr("<OPTION VALUE='TG'>Togo");
wr("<OPTION VALUE='TK'>Tokelau");
wr("<OPTION VALUE='TO'>Tonga");
wr("<OPTION VALUE='TT'>Trinidad and Tobago");
wr("<OPTION VALUE='TN'>Tunisia");

wr("<OPTION VALUE='TR'>Turkey");
wr("<OPTION VALUE='TM'>Turkmenistan");
wr("<OPTION VALUE='TC'>Turks and Caicos Islands");
wr("<OPTION VALUE='TV'>Tuvalu");
wr("<OPTION VALUE='UG'>Uganda");
wr("<OPTION VALUE='UA'>Ukraine");
wr("<OPTION VALUE='AE'>United Arab Emirates");
wr("<OPTION VALUE='GB' selected=selected>United Kingdom");
wr("<OPTION VALUE='US'>United States");
wr("<OPTION VALUE='UM'>United States Minor Outlying Islands");
wr("<OPTION VALUE='UY'>Uruguay");
wr("<OPTION VALUE='UZ'>Uzbekistan");
wr("<OPTION VALUE='VU'>Vanuatu");
wr("<OPTION VALUE='VE'>Venezuela");
wr("<OPTION VALUE='VN'>Viet Nam");
wr("<OPTION VALUE='VG'>Virgin Islands (British)");
wr("<OPTION VALUE='VI'>Virgin Islands (U.S.)");

wr("<OPTION VALUE='WF'>Wallis and Futuna Islands");
wr("<OPTION VALUE='EH'>Western Sahara");
wr("<OPTION VALUE='YE'>Yemen");
wr("<OPTION VALUE='YU'>Yugoslavia");
wr("<OPTION VALUE='ZR'>Zaire");
wr("<OPTION VALUE='ZM'>Zambia");
wr("<OPTION VALUE='ZW'>Zimbabwe");	
   
   
wr("</td></tr>");
//wr("<TR><TD id=t3 colspan=2 valign=top>Delivery Instructions &nbsp;</td>");
//wr("<TD colspan=2><textarea NAME=\"MC_info\"  cols=30 rows=3></textarea></td></tr>");

wr("</table>");
}
// End fields for worldpay / impress










	






wr("<script>function openMsg2(){document.getElementById('msg2').style.visibility = 'visible';}function closeMsg2(){document.getElementById('msg2').style.visibility = 'hidden';}</script>");

wr("<script>function openMsg4(){document.getElementById('msg4').style.visibility = 'visible';}function closeMsg4(){document.getElementById('msg4').style.visibility = 'hidden';}</script>");



wr("<span id=msg4 style='top:380px;left:300px;height:100px'><b><font size = +2 face = arial><center>POSTAGE  RATES</b></font><br><font face = arial><br>Please check that<br> you have selected the correct<br> postage rate</b></font></center></span>");






wr("<!CENTER><br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=1 width=500 cellpadding=3><TR>");
wr("<TD id=t7>If you would like to include a <b>DONATION</b>  please enter the amount as a number in £'s&nbsp</td>");
wr("<TD id=t7><style>a.info{position:relative; z-index:24; text-decoration:none}a.info:hover{z-index:25;}a.info span{display: none}a.info:hover span{display:block;position:absolute; width:20em;border:1px solid maroon;background-color:#fff; color:navy; font-weight:normal;text-align: center;padding:10px}a.inf{position:relative; z-index:24; text-decoration:none}a.inf:hover{z-index:25;}a.inf span{display: none}a.inf:hover span{display:block;position:absolute;top:80px;right:0em; width:20em;border:1px solid maroon;background-color:#fff; color:navy; font-weight:normal;text-align: center;padding:10px}</style><INPUT TYPE=TEXT SIZE=8 NAME=donation id=donation VALUE=''></td></tr><tr><TD id=t7>Make your donation go further; check box if you are a qualifying taxpayer, and we can reclaim tax on your gift</td>");
wr("<TD id=t7><a href='javascript:void(0)' class='info' ><INPUT TYPE=checkbox SIZE=8 NAME='tax' VALUE='taxpayer' class=info style='background-color:#fff'>");
																														  
wr("<span style='border:1px solid maroon;height:200px;top:80px;right:0em;'><b><font size = +2 face = arial><center>GIFT AID</b></font><br><font face = arial>I would like the tax on this donation to be reclaimed. I can confirm that I am currently a UK taxpayer and the amount of income/capital gains tax I pay exceeds the amount I would like the charity to claim. This action will allow the charity to recover at least a further 25p for every £1.00 I donate. Tick box to qualify.</b></font></center></span></a></td></tr>");

if (newsletter == "TRUE") {
wr("<tr><TD id=t7>Please do not add me to your mailing list</td>");
wr("<TD id=t7><INPUT TYPE=checkbox SIZE=8 NAME='newsletter_opt_out' VALUE='opt_out' style='background-color:#fff'></td></tr>");
}

wr("</TABLE>");






wr("<!CENTER><br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=0 width=500 cellpadding=3><TR>");







wr("<!CENTER><br><TABLE BGCOLOR=WHITE CELLSPACING=0 BORDER=0><TR><TD>");
																							  
if (basketLive == "TRUE") {	
wr("<a href='javascript:void(0)' class=info><INPUT TYPE=submit id=t2 VALUE=\"Submit Order\" !OnClick=\"parent.OrderForm()\" class=info><span style='border:1px solid maroon;height:100px;absolute;left:-270px;top:30px'><b><font size = +2 face = arial><center>POSTAGE  RATES</b></font><br><font face = arial><br>Please check that<br> you have selected the correct<br> postage rate</b></font></center></span>");
}
if (basketLive == "FALSE") {																							
wr("<a><INPUT TYPE=button id=t2 VALUE=\"Charity not yet open for sales; try later\">");
}
																																																																																wr("<input type=\"hidden\" name=\"newsletter_checkbox_enabled\" value=\""+newsletter+"\">");
																																									wr("</td></tr></table></FORM>");


wr("<br><TABLE align = center>");
wr("<tr><td align =center><A HREF=\"javascript:history.back()\" id=t2>Back</a></td><td align =center><A HREF=\"post.html\" id=t2>Full Postage rates</a></td></tr></table>");
wr("<br><table><tr><td id=t9><br>Have you selected the correct postal zone?</td></tr>");
wr("<tr><td id=t9>If no rates quoted for your country, contact charity directly<br><br><br><br></td></tr>");
wr("</table>");





wr("</CENTER></BODY>");


cDoc.close();

}

function ShowImg(p2,n2,h,w,hr,inu)

{top.cit=inu;

var is="<html><BODY BGCOLOR=WHITE><A HREF="+hr+"><IMG SRC="+p2; 

if (h>0) is+=" HEIGHT="+h+" WIDTH="+w;

 	is+=" BORDER=0 ALT=\"return to "+n2+"\"></A></BODY></html>";

 	this.frames[1].document.write(is);

	this.frames[1].document.close();}



function dc(sch) {top.iDS=sch;top.DelivCost=(sch==3?ds3():(sch==2?ds2():(sch==1?ds1():(sch==0?ds0():0))));}



function cpl0(){top.cp(document.forms[0].inp0,cardPrice[cardIndex],document.forms[0].res0);return true;}

//function folder(){top.cp(document.forms[0].folder);return true;}

//For this file

function wr(txt) {parent.frames[1].document.write(txt);}  

//This used in card.htm

function wr1(txt) {document.write(txt);} 






//-->
