function loadOnStart() {
	setFocusFirstField();
}

/**
* Sets focus to first field on page
*/
function setFocusFirstField() {
	try {
		document.getElementById('txtName').focus();
/*		document.forms[0].elements[0].focus();
		var bFound = false;
		for (var f=0; f < document.forms.length; f++) {
			for(var i=0; i < document.forms[f].length; i++) {
				if (document.forms[f].elements[i].type != 'hidden') {
					if (document.forms[f].elements[i].disabled != true) {
						document.forms[f].elements[i].focus();
						var bFound = true;
					}
				}
				if (bFound == true) {
					break;
				}
			}
			if (bFound == true) {
				break;
			}
		}*/
	} catch(e) {
		// do nothing
	}
}

function resize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  document.getElementById("container").style.height=myHeight+'px';
}

function VerifyContactForm() {
	// Declar variables
	var returnValue = true;
	var colorOK = '#DDFFDD';
	var colorError= '#FFDDDD';
	var txtName = document.getElementById('txtName');
	var txtEmail = document.getElementById('txtEmail');
	var txtPhone = document.getElementById('txtPhone');
	var txtRequest = document.getElementById('txtRequest');
	var txtCode = document.getElementById('security_code');

// Resets div's
	//if(document.getElementById('txtNameErrorMsg')) { document.getElementById('txtNameErrorMsg').style.display = 'none'; }

// Check if fields are empty
	if(txtCode.value.length <= 0) {
		txtCode.style.backgroundColor = colorError;	
		document.getElementById('txtCodeErrorMsg').style.display = 'block';
		document.getElementById('security_code').focus();
		returnValue = false;
	} else {
		txtCode.style.backgroundColor = colorOK;	
		document.getElementById('txtCodeErrorMsg').style.display = 'none';
	}
	if(txtRequest.value.length <= 0) {
		txtRequest.style.backgroundColor = colorError;	
		document.getElementById('txtRequestErrorMsg').style.display = 'block';
		document.getElementById('txtRequest').focus();
		returnValue = false;
	} else {
		txtRequest.style.backgroundColor = colorOK;	
		document.getElementById('txtRequestErrorMsg').style.display = 'none';
	}	
	if(txtPhone.value.length <= 0) {
		txtPhone.style.backgroundColor = colorError;	
		document.getElementById('txtPhoneErrorMsg').style.display = 'block';
		document.getElementById('txtPhone').focus();
		returnValue = false;
	} else {
		txtPhone.style.backgroundColor = colorOK;	
		document.getElementById('txtPhoneErrorMsg').style.display = 'none';
	}	
	if(txtEmail.value.length <= 0) {
		txtEmail.style.backgroundColor = colorError;	
		document.getElementById('txtEmailErrorMsg').style.display = 'block';
		document.getElementById('txtEmail').focus();
		returnValue = false;
	} else {
		txtEmail.style.backgroundColor = colorOK;	
		document.getElementById('txtEmailErrorMsg').style.display = 'none';
	}
	if(txtName.value.length <= 0) {
		txtName.style.backgroundColor = colorError;	
		document.getElementById('txtNameErrorMsg').style.display = 'block';
		document.getElementById('txtName').focus();
		returnValue = false;
	} else {
		txtName.style.backgroundColor = colorOK;	
		document.getElementById('txtNameErrorMsg').style.display = 'none';
	}


/*	if(returnValue != false) {
		returnValue = true;
	}
*/	
	return returnValue;

}