// JavaScript Document

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function sendMail(addr){
	if (addr==undefined){
		var addr = "info";
	}
	//addr += "@";
	addr += String.fromCharCode(64);
	addr+= "charterbuild.com.au";
	document.location="mailto:"+addr+"?subject=website enquiry";
}



function showOverlay(url,w,h) {
	var o = document.getElementById('popupOverlay');
	var f = document.getElementById('popupContentFrame');
	var c = document.getElementById('popupContent');
	var iframe = document.getElementById('blankFrame');
	var offset = (h/2) - h;
	//alert(offset);
	
	o.style.visibility="visible";// show overlay

	
	f.style.height = h +"px";
	f.style.width = w +"px"; // set width + height of content area
	f.style.marginTop = offset +"px"; // center vertically
	
	iframe.src=url;
	
	iframe.width=100+"%";
	iframe.height=h-50+"px";
	iframe.scrolling="auto";
	
	//f.style.opacity=0.99999;
	//f.style.filter="alpha(opacity=99)";
}

function hideOverlay() {
	document.getElementById('popupOverlay').style.visibility="hidden";	
}

