function addLoadEvent(func){
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
	window.onload = func;
	}else{
		window.onload = function(){
		oldonload();
		func();
		}
	}
}


function pressSquare(){
	if (!document.getElementById) return false;
	var whoweare = document.getElementById("whoweare-small");
	var services = document.getElementById("services-small");
	var prices = document.getElementById("prices-small");
	var findus = document.getElementById("contact-small");
	if (document.getElementById("whoweare-small")){
	whoweare.onmouseover = whoweare.style.cursor='pointer';
	whoweare.onclick = function(){
		document.location.href="who_we_are.html";		
	}
	}
	if (document.getElementById("services-small")){
	services.onmouseover = services.style.cursor='pointer';
	services.onclick = function(){
		document.location.href="services.html";		
	}
	}
	if (document.getElementById("prices-small")){
	prices.onmouseover = prices.style.cursor='pointer';
	prices.onclick = function(){
		document.location.href="prices.html";		
	}
	}
	if (document.getElementById("contact-small")){
	findus.onmouseover = findus.style.cursor='pointer';
	findus.onclick = function(){
		document.location.href="find_us.html";		
	}
	}	
}

function printmapWindow(){
	if (!document.getElementById || !document.getElementById("map")) return false;	
	var mapdiv = document.getElementById("map");
	var maplink = mapdiv.getElementsByTagName("a")[0];
	maplink.onclick = function(){
	 window.open ("printmap.html","mywindow","width=510	,height=494");
	return false;
	}
}

addLoadEvent(pressSquare);
//addLoadEvent(changetoPNG);
addLoadEvent(printmapWindow);