function checkLogin(){
	var un = document.getElementById('email').value;
	var pwd = document.getElementById('password').value;

	formXmlHttpSubmit('checkLogin.php', 'un='+un + '&pwd=' + pwd , checkLoginCB);
	return false
}	
function checkLoginCB(v){
	v = new String(v);
	var y = v.substring(0,1) == 1;
	var s = v.substring(1,v.length);
	if (y) location.href= s;
	else document.getElementById('results').innerHTML = s;
}

function init(){
	var m = document.getElementById('main').style.display="block";
	
	var n = document.getElementById('nojs').style.display="none";
	/*if (!document.getElementById) */
	//check items here
	var url = location.search;
	var regex=/msg=timeout/g;
	if (regex.test(url)) document.getElementById('results').innerHTML = "Your session has timed out. Please login again.<br><br>If you are having difficulty, please contact us via the \"Suggestions\" link above."
	var regex=/msg=welcome/g;
	if (regex.test(url)) document.getElementById('results').innerHTML = "Welcome to the BoulderEast.com PoolBike. Please log in.<br>Any questions or suggestions, please click on the \"Suggestions\" link above."
}
onload = init;
