function emailCheck(emailStr){
var checkTLD=0
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s"+specialChars+"\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars+'+'
var word="("+atom+"|"+quotedUser+")"
var userPat=new RegExp("^"+word+"(\\."+word+")*$")
var domainPat=new RegExp("^"+atom+"(\\."+atom+")*$")
var matchArray=emailStr.match(emailPat)
if(matchArray==null){
alert("Email address seems incorrect check it contains '@' and the correct amount of '.'s) This is essential to receive your code")
return false}
var user=matchArray[1]
var domain=matchArray[2]
for(i=0;i<user.length;i++){
if(user.charCodeAt(i)>127){
alert("Ths username contains invalid characters. Please verify or contact us for help")
return false}}
for(i=0;i<domain.length;i++){
if(domain.charCodeAt(i)>127){
alert("Ths email domain name contains invalid characters. Please verify or contact us for help")
return false}}
if(user.match(userPat)==null){
alert("The email username doesn't seem to be valid. Please verify or contact us for help")
return false}
var IPArray=domain.match(ipDomainPat)
if(IPArray!=null){
for(var i=1;i<=4;i++){
if(IPArray[i]>255){
alert("Destination IP address is invalid!")
return false}}
return true}
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("The email domain name does not seem to be valid. Please verify or contact us for help")
return false}}
if(checkTLD&&domArr[domArr.length-1].length!=2&&
domArr[domArr.length-1].search(knownDomsPat)==-1){
alert("The address must end in a well-known domain or two letter "+"country.")
return false}
if(len<2){
alert("This address is missing a hostname! Please verify or contact us for help")
return false}
return true}

function SubmitPause(){
if(emailCheck(document.search.email_address.value)==true){
// busyBox.Show()
TB_show('please wait','', 'waiting')
// setTimeout("busyBox.Hide()",5000)
setTimeout("pause()",4500)}
return false}
function pause(){
if(emailCheck(document.search.email_address.value)==true){
document.search.submit()}
return false}
function BusyBox(varName,imageCount,imageNamePrefix,imageNameSuffix,imageDelay){
this.VarName=varName
this.ImageCount=imageCount
this.ImageNamePrefix=imageNamePrefix
this.ImageNameSuffix=imageNameSuffix
this.ImageDelay=imageDelay
this.timeout_id=null
this.CurrentImageIndex=0
this.CacheImages()
this.div=document.getElementById("BusyBoxDiv")
this.img=document.getElementById("BusyBoxImg")
this.Hide()}
BusyBox.prototype.Center=function(){
var div=this.div
var objLeft=(document.documentElement.clientWidth-div.offsetWidth+7)/2
var objTop=(document.documentElement.clientHeight-div.offsetHeight)/2
objLeft=objLeft+document.documentElement.scrollLeft
objTop=objTop+document.documentElement.scrollTop
div.style.position="absolute"
div.style.top=objTop+"px"
div.style.left=objLeft+"px"}
BusyBox.prototype.CacheImages=function(){
this.Images=new Array(this.ImageCount)
for(var i=0;i<this.ImageCount;i++){
this.Images[i]=new Image()
this.Images[i].src=this.ImageNamePrefix+i+this.ImageNameSuffix}}
BusyBox.prototype.IsAnimating=function(){
return this.timeout_id !=null}
BusyBox.prototype.IsVisible=function(){
return this.div.style.visibility=="visible"&&this.div.style.width>0}
BusyBox.prototype.Animate=function(){
this.img.src=this.Images[this.CurrentImageIndex].src
this.Center()
this.CurrentImageIndex=(this.CurrentImageIndex+1)%this.ImageCount
this.timeout_id=setTimeout(this.VarName+".Animate();",this.ImageDelay)}
BusyBox.prototype.StartAnimate=function(){
if(this.IsAnimating())
return
this.Animate()}
BusyBox.prototype.StopAnimate=function(){
clearTimeout(this.timeout_id)
this.timeout_id=null}
BusyBox.prototype.Hide=function(){
this.StopAnimate()
this.div.style.left="-1000px"
this.div.style.top="-1000px"}
BusyBox.prototype.Show=function(){
if(this.IsAnimating()|| this.IsVisible())
return
this.Center()
this.div.style.visibility="visible"
this.div.style.zIndex="999999"
this.StartAnimate()}
