


/* Sets the footer height */
 function positionFooter(){
     var heightContent = 0;

     // Get biggest column height by checking left, middle and right column
     if (document.getElementById('content'))
     {
         heightContent = document.getElementById('content').offsetHeight;
     }

	  if (document.getElementById('content_left'))
     {
         heightContent = document.getElementById('content_left').offsetHeight > heightContent ? document.getElementById('content_left').offsetHeight : heightContent;
     }
	 
     if (document.getElementById('content_right'))
     {
         heightContent = document.getElementById('content_right').offsetHeight > heightContent ? document.getElementById('content_right').offsetHeight : heightContent;
     }
	 
	  if (document.getElementById('gala_content_left'))
     {
         heightContent = document.getElementById('gala_content_left').offsetHeight > heightContent ? document.getElementById('gala_content_left').offsetHeight : heightContent;
     }
	 
     if (document.getElementById('gala_content_right'))
     {
         heightContent = document.getElementById('gala_content_right').offsetHeight > heightContent ? document.getElementById('gala_content_right').offsetHeight : heightContent;
     }

	heightContent = heightContent + 200;
     
     // Is there an element with the ID "div_footer"?
     if (document.getElementById('div_footer'))
     {
         // IE or not IE?
         if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0)
         {
             document.getElementById('div_footer').style.setAttribute('top', heightContent + 'px');
         }
         else
         {
             document.getElementById('div_footer').style.setProperty('top', heightContent + 'px', null);
         }
     }
	 
	 if (document.getElementById('grow_div_footer'))
     {
         // IE or not IE?
         if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0)
         {
             document.getElementById('grow_div_footer').style.setAttribute('top', heightContent + 'px');
         }
         else
         {
             document.getElementById('grow_div_footer').style.setProperty('top', heightContent + 'px', null);
         }
     }
 }
 
 
 /* Sets the footer height */
 function positionFooterGrow(){
     var heightContent = 0;

     // Get biggest column height by checking left, middle and right column
     if (document.getElementById('content'))
     {
         heightContent = document.getElementById('content').offsetHeight;
     }

	  if (document.getElementById('content_left'))
     {
         heightContent = document.getElementById('content_left').offsetHeight > heightContent ? document.getElementById('content_left').offsetHeight : heightContent;
     }
	 
     if (document.getElementById('content_right'))
     {
         heightContent = document.getElementById('content_right').offsetHeight > heightContent ? document.getElementById('content_right').offsetHeight : heightContent;
     }
	 
	  if (document.getElementById('gala_content_left'))
     {
         heightContent = document.getElementById('gala_content_left').offsetHeight > heightContent ? document.getElementById('gala_content_left').offsetHeight : heightContent;
     }
	 
     if (document.getElementById('gala_content_right'))
     {
         heightContent = document.getElementById('gala_content_right').offsetHeight > heightContent ? document.getElementById('gala_content_right').offsetHeight : heightContent;
     }

	heightContent = heightContent + 200;
     
     // Is there an element with the ID "div_footer"?
     if (document.getElementById('div_footer'))
     {
         // IE or not IE?
         if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0)
         {
             document.getElementById('div_footer').style.setAttribute('top', heightContent + 'px');
         }
         else
         {
             document.getElementById('div_footer').style.setProperty('top', heightContent + 'px', null);
         }
     }
	 
	 if (document.getElementById('grow_div_footer'))
     {
         // IE or not IE?
         if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0)
         {
             document.getElementById('grow_div_footer').style.setAttribute('top', heightContent + 'px');
         }
         else
         {
             document.getElementById('grow_div_footer').style.setProperty('top', heightContent + 'px', null);
         }
     }
	 
	var x = document.getElementById('grow_div_footer').style.top;
	x = x.substring(0,x.length-2);
	if(x < 610){
		 if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0)
         {
             document.getElementById('grow_div_footer').style.setAttribute('top', 610 + 'px');
         }
         else
         {
             document.getElementById('grow_div_footer').style.setProperty('top', 610 + 'px', null);
         }
	}
 }
 

 	

 
 
 
 /* Updates the Map Info (Ajax) */
 function updateMap(county){ // Wholesalers Map
 	//alert (county);
	
	new Ajax.Updater('map_info', 'includes/ajax/wholesaler_info.php?county='+county,{
		method:'get',
		onSuccess: function(transport){
		   var response = transport.responseText || "no response text";
		   //alert("Success! \n\n" + response);
		},
		onFailure: function(){  }
	});
 }
 
 function updateMapRetailers(county){ // Retailers Map
 	//alert (county);
	
	new Ajax.Updater('map_info', 'includes/ajax/retailer_info.php?county='+county,{
		method:'get',
		onSuccess: function(transport){
		   var response = transport.responseText || "no response text";
		   //alert("Success! \n\n" + response);
		},
		onFailure: function(){  }
	});
 }
 
 