﻿<!--
/***************************************************************************************
*Copyright 2010 U.A.C Infotech Solutions
*Auto Post form for the club event registrations
* Uses scriptaculous modalBox and modalBox plugins
***************************************************************************************/
function Register(val) 
{
    //val = true send form
    var decision = val;
    var postForm = Modalbox.hide();
    if (decision) 
    {
        document.forms[0].submit();
    }
    else
    {
    document.forms[0].reset();
    }


}
function SetLocation(iLocation, elementName) 
{
    //set the value for event location
    document.getElementById("location").value = iLocation;
    var gc = "";
    //format the text for the modal window
    if (iLocation == 'goldcoast') 
    {
        gc = 'Gold Coast'; 
    }
    else 
    {
        gc = "Sydney";
    }

   //get the event date from the DOM for display in the Modal Window
    var dates = document.getElementById(elementName).innerHTML;
    var eventDetails = "Register for " + gc + " On: " + dates + "?";
    //show our confirm modal
    Modalbox.show('<div>' + eventDetails + '</div><br /><input type=\'button\' value=\'Continue\' onclick=\'Register("true");\'></button>  <input type=\'button\' value=\'Cancel\' onclick=\'Modalbox.hide()\' />', { title: 'Confirm your registration for the following event', width: 500 });
    
}
//-->
