

	function onNSWselect ()
	{
		setCookie('destination',"nsw", 365);
		location.href = "http://www.relay.cancercouncil.com.au";
	}

	function onOtherSelect()
	{
		setCookie('destination',"other", 365);
		$.closeDOMWindow({windowSourceID:'#dialog'}); 
	}

	/*	This function will check a cookie 'destination' to determine if the user
		has been here before, and send them to the same place they went to the last time
		they were presented with a choice.

		For a first time visitor, we present them with a choice.
	*/

	function DirectToCorrectRFLSite()
	{
		// Get the cookie - empty string if its not been set
		var d = getCookie('destination');

		// Did they visit NSW last time?
		if (d == "nsw")
		{
			location.href = "http://www.relay.cancercouncil.com.au"; // TODO: Put NSW URL here
		}

		// Are they a first time visitor? Show them the box to select
		else if (d == "")
		{
			$.openDOMWindow({ 
				loader:1, 
				loaderImagePath:'animationProcessing.gif', 
				windowSourceID:'#dialog',
				loaderHeight:16, 
				loaderWidth:17,
				height: 262,
				width: 443,
				borderSize:'0',
				windowBGColor:'',
				overlayOpacity:'40'
			}); 
		}

		// If d = anything else, we don't need to do anything, as -this- site -is- 'other'
	}

	
