var refID
function clickJoin(refID){
//alert("Please be patient while we are upgrading the system. Check back later this evening.")
//return;
	top.location.href = "https://secure.bucky.co.za/clublotto/join.asp?refID="+refID
}
function clickButton(val){
	window.parent.mainBody.location.href = val
}
function clickBanner(val){
	window.open(val);
}
function MouseOn(newImg){
	eval("event.srcElement.src='images/" + newImg + "'");
}
function MouseOff(newImg){
	eval("event.srcElement.src='images/" + newImg + "'");
}
function hilightB() {
	window.event.srcElement.className = 'onText';
	return true;
}
function dimB() {
	window.event.srcElement.className  = 'offText';
	return true;
}
function pwdClicked()
{
	if (event.keyCode == 13)
		validateMembers();
}
function forgotDetails()
{
	if ( (document.all.sUID.value == "") && (document.all.sEmail.value =="") ) {
		alert("Please enter either your User ID or your Email Address");
		document.all.sUID.focus();
		return false;
	}
		
	document.all.UIDForm.action="forgotDetails.asp"
	document.all.UIDForm.submit();
}
function validateMembers() {
	if (document.all.sUID.value.length == 13)
	{
//		alert("localhost")
//		document.all.UIDForm.action="http://localhost/lotto/members/memberindex.asp"
		document.all.UIDForm.action="https://secure.bucky.co.za/clublotto/memberindex.asp"
		document.all.UIDForm.submit();
	}
	else
	{
		alert("Please enter a valid ID Number!")
		document.all.sUID.focus();
	}
}
function GetSeqId(){
	var exp = new Date();
	return exp.getTime();
}
function setFocus(aVal){
	eval ('document.all.'+aVal+'.focus()')
}
function joinPageSubmit(){
//alert("Please be patient while we are upgrading the system. Check back later this evening.")
//return;
	//alert("Localhost")
	//document.all.luckyNums.action="http://localhost/lotto/members/join.asp"
	document.all.luckyNums.action="https://secure.bucky.co.za/clublotto/join.asp?refID="+refID
	document.all.luckyNums.submit();
}
function playFlyer() {
	window.location.href="flyer/flyer.asp?sUID="+document.all.sUID.value
}
function playPuzzle() {
	window.location.href="puzzle/puzzle.asp?sUID="+document.all.sUID.value
}
function goFlyer() {
	document.all.sUID.focus();
	top.frames.hiddenStuff.location.href = "preLoadImages.htm";
}
function mdn() {
}
function submitMailingListJoin(){
	if (event.keyCode == 13){
		mailingListJoin();
	}
}

function mailingListJoin(){
	if (document.all.email.value.search(/@./) == -1 ){
			alert("Please enter a valid E-mail address");
			document.all.email.focus();
			return;
	}
	window.open("addToList.asp?sName="+document.all.sName.value+"&address="+document.all.email.value,"mailJoinWindow","status=no; width=400; height=130");
	document.all.sName.value = "";
	document.all.email.value = "";
}