	
	
	//Create a boolean variable to check for a valid Internet Explorer instance.
	var xmlhttp = false;
	
	//Check if we are using IE.
	try {
		//If the Javascript version is greater than 5.
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		//If not, then use the older active x object.
		try {
			//If we are using MS.
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			//Else we must be using a non-IE browser.
			xmlhttp = false;
		}
	}
	
	//If we are using a non-IE browser, create a javascript instance of the object.
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	
	
	function makerequest(serverPage, objID) {
		
		var obj = document.getElementById(objID);
		xmlhttp.open("GET", serverPage);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				obj.innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	}

	function ajax(url,target)
	 {
			// native XMLHttpRequest object
		 document.getElementById(target).innerHTML = 'loading...';
		 if (window.XMLHttpRequest) {
				 req = new XMLHttpRequest();
				 req.onreadystatechange = function() {ajaxDone(target);};
				 req.open("GET", url, true);
				 req.send(null);
		 // IE/Windows ActiveX version
		 } else if (window.ActiveXObject) {
				 req = new ActiveXObject("Microsoft.XMLHTTP");
				 if (req) {
						 req.onreadystatechange = function() {ajaxDone(target);};
						 req.open("GET", url, true);
						 req.send();
				 }
		 }
				 setTimeout("ajax(url,target)", 10000);
	}
	
	function ajaxDone(target) {
		// only if req is "loaded"
		if (req.readyState == 4) {
			// only if "OK"
			if (req.status == 200 || req.status == 304) {
				results = req.responseText;
				document.getElementById(target).innerHTML = results;
			} else {
				document.getElementById(target).innerHTML="ajax error:\n" +
				req.statusText;
			}
		}
	}

	function ajaxRequest(url,target,message)
	 {
			// native XMLHttpRequest object
		 document.getElementById(target).innerHTML = message;
		 if (window.XMLHttpRequest) {
				 req = new XMLHttpRequest();
				 req.onreadystatechange = function() {ajaxDone(target);};
				 req.open("GET", url, true);
				 req.send(null);
		 // IE/Windows ActiveX version
		 } else if (window.ActiveXObject) {
				 req = new ActiveXObject("Microsoft.XMLHTTP");
				 if (req) {
						 req.onreadystatechange = function() {ajaxDone(target);};
						 req.open("GET", url, true);
						 req.send();
				 }
		 }
				// setTimeout("ajax(url,target)", 10000);
	}


	var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);}
	// -->
	
function submitForm(id){
	id.form.submit();
}

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("Please enter a valid eMail!");
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
			alert("Please enter a valid eMail!");
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
			alert("Please enter a valid eMail!");
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
			alert("Please enter a valid eMail!");
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			alert("Please enter a valid eMail!");
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
			alert("Please enter a valid eMail!");
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
			alert("Please enter a valid eMail!");
		    return false
		 }

 		 return true					
	}
	