window.onresize = fooResize;
window.onload = fooInit;

function fooInit(){

	
	//fooResize();
	
}
function fooResize(){

	//var w = document.getElementById("mapWrapper").offsetWidth;
	
	var h=0;
	$(".listItem").each( function(){
	
		h += $(this).height() + 10;
		
	});
	
	
	document.getElementById("map").style.height = h+20+"px";

}





$(document).ready(function() {
//	loadStaticXML("xmltest.xml", processStandardXML);


			$(".listItem").hover(function() { 

			  if( $(this).attr("id") != currentItemID){
				 // $(this).animate({backgroundColor: "#fffbcf" }, 440);
				 
				 currentItemID = ( $(this).attr("id") );
				 currentItemID = currentItemID.replace(/listItem/, "");
				 //alert(currentItemID);
				 clickItem( currentItemID );
				} 
				 
			}, function() {
	//		 if( $(this).attr("id") != currentItemID)	
				//  $(this).animate({backgroundColor: "#ffffff" }, "slow");
			});
			
		
	
});
