var blim=32; var dir="up"; var xobj=null; var ie=document.all; var ns4=document.layers; var dom=document.getElementById; function nostatus() { window.status="";return true; } function $(id) { return document.getElementById(id) } function initbox() { if (!dom&&!ie&&!ns4) return; xobj=(dom)?$("dropin") : ie? document.all.dropin : document.dropin; scroll_top=(ie)? document.body.scrollTop : window.pageYOffset; xobj.style.top=scroll_top-250 + "px"; xobj.style.visibility=(dom||ie)? "visible" : "show"; dropstart=setInterval("dropin()", 50); } function dropin(){ scroll_top=(ie)? document.body.scrollTop : window.pageYOffset; if (parseInt(xobj.style.top)<100+scroll_top) xobj.style.top=parseInt(xobj.style.top) + 40 + "px"; else{ clearInterval (dropstart); bouncestart=setInterval("bouncein()", 50) } } function bouncein(){ xobj.style.top=parseInt(xobj.style.top)-blim + "px"; if (blim<0) blim+=8; blim=blim * -1; if (blim==0){clearInterval (bouncestart)} } function dismissbox(){ if (window.bouncestart) clearInterval(bouncestart); xobj.style.visibility="hidden"; } function set_class(el,cls) { el.setAttribute("class",cls); el.setAttribute("className",cls); } function checkform() { var isok=true; var errs=new Array; var ne=/^[a-z]{2}[a-z]*([ ]+[a-z\'-]+)*$/i; var ee=/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/i; var nc=$("Name"); var ec=$("Email1"); if (ne.test(nc.value)) { set_class(nc,"valid"); } else { errs.push("Name"); set_class(nc,"invalid") } if (ee.test(ec.value)) { set_class(ec,"valid"); } else { errs.push("Email"); set_class(ec,"invalid") } var tx,st; var el=$('errs'); if (errs.length>0) { isok=false; tx="Please correct Your "+errs.join(", "); st="block"; } else { tx=""; st="none"; } if (el) { el.innerHTML=tx; el.style.display=st; } return isok; } window.onload=function() { var i=0; var al=document.getElementsByTagName("a"); if (al) while (i < al.length) { al[i].onmouseover=nostatus;i++; } var fr=$("form1"); if (fr) {fr.onsubmit=function() {return checkform()}} if ($("dropin")) { setTimeout("initbox()",5000) } }