var fieldstocheck = new Array(); 
fieldnames = new Array(); 
function checkform() { 
for (i=0;i<fieldstocheck.length;i++) { 
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") { 
alert("Please enter your "+fieldnames[i]); 
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()"); 
return false;
} 
}   

   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.forms['subscribeform'].elements['email'].value;
   if(reg.test(address) == false) {
      alert('Invalid Email Address');
eval("document.subscribeform.email.focus()"); 
      return false;
   }

if(!document.subscribeform.tandc.checked){alert("Please Read the Terms and Conditions and click the tick box to confirm");return false; }

return true; 
} 
function addFieldToCheck(value,name) { 
fieldstocheck[fieldstocheck.length] = value; 
fieldnames[fieldnames.length] = name; 
} 

function newwindow() 
{ 
window.open('tandc.html','jav','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=500,left = 15,top = 30'); 
}
