// JavaScript Document

function popUp(URL, myHeight, myWidth) {
	day = new Date();
	id = day.getTime();
	myLeft = (screen.width-myWidth)/2;
	myTop = (screen.height-myHeight)/2;
	//myHeight=400;
	//myWidth=400;
	window.open(URL, "Loading"+id, 'top='+myTop+',left='+myLeft+'+,toolbar=0 status=0,resizable=0,Width='+myWidth+',height='+myHeight+',scrollbars=1');
	
}

function enlargeImage(tTitle,tImg){

	// GET SCREEN DIMENSTIONS
	x = screen.availWidth/2;
	y = screen.availHeight/2;
	
	// OPEN NEW WINDOW, AND POSITION IN CENTRE OF SCREEN
	enlargedPic=window.open("","enlargedPic","width=1,height=1,left="+x+",top="+y+",toolbars=no, status=no");
	
	// EDIT CONTENTS OF NEW WINDOW
	enlargedPic.document.open();
	enlargedPic.document.write("<html>");
	enlargedPic.document.write("<head><title>"+tTitle+"</title><link rel=\"stylesheet\" href=\"css/stylesheet.css\" type=\"text/css\"></head>" );
	enlargedPic.document.write("<body marginwidth=\"0\" marginheight=\"0\" leftmargin=\"0\" topmargin=\"0\" bgcolor=\"#FFFFFF\" onLoad=\"this.moveBy(-this.pic.width/2,-this.pic.height/2);resizeTo(this.pic.width+10,this.pic.height+80);this.focus();\" class=\"main\">");
	enlargedPic.document.write("<img id=\"pic\" src=\""+tImg+"\" alt=\""+tTitle+"\" border=\"0\">");	
	enlargedPic.document.write("<br><div align=\"center\" class=\"content\"><a href=\"javascript:window.print()\">Print Map</a></div>");
	enlargedPic.document.write("</body>");
	enlargedPic.document.write("</html>");
	enlargedPic.document.close();
}

function expand(me, totalRows, type){
	
			for(i=1;i<=totalRows;i++){
				temp = eval(type+i)
					if(eval(type+me)==temp){
						if(eval(type+me).className=="hidden"){
							eval(type+me).className="visible";
							//document.getElementById(type+i+"_Title").innerHTML = "Click to Close";
							//eval(type+i+"_Title").className="sectionHeader_on";
						}else{
							eval(type+me).className="hidden";
							//document.getElementById(type+i+"_Title").innerHTML = "Click to View";
							//eval(type+i+"_Title").className="sectionHeader";
						}
					}else{
						eval(type+i).className="hidden";
						//document.getElementById(type+i+"_Title").innerHTML = "Click to View";
						//eval(type+i+"_Title").className="sectionHeader";
					}
			}
			//document.location="#"+eval(type+me);
			//document.location="#"+type+me+"_Title";
}


// End -->

