//Test function
function switchSecureMode1()
{
	alert("HalloTest");
}

function switchSecureMode(formId, httpsOn, urlPrefs) 
{
	var action = $(formId).readAttribute('action');
	var unsecure = "http://" + urlPrefs['serverName'];
	var secure = "https://" + urlPrefs['serverName'];	
	
	if (action.indexOf("https") == 0) { 
		action = action.substr(secure.length); 
	};
	if (action.indexOf("http") == 0) { 
		action = action.substr(unsecure.length); 
	};
	action = (httpsOn) ? secure + action : unsecure + action;
	
	$(formId).writeAttribute('action', action);
	
}
