function sendMailData(){
			var eMail=document.getElementById("email");
			var mailInfo=eMail.value.toString();
			if ((mailInfo.length<6) || (mailInfo.indexOf(",")>=0) || (mailInfo.indexOf(";")>=0) || (mailInfo.indexOf(":")>=0) || (mailInfo.indexOf("/")>=0) || (mailInfo.indexOf(" ")>=0) || (mailInfo.indexOf("@")<=0) || (mailInfo.indexOf("@") != mailInfo.lastIndexOf("@")) || (mailInfo.lastIndexOf(".")<mailInfo.indexOf("@")) || ((mailInfo.lastIndexOf(".")+3)>mailInfo.length)) {
				eMail.style.border="solid 1px #e53282";
			}else{
				var ajax=new AjaxInterface1();
				ajax.target=eMail.parentNode;
				ajax.sendData("data=Kandy Halloween 2009 optin email - "+eMail.value,"sendMail.aspx")
				//eMail.style.display="none";
				document.getElementById("btnSend").style.display="none";
				var tempA=eMail.parentNode;
				tempA.innerHTML=tempA.innerHTML+"<div id=\"sendingData\"><h3>sending data, please wait</h3><img style='margin-left:20px;' src='images/loadinfo1.gif' /></div>"
				eMail.style.border="solid 1px #cce3f9";
				var outStr="";
				outStr+="<h2>Stay Informed From Kandy Halloween 2009</h2><h3>mail: "+document.getElementById("email").value+"</h3>";
				//tempA.getElementsByTagName("a")[0].style.display="none";
				
				
			}
		}
		function focusedBox(target){
				if(target.value.indexOf("{")!=-1){
					target.value="";
				}
		}
		function blurBox(target){
				if(target.value==""){
					target.value="{enter your email}";
				}
		} 
function AjaxInterface(){
           // Ext.MessageBox.show({title: 'Please wait...',msg: 'Initializing...',width:240,progress:true,closable:false});
            this.target="";
            this.sendData=function(params,page){
                var xmlHttpReq = false;
                var self = this;
                if (window.XMLHttpRequest) {
                    self.xmlHttpReq = new XMLHttpRequest();
                }
                else if (window.ActiveXObject) {
                    self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
                }
                self.xmlHttpReq.open('POST', page, true);
                self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                self.xmlHttpReq.onreadystatechange = function() {
                    if (self.xmlHttpReq.readyState == 4) {
                        if(self.target==""){
                        	var tempForm=document.getElementById("sendingInfo");
				            tempForm.innerHTML=self.xmlHttpReq.responseText;
			            }else{
				             self.target.innerHTML=self.xmlHttpReq.responseText;
			            }
                    }
                }
                self.xmlHttpReq.send(params);
           }
           this.getPage=function(params,page){
            var xmlHttpReq = false;
                var self = this;
                if (window.XMLHttpRequest) {
                    self.xmlHttpReq = new XMLHttpRequest();
                }
                else if (window.ActiveXObject) {
                    self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
                }
                self.xmlHttpReq.open('POST', page, true);
                self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                self.xmlHttpReq.onreadystatechange = function() {
                    if (self.xmlHttpReq.readyState == 4) {
                         //Ext.MessageBox.show({title: 'Saved Status', msg: self.xmlHttpReq.responseText,width:300,buttons: Ext.MessageBox.OK,fn: "",});
                         alert(self.xmlHttpReq.responseText)
                         setContent(self.xmlHttpReq.responseText);
                    }
                }
                self.xmlHttpReq.send(params);
           }
        }
function AjaxInterface1(){
		           // Ext.MessageBox.show({title: 'Please wait...',msg: 'Initializing...',width:240,progress:true,closable:false});
		            this.target="";
		            this.sendData=function(params,page){
		                var xmlHttpReq = false;
		                var self = this;
		                if (window.XMLHttpRequest) {
		                    self.xmlHttpReq = new XMLHttpRequest();
		                }
		                else if (window.ActiveXObject) {
		                    self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
		                }
		                self.xmlHttpReq.open('POST', page, true);
		                self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		                self.xmlHttpReq.onreadystatechange = function() {
		                    if (self.xmlHttpReq.readyState == 4) {
		                        if(self.target==""){
						           document.getElementById("sendingData").innerHTML=self.xmlHttpReq.responseText;
					              }else{
						           document.getElementById("sendingData").innerHTML=self.xmlHttpReq.responseText;
					             }
		                    }
		                }
		                self.xmlHttpReq.send(params);
		           }
		           this.getPage=function(params,page){
		            var xmlHttpReq = false;
		                var self = this;
		                if (window.XMLHttpRequest) {
		                    self.xmlHttpReq = new XMLHttpRequest();
		                }
		                else if (window.ActiveXObject) {
		                    self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
		                }
		                self.xmlHttpReq.open('POST', page, true);
		                self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		                self.xmlHttpReq.onreadystatechange = function() {
		                    if (self.xmlHttpReq.readyState == 4) {
		                         //Ext.MessageBox.show({title: 'Saved Status', msg: self.xmlHttpReq.responseText,width:300,buttons: Ext.MessageBox.OK,fn: "",});
		                         alert(self.xmlHttpReq.responseText)
		                         setContent(self.xmlHttpReq.responseText);
		                    }
		                }
		                self.xmlHttpReq.send(params);
		           }
        }