/*==============================================================================

This function checks the value of the parameter for a email address. Also
checks for missing information in general forms.
            
------------------------------------------------------------------------------*/
function offerFocus() {
	var field = document.offerform.email;
	if (field.value == 'Your Email Address') { field.value = ''; }
	else if (field.value == '') { field.value = 'Your Email Address'; }	
	return;
}
function nameFocus() {
	var field = document.offerform.name;
	if (field.value == 'Your Name') { field.value = ''; }
	else if (field.value == '') { field.value = 'Your Name'; }	
	return;
}
function checkForm() {
	var field = document.offerform.email;
	if (field.value != '' && field.value != 'Your Email Address') {
		var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if (!goodEmail) {
			alert('Please enter a valid email address');
			return;	
		}
		else {
			document.offerform.submit();
		}
	}
}

var domain="mailto:"
function contact_me()
	{
		var end="info"
		var relend="@eyerent2buy.co.uk"
		window.location=domain+end+relend;
	}


function show(x)
	{

	y = document.getElementById(x)
	if ( y.style.zIndex != '17' ){
		y.style.display = 'inline'; y.style.zIndex = '17'; }
	else {
		y.style.display = 'none'; y.style.zIndex = '1'; }

	}


