var email = "enquiries"
var domain = "marbleproperties.co.uk"
var eml_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

function addToFavorites() {
var title="Marble Properties";
var urlAddress="http://www.marbleproperties.co.uk";
if (window.sidebar) { 
window.sidebar.addPanel(title, self.location.href,""); 
} else if( document.all ) {
window.external.AddFavorite(self.location.href, title);
} else if( window.opera && window.print ) {
return true;
}
}

function checkit(thisForm) {
if (thisForm.name.value=="") {
alert("Please supply your name.");
thisForm.name.focus();
thisForm.name.select();
return false;
}

if (thisForm.details.value=="") {
alert("Please supply a few details.");
thisForm.details.focus();
thisForm.details.select();
return false;
}

if (eml_val.test(thisForm.email.value) &! thisForm.email.value=="") {
thisForm.submit();
return true; }
else {
alert("Please supply a valid e-mail address.");
thisForm.email.focus();
thisForm.email.select();
return false;
}
}


function swapimage(imgname, imgtitle) {
var newimg = document.getElementById("midimg");
if ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Opera") == -1)) {
	newimg.style.filter="progid:DXImageTransform.Microsoft.Fade(Overlap=1.00);";
	newimg.filters[0].apply();
	newimg.src=imgname;
	newimg.title=imgtitle;
	newimg.alt=imgtitle;
	newimg.filters[0].play();
	}
else
	newimg.src=imgname;
}

function swapimage1(imgname, imgtitle) {
var newimg = document.getElementById("midimg1");
if ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Opera") == -1)) {
	newimg.style.filter="progid:DXImageTransform.Microsoft.Fade(Overlap=1.00);";
	newimg.filters[0].apply();
	newimg.src=imgname;
	newimg.title=imgtitle;
	newimg.alt=imgtitle;
	newimg.filters[0].play();
	}
else
	newimg.src=imgname;
}

function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'block'){
      document.getElementById(divid).style.display = 'none';
    }else{
      document.getElementById(divid).style.display = 'block';
    }
}

function nextfield(target) {
if(window.event && window.event.keyCode == 13) {
document.getElementById(target).focus();
return false; }
else
return true;
}

