﻿function OnContinueNew()
{
	document.frmMain.pageaction.value = "createlogin";
	document.frmMain.submit();
}
function OnForgotPassword()
{
	document.frmMain.pageaction.value = "forgotpassword";
	document.frmMain.submit();
}
function OnMenu(pageaction)
{
    document.frmMenu.pageaction.value = pageaction;
	document.frmMenu.submit();
}
function AddDateParser()
{
	$(document).ready(function()
	{
		$.tablesorter.addParser(
		{
			id: 'aushortdate',
			is: function(s)
			{
				return false;
			},
			format: function(s)
			{
				s = '' + s; //Make sure it's a string
				var hit = s.match(/(\d{1,2})\/(\d{1,2})\/(\d{4})/);
				if (hit && hit.length == 4)
				{
				    return hit[3] + hit[2] + hit[1];
			    }
			    else
			    {
				    return s;
			    }
		    },
		    type: 'text'
	    });
    });

}
function onExpandCollapse(divid)
{
	var thediv = document.getElementById(divid);
	
	if(thediv.style.display == 'none')
	{
		thediv.style.display = '';
	}
	else
	{
		thediv.style.display = 'none';
	}
}

function SaveSelection(nextracecode)
{
	document.frmSelections.pageaction.value = "saveselection";
	document.frmSelections.nextracecode.value = nextracecode;
	document.frmSelections.submit();
}
