var tm = false
var temp = "null"
var tmr = "null"


if (document.images) {

	abon = new Image;
	abon.src = "/common/images/buttons/top/about_over.gif";
	pron = new Image;
	pron.src = "/common/images/buttons/top/project_update_over.gif";
	sdon = new Image;
	sdon.src = "/common/images/buttons/top/south_downtown_history_over.gif";
	reon = new Image;
	reon.src = "/common/images/buttons/top/reports_public_input_over.gif";
	pgon = new Image;
	pgon.src = "/common/images/buttons/top/photo_gallery_over.gif";
	
	aboff = new Image;
	aboff.src = "/common/images/buttons/top/about.gif";
	proff = new Image;
	proff.src = "/common/images/buttons/top/project_update.gif";
	sdoff = new Image;
	sdoff.src = "/common/images/buttons/top/south_downtown_history.gif";
	reoff = new Image;
	reoff.src = "/common/images/buttons/top/reports_public_input.gif";
	pgoff = new Image;
	pgoff.src = "/common/images/buttons/top/photo_gallery.gif";
	
}

function init(){
	
	preloadImages('/common/images/buttons/top/about_over.gif','/common/images/buttons/top/project_update_over.gif','/common/images/buttons/top/south_downtown_history_over.gif','/common/images/buttons/top/reports_public_input_over.gif','/common/images/buttons/top/photo_gallery_over.gif','/common/images/buttons/top/about.gif','/common/images/buttons/top/project_update.gif','/common/images/buttons/top/south_downtown_history.gif','/common/images/buttons/top/reports_public_input.gif','/common/images/buttons/top/photo_gallery.gif');
		
}

function imgAct(imgName) {
	
	imgOn = eval(imgName + "on.src");
    document [imgName].src = imgOn;
    
}

function imgInact(imgName) {

    imgOff = eval(imgName + "off.src");
    document [imgName].src = imgOff;

}

function preloadImages() { 
  var d=document; if(d.images){ if(!d.j_p) d.j_p=new Array();
    var i,j=d.j_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.j_p[j]=new Image; d.j_p[j++].src=a[i];}}
}

function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function changePage(newLoc) //use with a drop-down menu - the select must be named and the function is called by changePage(this.form.'selectname')
{
	nextPage = newLoc.options[newLoc.selectedIndex].value		
	//alert(nextPage);
	
	if (nextPage != "none")
	{
		//window.open(nextPage,'_blank');
		document.location.href = nextPage;
	}
	
}
