function formFocusFirst()
{
	document.forms[0].elements[0].focus();
}

function formFocusContinue()
{
	document.forms[0].continueButton.focus();
}

function formSelectOption(selectName, value)
{
	element = document.getElementById(selectName);
	for(x=0; x < element.options.length; x++) {
		if (element.options[x].value == value) {
			element.options[x].selected = true;
			break;
		}
	}
}

function getQueryVariable(variable)
{
	var query = window.location.search.substring(1);
	var vars = query.split("&");
  	for (var i=0;i<vars.length;i++) {
    		var pair = vars[i].split("=");
    		if (pair[0] == variable) {
      			return pair[1];
    		}
  	} 
	alert('Query Variable ' + variable + ' not found');
}