function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors .length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
anchor.target = "_blank";
anchor.title = (anchor.title != "") ? anchor.title+" (opens in a new window)" : "opens in a new window";
anchor.className = (anchor.className != '') ? anchor.className+' external' : 'external';
}
}
}

function initSongBird() {
	
	externalLinks();
	
	
	if (window.loadGoogleMap) {
	//alert('loadGoogle');
	loadGoogleMap();

	}

}

window.onload = initSongBird;




function checkContactForm() {
	
name = document.getElementById('name').value;
email = isValidEmail(document.getElementById('e-mail').value);
phone = document.getElementById('phone').value;
enquiry = document.getElementById('enquiry').value;

	if (name=='' || email==false || phone=='' || enquiry=='') {
	
	alert('All fields are required with a valid email address.');
	
	return false;
	
	} else {
		
	return true;	
	}
	
	}



function isValidEmail(str) {

   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
 


}