function emailCheck (emailStr) {

/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \" . [] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars +"\]";

/* The following pattern applies if the"user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g."jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom +"|" + quotedUser +")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word +"(\\." + word +")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom +"(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("We cannot process your registration because you have not entered an email address or the email address you have entered is not valid.");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("This is not a valid email address.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("This is not a valid email address.");
return false;
   }
}

// See if"user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("This is not a valid email address.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("This is not a valid email address.");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom +"$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("This is not a valid email address.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("This is not a valid email address.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This is not a valid email address.");
return false;
}
	else 
	{	
return true;
	}
} 

// Script for interactive country select dropdowns

	var array1 = null;
	var array2 = null;
	
	var uk = new Array();
	uk[0] ="United Kingdom";
	
	var uk_val = new Array();
	uk_val[0] ="UK";

var eu = new Array();
	eu[0] ="Austria";
	eu[1] ="Belgium";
	eu[2] ="Cyprus";
	eu[3] ="Czech Republic";
	eu[4] ="Denmark";
	eu[5] ="Estonia";
	eu[6] ="Finland";
	eu[7] ="France";
	eu[8] ="Germany";
	eu[9] ="Greece";
	eu[10] ="Hungary";
	eu[11] ="Ireland";
	eu[12] ="Italy";
	eu[13] ="Latvia";
	eu[14] ="Lithuania";
	eu[15] ="Luxembourg";
	eu[16] ="Malta";
	eu[17] ="Netherlands";
	eu[18] ="Poland";
	eu[19] ="Portugal";
	eu[20] ="Slovakia";
	eu[21] ="Slovenia";
	eu[22] ="Spain";
	eu[23] ="Sweden";


var eu_val = new Array();
	eu_val[0] ="AT";
	eu_val[1] ="BE";
	eu_val[2] ="CY";
	eu_val[3] ="CZ";
	eu_val[4] ="DK";
	eu_val[5] ="EE";
	eu_val[6] ="FI";
	eu_val[7] ="FR";
	eu_val[8] ="DE";
	eu_val[9] ="GR";
	eu_val[10] ="HU";
	eu_val[11] ="IE";
	eu_val[12] ="IT";
	eu_val[13] ="LV";
	eu_val[14] ="LT";
	eu_val[15] ="LU";
	eu_val[16] ="MT";
	eu_val[17] ="NL";
	eu_val[18] ="PL";
	eu_val[19] ="PT";
	eu_val[20] ="SK";
	eu_val[21] ="SI";
	eu_val[22] ="ES";
	eu_val[23] ="SE";

var eurnon = new Array();
eurnon[0] ="Albania";
eurnon[1] ="Andorra";
eurnon[2] ="Armenia";
eurnon[3] ="Azerbaijan";
eurnon[4] ="Belarus";
eurnon[5] ="Bosnia and Herzegovina";
eurnon[6] ="Bulgaria";
eurnon[7] ="Croatia";
eurnon[8] ="Faroe Islands";
eurnon[9] ="Georgia";
eurnon[10] ="Gibraltar";
eurnon[11] ="Greenland";
eurnon[12] ="Holy See (Vatican City State)";
eurnon[13] ="Iceland";
eurnon[14] ="Kazakstan";
eurnon[15] ="Kyrgystan";
eurnon[16] ="Liechtenstein";
eurnon[17] ="Macedonia (FYR)";
eurnon[18] ="Moldova";
eurnon[19] ="Monaco";
eurnon[20] ="Norway";
eurnon[21] ="Romania";
eurnon[22] ="Russian Federation";
eurnon[23] ="San Marino";
eurnon[24] ="Switzerland";
eurnon[25] ="Tajikistan";
eurnon[26] ="Turkey";
eurnon[27] ="Turkmenistan";
eurnon[28] ="Ukraine";
eurnon[29] ="Yugoslavia";

var eurnon_val = new Array();
eurnon_val[0] ="AL";
eurnon_val[1] ="AD";
eurnon_val[2] ="AM";
eurnon_val[3] ="AZ";
eurnon_val[4] ="BY";
eurnon_val[5] ="BA";
eurnon_val[6] ="BG";
eurnon_val[7] ="HR";
eurnon_val[8] ="FO";
eurnon_val[9] ="GE";
eurnon_val[10] ="GI";
eurnon_val[11] ="GL";
eurnon_val[12] ="VA";
eurnon_val[13] ="IS";
eurnon_val[14] ="KZ";
eurnon_val[15] ="KG";
eurnon_val[16] ="LI";
eurnon_val[17] ="MK";
eurnon_val[18] ="MD";
eurnon_val[19] ="MC";
eurnon_val[20] ="NO";
eurnon_val[21] ="RO";
eurnon_val[22] ="RU";
eurnon_val[23] ="SM";
eurnon_val[24] ="CH";
eurnon_val[25] ="TJ";
eurnon_val[26] ="TR";
eurnon_val[27] ="TM";
eurnon_val[28] ="UA";
eurnon_val[29] ="YU";

var row = new Array();
row[0] ="Afghanistan";
row[1 ] ="Algeria";
row[2 ] ="American Samoa";
row[3 ] ="Angola";
row[4 ] ="Anguilla";
row[5 ] ="Antarctica";
row[6 ] ="Antigua and Barbuda";
row[7 ] ="Argentina";
row[8 ] ="Aruba";
row[9 ] ="Australia";
row[10 ] ="Bahamas";
row[11 ] ="Bahrain";
row[12 ] ="Bangladesh";
row[13 ] ="Barbados";
row[14 ] ="Belize";
row[15 ] ="Benin";
row[16 ] ="Bermuda";
row[17 ] ="Bhutan";
row[18 ] ="Bolivia";
row[19 ] ="Botswana";
row[20 ] ="Bouvet Island";
row[21 ] ="Brazil";
row[22 ] ="British Indian Ocean Territory";
row[23 ] ="Brunei Darussalam";
row[24 ] ="Burkina Faso";
row[25 ] ="Burundi";
row[26 ] ="Cambodia";
row[27 ] ="Cameroon";
row[28 ] ="Canada";
row[29 ] ="Cape Verde";
row[30 ] ="Cayman Islands";
row[31 ] ="Central African Republic";
row[32 ] ="Chad";
row[33 ] ="Chile";
row[34 ] ="China";
row[35 ] ="Christmas Island";
row[36 ] ="Cocos (Keeling) Islands";
row[37 ] ="Colombia";
row[38 ] ="Comoros";
row[39 ] ="Congo";
row[40 ] ="Cook Islands";
row[41 ] ="Costa Rica";
row[42 ] ="Cuba";
row[43 ] ="Côte d'Ivoire";
row[44 ] ="Djibouti";
row[45 ] ="Dominica";
row[46 ] ="Dominican Republic";
row[47 ] ="East Timor";
row[48 ] ="Ecuador";
row[49 ] ="Egypt";
row[50 ] ="El salvador";
row[51 ] ="Equatorial Guinea";
row[52 ] ="Eritrea";
row[53 ] ="Ethiopia";
row[54 ] ="Falkland Islands";
row[55 ] ="Fiji";
row[56 ] ="French Guiana";
row[57 ] ="French Polynesia";
row[58 ] ="French Southern Territories";
row[59 ] ="Gabon";
row[60 ] ="Gambia";
row[61 ] ="Ghana";
row[62 ] ="Grenada";
row[63 ] ="Guadeloupe";
row[64 ] ="Guam";
row[65 ] ="Guatemala";
row[66 ] ="Guinea";
row[67 ] ="Guinea-Bissau";
row[68 ] ="Guyana";
row[69 ] ="Haiti";
row[70 ] ="Heard Island and McDonald Islands";
row[71 ] ="Honduras";
row[72 ] ="Hong Kong";
row[73 ] ="India";
row[74 ] ="Indonesia";
row[75 ] ="Iran";
row[76 ] ="Iraq";
row[77 ] ="Israel";
row[78 ] ="Jamaica";
row[79 ] ="Japan";
row[80 ] ="Jordan";
row[81 ] ="Kenya";
row[82 ] ="Kiribati";
row[83 ] ="Kuwait";
row[84 ] ="Lao";
row[85 ] ="Lebanon";
row[86 ] ="Lesotho";
row[87 ] ="Liberia";
row[88 ] ="Libyan Arab Jamahiriya";
row[89 ] ="Macau";
row[90 ] ="Madagascar";
row[91 ] ="Malawi";
row[92 ] ="Malaysia";
row[93 ] ="Maldives";
row[94 ] ="Mali";
row[95 ] ="Marshall Islands";
row[96 ] ="Martinique";
row[97 ] ="Mauritania";
row[98 ] ="Mauritius";
row[99 ] ="Mayotte";
row[100 ] ="Mexico";
row[101 ] ="Micronesia";
row[102 ] ="Monaco";
row[103 ] ="Mongolia";
row[104 ] ="Montserrat";
row[105 ] ="Morocco";
row[106 ] ="Mozambique";
row[107 ] ="Myanmar";
row[108 ] ="Namibia";
row[109 ] ="Nauru";
row[110 ] ="Nepal";
row[111 ] ="Netherlands Antilles";
row[112 ] ="Neutral Zone";
row[113 ] ="New Caledonia";
row[114 ] ="New Zealand";
row[115 ] ="Nicaragua";
row[116 ] ="Niger";
row[117 ] ="Nigeria";
row[118 ] ="Niue";
row[119 ] ="Norfolk Island";
row[120 ] ="North Korea";
row[121 ] ="Northern Mariana Islands";
row[122 ] ="Oman";
row[123 ] ="Pakistan";
row[124 ] ="Palau";
row[125 ] ="Panama";
row[126 ] ="Papua New Guinea";
row[127 ] ="Paraguay";
row[128 ] ="Peru";
row[129 ] ="Philippines";
row[130 ] ="Pitcairn";
row[131 ] ="Puerto Rico";
row[132 ] ="Qatar";
row[133 ] ="Reunion";
row[134 ] ="Rwanda";
row[135 ] ="Saint Helena";
row[136 ] ="Saint Kitts and Nevis";
row[137 ] ="Saint Lucia";
row[138 ] ="Saint Pierre and Miquelon";
row[139 ] ="Saint Vincent and the Grenadines";
row[140 ] ="Samoa";
row[141 ] ="Sao Tome and Principe";
row[142 ] ="Saudi Arabia";
row[143 ] ="Senegal";
row[144 ] ="Seychelles";
row[145 ] ="Sierra Leone";
row[146 ] ="Singapore";
row[147 ] ="Solomon Islands";
row[148 ] ="Somalia";
row[149 ] ="South Africa";
row[150 ] ="South Georgia";
row[151 ] ="South Korea";
row[152 ] ="Sri Lanka";
row[153 ] ="Sudan";
row[154 ] ="Suriname";
row[155 ] ="Svalbard and Jan Mayen Islands";
row[156 ] ="Swaziland";
row[157 ] ="Syria";
row[158 ] ="Taiwan";
row[159 ] ="Tanzania";
row[160 ] ="Thailand";
row[161 ] ="Togo";
row[162 ] ="Tokelau";
row[163 ] ="Tonga";
row[164 ] ="Trinidad and Tobago";
row[165 ] ="Tunisia";
row[166 ] ="Turks and Caicos Islands";
row[167 ] ="Tuvalu";
row[168 ] ="Uganda";
row[169 ] ="United Arab Emirates";
row[170 ] ="United States Minor Outlying Islands";
row[171 ] ="United States of America";
row[172 ] ="Uruguay";
row[173 ] ="Vanuatu";
row[174 ] ="Venezuela";
row[175 ] ="Viet Nam";
row[176 ] ="Virgin Islands (British)";
row[177 ] ="Virgin Islands (U.S.)";
row[178 ] ="Wallis and Futuna Islands";
row[179 ] ="Western Sahara";
row[180 ] ="Yemen";
row[181 ] ="Zaire";
row[182 ] ="Zambia";
row[183 ] ="Zimbabwe";

var row_val = new Array();
row_val[0] ="AF";
row_val[1 ] ="DZ";
row_val[2 ] ="AS";
row_val[3 ] ="AO";
row_val[4 ] ="AI";
row_val[5 ] ="AQ";
row_val[6 ] ="AG";
row_val[7 ] ="AR";
row_val[8 ] ="AW";
row_val[9 ] ="AU";
row_val[10 ] ="BS";
row_val[11 ] ="BH";
row_val[12 ] ="BD";
row_val[13 ] ="BB";
row_val[14 ] ="BZ";
row_val[15 ] ="BJ";
row_val[16 ] ="BM";
row_val[17 ] ="BT";
row_val[18 ] ="BO";
row_val[19 ] ="BW";
row_val[20 ] ="BV";
row_val[21 ] ="BR";
row_val[22 ] ="IO";
row_val[23 ] ="BN";
row_val[24 ] ="BF";
row_val[25 ] ="BI";
row_val[26 ] ="KH";
row_val[27 ] ="CM";
row_val[28 ] ="CA";
row_val[29 ] ="CV";
row_val[30 ] ="KY";
row_val[31 ] ="CF";
row_val[32 ] ="TD";
row_val[33 ] ="CL";
row_val[34 ] ="CN";
row_val[35 ] ="CX";
row_val[36 ] ="CC";
row_val[37 ] ="CO";
row_val[38 ] ="KM";
row_val[39 ] ="CG";
row_val[40 ] ="CK";
row_val[41 ] ="CR";
row_val[42 ] ="CU";
row_val[43 ] ="CI";
row_val[44 ] ="DJ";
row_val[45 ] ="DM";
row_val[46 ] ="DO";
row_val[47 ] ="TP";
row_val[48 ] ="EC";
row_val[49 ] ="EG";
row_val[50 ] ="SV";
row_val[51 ] ="GQ";
row_val[52 ] ="ER";
row_val[53 ] ="ET";
row_val[54 ] ="FK";
row_val[55 ] ="FJ";
row_val[56 ] ="GF";
row_val[57 ] ="PF";
row_val[58 ] ="TF";
row_val[59 ] ="GA";
row_val[60 ] ="GM";
row_val[61 ] ="GH";
row_val[62 ] ="GD";
row_val[63 ] ="GP";
row_val[64 ] ="GU";
row_val[65 ] ="GT";
row_val[66 ] ="GN";
row_val[67 ] ="GW";
row_val[68 ] ="GY";
row_val[69 ] ="HT";
row_val[70 ] ="HM";
row_val[71 ] ="HN";
row_val[72 ] ="HK";
row_val[73 ] ="IN";
row_val[74 ] ="ID";
row_val[75 ] ="IR";
row_val[76 ] ="IQ";
row_val[77 ] ="IL";
row_val[78 ] ="JM";
row_val[79 ] ="JP";
row_val[80 ] ="JO";
row_val[81 ] ="KE";
row_val[82 ] ="KI";
row_val[83 ] ="KW";
row_val[84 ] ="LA";
row_val[85 ] ="LB";
row_val[86 ] ="LS";
row_val[87 ] ="LR";
row_val[88 ] ="LY";
row_val[89 ] ="MO";
row_val[90 ] ="MG";
row_val[91 ] ="MW";
row_val[92 ] ="MY";
row_val[93 ] ="MV";
row_val[94 ] ="ML";
row_val[95 ] ="MH";
row_val[96 ] ="MQ";
row_val[97 ] ="MR";
row_val[98 ] ="MU";
row_val[99 ] ="YT";
row_val[100 ] ="MX";
row_val[101 ] ="FM";
row_val[102 ] ="MC";
row_val[103 ] ="MN";
row_val[104 ] ="MS";
row_val[105 ] ="MA";
row_val[106 ] ="MZ";
row_val[107 ] ="MM";
row_val[108 ] ="NA";
row_val[109 ] ="NR";
row_val[110 ] ="NP";
row_val[111 ] ="AN";
row_val[112 ] ="NT";
row_val[113 ] ="NC";
row_val[114 ] ="NZ";
row_val[115 ] ="NI";
row_val[116 ] ="NE";
row_val[117 ] ="NG";
row_val[118 ] ="NU";
row_val[119 ] ="NF";
row_val[120 ] ="KP";
row_val[121 ] ="MP";
row_val[122 ] ="OM";
row_val[123 ] ="PK";
row_val[124 ] ="PW";
row_val[125 ] ="PA";
row_val[126 ] ="PG";
row_val[127 ] ="PY";
row_val[128 ] ="PE";
row_val[129 ] ="PH";
row_val[130 ] ="PN";
row_val[131 ] ="PR";
row_val[132 ] ="QA";
row_val[133 ] ="RE";
row_val[134 ] ="RW";
row_val[135 ] ="SH";
row_val[136 ] ="KN";
row_val[137 ] ="LC";
row_val[138 ] ="PM";
row_val[139 ] ="VC";
row_val[140 ] ="WS";
row_val[141 ] ="ST";
row_val[142 ] ="SA";
row_val[143 ] ="SN";
row_val[144 ] ="SC";
row_val[145 ] ="SL";
row_val[146 ] ="SG";
row_val[147 ] ="SB";
row_val[148 ] ="SO";
row_val[149 ] ="ZA";
row_val[150 ] ="GS";
row_val[151 ] ="KR";
row_val[152 ] ="LK";
row_val[153 ] ="SD";
row_val[154 ] ="SR";
row_val[155 ] ="SJ";
row_val[156 ] ="SZ";
row_val[157 ] ="SY";
row_val[158 ] ="TW";
row_val[159 ] ="TZ";
row_val[160 ] ="TH";
row_val[161 ] ="TG";
row_val[162 ] ="TK";
row_val[163 ] ="TO";
row_val[164 ] ="TT";
row_val[165 ] ="TN";
row_val[166 ] ="TC";
row_val[167 ] ="TV";
row_val[168 ] ="UG";
row_val[169 ] ="AE";
row_val[170 ] ="UM";
row_val[171 ] ="US";
row_val[172 ] ="UY";
row_val[173 ] ="VU";
row_val[174 ] ="VE";
row_val[175 ] ="VN";
row_val[176 ] ="VG";
row_val[177 ] ="VI";
row_val[178 ] ="WF";
row_val[179 ] ="EH";
row_val[180 ] ="YE";
row_val[181 ] ="ZR";
row_val[182 ] ="ZM";
row_val[183 ] ="ZW";



//for (counter=0; counter < 4; counter++){
//if (document.checkout.worldloc[counter].checked == true){
//document.checkout.worldloc[counter].checked == false;}
//ends IF}
//ends for

function loadbox2(){

//clearing loop
var box2 = document.checkout.country.options;
for (i = 2; i < document.checkout.country.options.length; i++){
box2[i].text ="";
box2[i].value ="";
}//ends clearing FOR loop


document.checkout.country.options[0].selected = true;

//begins radio search
for (counter=0; counter < 4; counter++){
if (document.checkout.worldloc[counter].checked == true){
var choice = document.checkout.worldloc[counter].value;
}//ends IF
}//ends for

if (choice =="uk"){
array1 = uk;
array2 = uk_val;
document.checkout.country.options[2].selected = true;
}//ends first (uk) IF

if (choice =="eu"){
array1 = eu;
array2 = eu_val;
}//ends second (eu) IF

if (choice =="eurnon"){
array1 = eurnon;
array2 = eurnon_val;
}//ends third (eurnon) IF

if (choice =="row"){
array1 = row;
array2 = row_val;
}//ends fourth(row) IF

var box2 = document.checkout.country.options;

//clearing loop
for (i = 2; i < document.checkout.country.options.length; i++){
box2[i].text ="";
box2[i].value ="";
}//ends clearing FOR loop

var db_countrval ="";

for (i = 0; i < array1.length; i++){
box2[i + 2].text = array1[i];
box2[i + 2].value = array2[i];
if (box2[i + 2].value == db_countrval){
document.checkout.country.options[i + 2].selected = true;
}// ends if (array2[i]== db_countrval)
}// ends populating FOR
}//ends population function
	
function newWindow(page) {
prodWindow = window.open(page, 'prodWin', 'width=740,height=700')
prodWindow.focus()
}

function previous() {
if (document.referrer !="") {
document.write("<a href='javascript:window.location=document.referrer'>&lt&ltReturn to floral designs</a>")
} //end if
}

function smWinBuy(prod) {
opener.window.location=prod;
window.close();
}

function showHideLayerSwitch(layerName){ //this function creates the display/hide text of the news function when you click on the title
thisID = document.getElementById(layerName)
displayVar = thisID.style.display
if (displayVar == "" || displayVar == "none"){
displayVar = "block"
}
else{
displayVar = "none"
}
thisID.style.display = displayVar
}

var dvdprice="£19.95";