	// <![CDATA[
	
	function get_object(id) {
		var object = null;
		
		if( document.layers ) {   
			object = document.layers[id];
		} else if( document.all ) {
			object = document.all[id];
		} else if( document.getElementById ) {
			object = document.getElementById(id);
		}
		return object;
	}

	function openBranches(){
		loadIframe("/locations/locations.php");
	}
	function mapLoadComplete(){
		get_object("splash").mapLoaded();
		
	}
	function closeFrame(){
		closeIframe();
	}
	function changePictureAndTitle(img, title){
		//alert("a");
		get_object("splash").changePicTitle(img, title);
		
	}
	function openBranchPage(){
		get_object("splash").openBranchPage();
	}
	function openBranchLocation(name, img){
		get_object("splash").iframeCalled(name, "/sites/"+img+"/xmedia/theme/default/sitetopimage.jpg");
	}
	function branchLocationComplete(){
		//alert("home branchLocationComplete");
		get_object("splash").iframeLoaded();
	}
	function openNewPage(page){
		loadIframe(page)
	}
	function loadIframe(url){
		
		var frame = '<iframe ' +
					'src="' + url + '" ' +
					'allowtransparency="true" ' + 
					'frameborder="0" ' +
					'height="600" ' + 
					'width="592" ' + 
					'id="myFrame" ' + 
					'marginheight="0" ' + 
					'marginwidth="0" ' + 
					'scrolling="no" ' + 
					'vspace="0" ' + 
					' />';

		get_object("theFrame").innerHTML = frame;
	}
	function closeIframe(){
		get_object("theFrame").innerHTML = "";
	}
	
	mainHeight = 680;
	
	function checkSize() {
	  var myWidth = 0, myHeight = 0;
	  var flashWidth = 810, flashHeight = 680, ratio = 1;
	  
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.clientHeight;
	  }
	  
	  if((myHeight / flashHeight) < 1){
	  
			ratio = myHeight / flashHeight;
			
			flashWidth = flashWidth*ratio - 1;
			flashHeight = flashHeight*ratio - 1;

	  }

		 get_object("siteWrapper").style.width = flashWidth;
		 get_object("content").style.height = flashHeight;
		 get_object("content").style.margin = "-"+(flashHeight/2)+"px 0 0 -"+(flashWidth/2)+"px";
		 get_object("content").style.width = flashWidth;
		 
		 get_object("splash").width = flashWidth;
		 get_object("splash").height = flashHeight;
		 
		 get_object("myFrame").width = 800*ratio - 1;
		 get_object("myFrame").height = 500*ratio - 1;
		 

	}

	//  onload="checkSize();" onresize="checkSize();"
	
	
			
	// ]]>
	