// JavaScript Document

// Let's make the map big and small
	  
	  function bigMap() {
	   
	  //size the map container div
	  var screenWidth = f_clientWidth();
	  var screenHeight = f_clientHeight();
	 
	  big = document.getElementById("map");
	  	  
	  if ( screenWidth < 950) {
	   big.style.width = screenWidth - 40 + "px"; 
	  } else {
	   screenWidth = 950;
	   big.style.width = screenWidth + 'px';
	  }
	  big.style.height = screenHeight - 40 + 'px';
	  big.style.position = 'fixed';
	  big.style.top = '30px';
	  big.style.left = '0';
	  big.style.right = '0';
	  big.style.border = 'solid';
	  big.style.margin = '0px auto';
	  
	  
	  //now size the map Div
	  newMap = document.getElementById("cm_map");
	  newMap.style.width = screenWidth - 175 + 'px';
	  newMap.style.height = screenHeight - 44 + 'px';
	  
	  //now size the sidebar div
	  newSidebar = document.getElementById("cm_sidebarDIV");
	  newSidebar.style.height =  screenHeight - 46 + 'px';
	  //newSidebar.style.overflow = 'auto';	
	  
	  // now show the reduce button
	  closeB = document.getElementById("reduceButton");
	  closeB.style.width = screenWidth;
	  closeB.style.display = 'block';
	  closeB.style.position = 'fixed';
	  closeB.style.top = '2px'; //-(screenHeight -20) + 'px';
	  closeB.style.left = (f_clientWidth()-950)/2 + 'px';
	  closeB.style.margin = "0px auto";
	  cm_map.checkResize();
	  
	  
	   }
	  
	  function normalMap() {
	  //make everything normal
	  closeB = document.getElementById("reduceButton");
	  closeB.style.display = 'none';	 
	  
	  normal = document.getElementById("map");
	  normal.style.width = '598px';
	  normal.style.height = '600px';
	  normal.style.position = 'relative';
	  normal.style.border = 'none';
	  normal.style.left = "-20px";
	  normal.style.top = "0px";
	  
	  
	  newMap = document.getElementById("cm_map");
	  newMap.style.width = '420px';
	  newMap.style.height = '600px';
	  sidebar = document.getElementById("cm_sidebarDIV");
      sidebar.style.height = '596px';
	  sidebar.style.width = '149px';
	  cm_map.checkResize();
	  }
  
  
  function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


