function showEvent(id){
//	createPopUp();
//	$('#divPopUp').animate({ width: 640, height: 480 },500,function() { showLoading(640,480) });

//	ajax1 = initAjax();
//	ajax1.open("GET", daSite + "service.aspx?action=events&id=" + id + "&date=" + Date(), true);
//	ajax1.onreadystatechange = handleLoadEventsItem;
//	ajax1.send(null);

	location.href = "http://watersportscentral.net/wsc/events.htm" + id;

}

function handleLoadEventsItem(){
	if(checkReadyState(ajax1)){
    var myObj = eval('(' + ajax1.responseText + ')');
    var o = myObj.events;
    if(o.length>0){

    }
	}
}

function showNews(id){
//	createPopUp();
//	$('#divPopUp').animate({ width: 640, height: 480 },500,function() { });

//	ajax1 = initAjax();
//	ajax1.open("GET", daSite + "service.aspx?action=news&id=" + id + "&date=" + Date(), true);
//	ajax1.onreadystatechange = handleLoadNewsItem;
//	ajax1.send(null);

	location.href = "http://watersportscentral.net/wsc/news.htm" + id;
}

function handleLoadNewsItem(){
	if(checkReadyState(ajax1)){
		alert(ajax1.responseText)
    var myObj = eval('(' + ajax1.responseText + ')');
    var o = myObj.news;
    if(o.length>0){

    }
	}
}

function checkEmailAddress(){
	if(checkEmail(document.getElementById("inputEmail").value))
		location.href="http://watersportscentral.net/wsc/Default.htm" + document.getElementById("inputEmail").value;
	else
		alert("Please enter a valid email address");

}

function checkEmail(str){
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
		testresults=true
	else{
		testresults=false
	}
	return (testresults)
}

