function check_email(e)
{
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++)
	{
		if(ok.indexOf(e.charAt(i))<0)
		{
			return (false);
		}
	}

	if (document.images)
	{
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two))
		{
			return (-1);
		}
	}
}

function clearForm(oForm)
{
	oForm.reset();
}

function submitForm(oForm)
{
	if (check_form(oForm))
		oForm.submit();
}

function trim(str)
{
    if(!str || typeof str != 'string')
        return null;
    return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
}



/*function alphanumeric(alphane)
{
	var numaric = alphane;
	for(var j=0; j&lt;numaric.length; j++)
		{
		  var alphaa = numaric.charAt(j);
		  var hh = alphaa.charCodeAt(0);
		  alert(hh);
		  return;
		  if((hh &gt; 47 &amp;&amp; hh&lt;58) || (hh &gt; 64 &amp;&amp; hh&lt;91) || (hh &gt; 96 &amp;&amp; hh&lt;123))
		  {
		  }
		else	{
			 return false;
		  }
		}
 return true;
}

*/
//function createRequestObject() 
//{
//	var ro;
//	var browser = navigator.appName;
//	if(browser == "Microsoft Internet Explorer"){
//		ro = new ActiveXObject(”Microsoft.XMLHTTP”);
//	}else{
//		ro = new XMLHttpRequest();
//	}
//	return ro;
//}


/*	var http = createRequestObject();

	function checkAvailablity()
	{
		http.open(’get’, ‘ajax_username.asp?username=’+document.form1.newuserid.value);
		http.onreadystatechange = handleResponse;
		http.send(null);
	}

	function handleResponse()
	{
		if(http.readyState == 4){
			var response = http.responseText;
			var update = new Array();

			if(response.indexOf(’|’ != -1)) {
				update = response.split(’|’);
				document.getElementById("username_chk").innerHTML = update[0];
			}
		}
	}*/