function Preloader() {
	MM_preloadImages('../images/buttons/home_ro.gif','../images/buttons/testimonials_ro.gif','../images/buttons/aboutus_ro.gif')
	MM_preloadImages('../images/buttons/contactus_ro.gif','../images/buttons/links_ro.gif')
	for(i=0;i<projects.proj.length;i++) {
		preloadImg(projects.proj[i].projid);
	}
	//preloadImg('gallipoli'); preloadImg('cornish'); preloadImg('invermay'); preloadImg('hazel')
	//preloadImg('wheatland'); preloadImg('bannon'); preloadImg('riversdale'); preloadImg('weston')
	//preloadImg('barton'); preloadImg('tweddle'); preloadImg('meadows')
}
function preloadImg(proj) {
	MM_preloadImages('../images/projects/'+proj+'/'+proj+'_tn.jpg')
}
function openPics(proj) {
	var iHeight = 540
	var iWidth = 660
	var sURL = "photos.htm?"+proj
	//var sParams = "height="+iHeight+", width="+iWidth+", scrollbars=no"
	//window.open (sURL,'winPics',sParams)
	var sParams = "dialogHeight:"+iHeight+"px; dialogWidth:"+iWidth+"px;resizable=no;help:no;center:yes;status:no"
	if (window.showModalDialog) {
		var ret = window.showModalDialog(sURL,"",sParams)
	} else {
		window.open(sURL,"","height=490,width=660,scrollbars=no,resizable=no,help=no,center=yes,status=no")
	}
}
function showThumb(proj) {
	MM_swapImage('Picture','','../images/projects/'+proj+'/'+proj+'_tn.jpg',1)
}

function chgCursor(mode) {
	switch(mode) {
		case 0: document.body.style.cursor="auto";
		case 1: document.body.style.cursor="hand";
	}
}

var iRecent=1;

function showTabs() {
	iRecent=(document.location.search=="?other")?0:1
	var sTabRight="<img src=\"../images/tab_right.gif\" width=\"158\" height=\"22\">"
	if (iRecent==1) {
		sRecent="<img src=\"../images/recent_y.jpg\" width=\"118\" height=\"22\">"
		sOther="<a href=\"projects.htm?other\"><img src=\"../images/other_n.jpg\" width=\"118\" height=\"22\" border=\"0\"></a>"
	} else {
		sRecent="<a href=\"projects.htm\"><img src=\"../images/recent_n.jpg\" width=\"118\" height=\"22\" border=\"0\"></a>"
		sOther="<img src=\"../images/other_y.jpg\" width=\"118\" height=\"22\">"
	}
	document.write ("<p>"+sRecent+sOther+sTabRight+"</p>")
}

function showProjects() {
	for (i=0;i<iProjects;i++) {
		if (iRecent==projects.proj[i].recent) {
			document.write ("<tr>")
			document.write ("  <td class=\"small\"> <img src=\"../images/dotpoint.gif\" width=\"8\" height=\"8\">")
			document.write ("    <a href=\"#\" onClick=\"openPics('"+projects.proj[i].projid+"')\" onMouseOver=\"showThumb('"+projects.proj[i].projid+"')\" onMouseOut=\"MM_swapImgRestore()\">")
			document.write ("    "+projects.proj[i].address+" </a></td>")
			document.write ("</tr>")
		}
	}
}