<!--	
	var formObjectName = "document.forms['m2mForm']";

	function selectFlow(flowType)
	{
		var configurationFlow = eval(formObjectName);
		configurationFlow.action=flowType;
		configurationFlow.submit();
	}

	function displayErrorMessage(errorMessage, key)
	{
		var errorMessageTargetElement = getLayerElement(key + 'Error');
		errorMessageTargetElement.innerHTML=errorMessage;
		errorMessageTargetElement.style.visibility='visible';
	}
	
	function hideErrorMessage(key)
	{
		var errorMessageTargetElement = getLayerElement(key + 'Error');
		errorMessageTargetElement.style.visibility='hidden';		
	}

	function validatePassword(passwordOneName, passwordTwoName)
	{
		if (getElementValue(passwordOneName) == getElementValue(passwordTwoName))
			{
				hideErrorMessage(passwordOneName);
				hideErrorMessage(passwordTwoName);
				return true;
			}
		else
			{
				var errorMessage = 'Passwords do not match';
				displayErrorMessage(errorMessage, passwordOneName);
				displayErrorMessage(errorMessage, passwordTwoName);
				return false;
			}
	}

	function checkEmailAddressValid(key)
	{
		regularExpression = /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$/;

		if (!elementValueValid(key, regularExpression))
		{
			displayErrorMessage('Please enter a valid email address', key);
			return false
		}
		else
		{
			hideErrorMessage(key);
			return true;
		}
	}

	function submitItemIfSelected(control) 
	{
		if (control.selectedIndex == 0) 
		{
			return false;
		}
		else 
		{
			eval(formObjectName + '.submit()');
		}
	}
	
	function checkShortenedEmailDetailsFormCompleted(regularExpression)
	{
		if (checkEmailAddressValid('emailAddress') && checkFormCompleted(regularExpression))
		{
			return true;
		}
		else
		{		
			return false;
		}
	}

	function checkEmailDetailsFormCompleted(regularExpression)
	{
		if (validatePassword('password', 'confirmpassword') && checkMobilePhoneValid(regularExpression))
		{
			return true;
		}
		else
		{		
			return false;
		}
	}
	
	function checkIspDetailsFormCompleted()
	{
		if (validatePassword('pppAuthSecret', 'confirmIspPassword'))
		{
			return true;
		}
		else
		{		
			return false;
		}
	}

	function checkPasswordFormCompleted(regularExpression)
	{
		if (validatePassword('pppAuthSecret', 'confirmPassword') && checkFormCompleted(regularExpression))
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	function checkMobilePhoneValid(regularExpression) 
	{
		var mobileNumber = 'mobileNumber';

		if (regularExpression == null)
		{
			regularExpression = /^[\+0][0-9]{6,20}/;
		}

		if (elementValueValid(mobileNumber, regularExpression) )
		{
			hideErrorMessage(mobileNumber);
			return true;
		}
		else
		{
			displayErrorMessage ("Please enter a valid mobile phone number", mobileNumber);
			getElement(mobileNumber).focus();
			return false;
		}
	}

	
	function elementValueNotEmpty(key) 
	{
		if (getElementValue(key) == ''){return false;}
		else{return true;}
	}

	
	function elementValueValid(key, regularExpression) 
	{
		var replacedValue = getElementValue(key).replace(/[\s()]+/g,"");

		return regularExpression.test(replacedValue);
	}

	
	function getElementValue(key)
	{
		return getElement(key).value;
	}
	
	function getLayerElement(key)
	{
	    if (document.layers && document.layers[key] != null) 
	    {
	    	return document.layers[key];
	    }
	    else if(document.all) 
	    {
	    	return document.all[key];
	    }
	    else if(document.getElementById(key)!=null)
	    {
	    	return document.getElementById(key);
	    }	
	}
	
	function elementValueNotZero(key)
	{
		if (getElementValue(key) == 0){return false;}
		else{return true;}
	}

	
	function getElement(key)
	{
		return eval(formObjectName + '.' + key); 
	}
	
		function showCustomBookmark(bookmarkFld){
		if (bookmarkFld.options[bookmarkFld.selectedIndex].value == "custom") {
			document.configurationFlow.bookmarkManualName.disabled = false;
			document.configurationFlow.bookmarkManualURL.disabled = false;
		}
		else{
			document.configurationFlow.bookmarkManualName.value = "";
			document.configurationFlow.bookmarkManualURL.value = "";
			document.configurationFlow.bookmarkManualName.disabled = true;
			document.configurationFlow.bookmarkManualURL.disabled = true;
		}
	}
	
	function checkBookmarkSubmit(){
		if (document.configurationFlow.bookmarkId.selectedIndex == 0){
			alert('Please select a bookmark from the list');
			document.configurationFlow.bookmarkId.focus();
			return false;
		}
		if (document.configurationFlow.bookmarkId.options[document.configurationFlow.bookmarkId.selectedIndex].value == "custom"){
			if (document.configurationFlow.bookmarkManualName.value == ""){
				alert('Please enter the Bookmark name');
				document.configurationFlow.bookmarkManualName.focus();
				return false;
			}
			if (document.configurationFlow.bookmarkManualURL.value == ""){
				alert('Please enter the Bookmark URL');
				document.configurationFlow.bookmarkManualURL.focus();
				return false;
			}
		}
		if (document.configurationFlow.phoneId.selectedIndex == 0){
			alert('Please select a phone');
			document.configurationFlow.phoneId.focus();
			return false;
		}
		if (!checkFormCompleted()) {
			return false;
		}
		return true;
	}
		
-->