var PLATOS_Login_ButtonSet = new Array
											(	
														// Name				Func	Sub		Val		Conf											SubmitFunc
												new Array('IForget',		IForget_click,	false,	false),
												new Array('Login',			null,	true,	true)
			
											);	
var PLATOS_Login_ValSet = new Array	(	
														// Name				Type		EmptyOK		ValType		Scope	ErrorFunc)
												new Array('ID', 			'string',	false,		null,		null,	null),
												new Array('Password',		'string',	false,		null,		null,	null)
											);
var PLATOS_Retrieve_ButtonSet = new Array
											(	
														// Name				Func	Sub		Val		Conf											SubmitFunc
												new Array('Retrieve',		null,	true,	true,	null,											ShowResult),
												new Array('Close',			null,	false,	false)
			
											);	
var PLATOS_Retrieve_ValSet = new Array	(	
														// Name				Type		EmptyOK		ValType		Scope	ErrorFunc)
												new Array('RetrieveID', 	'string',	false,		null,		null,	null),
												new Array('RetrieveTo',		'string',	false,		'function',	ValidateRetrieveTo,	null)
											);


function ValidateRetrieveTo(xi_value, xi_ValMode, xi_BOHVal_obj)
{
	var	ID_obj;
	var	rv = true;
	
	var MobileRegex = /^((\+?61)|0)?\s*[^0]\s*\d\s*\d\s*\d\s*\d\s*\d\s*\d\s*\d\s*\d\s*$/
	var EmailRegex = /^[a-zA-Z0-9.%+_-]+@\w[a-zA-Z0-9.-]*\.[a-zA-Z]{2,4}$/
	xi_value = xi_value.replace(/ /g, '');
	if (!xi_value.match(MobileRegex))
		if (!xi_value.match(EmailRegex))
			return 'Invalid';

	return 'OK';
}

function IForget_click(xi_BOHButton_obj, xi_Event)
{
	FloatRetrieve();
	O3_StopBubble(xi_Event);
}
function FloatRetrieve(xi_hide)
{
	if(xi_hide)
	{
		document.getElementById('RetrieveArea').style.display = 'none';
		document.getElementById('RetrieveResult').src="../_venice_/PLATOS_Retrieve_InProgress.html";
		document.getElementById("RetrieveResult").style.display="none";
		document.getElementById("RetrieveResult").src="../_venice_/PLATOS_Retrieve_InProgress.html";
	}
	else
	{
		document.getElementById('RetrieveArea').style.display = 'block';
		document.getElementById('RetrieveID').focus();
	}
}
			
function document_click_event(xi_Event)
{
	FloatRetrieve(true);

}			
function RetrieveArea_click_event(xi_Event)
{
	if(!xi_Event)	xi_Event = window.event;
	O3_StopBubble(xi_Event);
}			
function ShowResult()
{
	document.getElementById("RetrieveResult").style.display="block";
	return true;
}			
