//<![CDATA[
var rxPIN = /^\d{7}$/;
		   
function submitSignUp(identifier,room,form)
{
	if (form.indexOf("Detail") != -1) {
		var txtUserID			= document.getElementById('txtUserIDDetail');
		var txtUserPIN			= document.getElementById('txtUserPINDetail');
	} else {
		var txtUserID			= document.getElementById('txtUserID');
		var txtUserPIN			= document.getElementById('txtUserPIN');
	}
	
	var errors			= '';

	if (txtUserID.value == txtUserID.defaultValue)
	{
		errors = errors + '- enter your ' + identifier + ' at ' + room + '\r\n';
	}
	
	if (txtUserPIN.value == txtUserPIN.defaultValue || !rxPIN.test(txtUserPIN.value))
	{
		errors = errors + '- enter your PIN Number at ' + room + ' (7 numeric digits)\r\n';
	}

	if (errors.length > 0)
	{
		window.alert('Sorry, please correct the following before submitting the sign up form:\r\n\r\n' + errors);
		return false;
	}
	else
	{
		return true;
	}
}
//]]>