function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail adress. Please retype")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail adress. Please retype")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail adress. Please retype")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail adress. Please retype")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail adress. Please retype")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail adress. Please retype")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail adress. Please retype")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmSample.stremail
	var nameID=document.frmSample.strname
	
	if ((nameID.value==null)||(nameID.value=="")||(nameID.value=="Your full name")){
		alert("Please Enter your Name")
		nameID.focus()
		return false
	}
	if ((emailID.value==null)||(emailID.value=="")||(emailID.value=="your@email.com")){
		alert("Please Enter your Email")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }


function GetPage(url, divtag) {
	var myblock = document.getElementById(divtag);
		myblock.innerHTML = "<font face='Verdana' style='font-size: 11px'><br>loading..";
var xmlhttp=false;

//var strstatus= WriteStatus(divtag)
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}


	var mydivtag = document.getElementById(divtag);
	 xmlhttp.open("GET", url, true);
	 xmlhttp.onreadystatechange=function() {
	  if (xmlhttp.readyState==4) {
		  mydivtag.innerHTML= xmlhttp.responseText;
		  urchinTracker(url);
	  }
	}
 xmlhttp.send(null)
 xmlhttp.close
}

function sendstatus(div, message) {
	var myblock = document.getElementById(div);
		myblock.innerHTML = '+message+';
	}


