function dosizeSize() {
  var myWidth = 0, myHeight = 0;
  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;
  }
  
  var contentHeight = $('container').offsetHeight;
  var contents = contentHeight;
  
  //alert(contentHeight + ' > '+ myHeight);
  
  /*if(Prototype.Browser.IE){

  }*/
 if(contents > myHeight){
 	var footerHeight = contents;
 } else {
 	var footerHeight = myHeight - $('footer').offsetHeight;
 }

 $('footer').style.top = footerHeight+'px';

 
}






function dosizeSize5() {
  var myWidth = 0, myHeight = 0;
  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;
  }
  
  var contentHeight = $('container').offsetHeight;
  var contents = contentHeight;
  
  //alert(contentHeight + ' > '+ myHeight);
  
  /*if(Prototype.Browser.IE){

  }*/
 if(contents > myHeight){
 	var footerHeight = contents;
 } else {
 	var footerHeight = myHeight - $('footer').offsetHeight;
 }

 $('footer').style.top = footerHeight+'px';

 loadmaps();
}
/*
40.898278,-8.624017
*/
    function loadmaps() {
      if (GBrowserIsCompatible()) {
		// cria mapa
		var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(40.898286,-8.624506), 14);
		map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
		//cria icon
		tinyIcon = new GIcon();
		tinyIcon.image = "http://mcmarkers.googlepages.com/iimm1-red.png";
		//tinyIcon.image = "/media/images/point.png";
		tinyIcon.shadow = "http://mcmarkers.googlepages.com/iimm1-shadow.png ";
		tinyIcon.iconSize = new GSize(32, 32);
		tinyIcon.shadowSize = new GSize(49, 32);
		tinyIcon.iconAnchor = new GPoint(15, 27);
		tinyIcon.infoWindowAnchor = new GPoint(16, 0);
		
		var htmlText = "<div><b>3D Farma</b><br/>Avenida 16 de Maio, Lote 8<br/>Zona Industrial de Ovar<br/>Apartado 574<br/>3880-102 OVAR<br/>PORTUGAL<br/></div>";
		var eqpoint = new GLatLng(40.898286,-8.624506);
		var marker=createMarker(eqpoint, htmlText, tinyIcon );
		map.addOverlay(marker);
		//map.openInfoWindow(htmlText);
        GEvent.trigger(marker, "click"); //comentar se n?o for para abrir qdo abre o mapa
		
//40.854888,-8.610342&spn=0.0028,0.004828&t=h&z=18
      }
    }
	
	function createMarker(spoint, text, icon) {
	  var marker = new GMarker(spoint, icon);
	  //marker.openInfoWindowHtml(text);
	  GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(text);
	  });
	  
	 // marker.openInfoWindowHtml(text);
	  return marker;
	}
	//GEvent.trigger(marker,'click');

    //]]>
