//Inicia google maps
function IniciaMapa(lat, lng) {
    var myOptions = {
      zoom: 16,
      center: new google.maps.LatLng(lat, lng),
      mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
		scrollwheel: false,
		navigationControl: false,
		mapTypeControl: false,
		scaleControl: false,
		draggable: false,
      navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
      mapTypeId: google.maps.MapTypeId.ROADMAP

    }
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	var image = 'assets/images/content/logo_maps.png';
	var myLatLng = new google.maps.LatLng(lat, lng);
  	var beachMarker = new google.maps.Marker({
      position: myLatLng,
      map: map,
	  icon: image     
	  //title:"Clique para mais informações"
  	});	
}

function IniciaMapaLocalizacao(lat, lng, botao) {
	var myOptions = {
      zoom: 16,
      center: new google.maps.LatLng(lat, lng),
      mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
		scrollwheel: true,
		navigationControl: true,
		mapTypeControl: true,
		scaleControl: true,
		draggable: true,
      navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
      mapTypeId: google.maps.MapTypeId.ROADMAP

    }
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	var image = 'assets/images/layout/'+botao;
	var myLatLng = new google.maps.LatLng(lat, lng);
  	var beachMarker = new google.maps.Marker({
      position: myLatLng,
      map: map,
	  icon: image     
	  //title:"Clique para mais informações"
  	});	
}

function gotoByScroll(id){
	$("html,body").animate({scrollTop: $("#" + id).offset().top + 'px'}, 1000, function() {});	
	return false;
}

function getCookie(nome){    
    if(document.cookie.length > 0){
      c_start = document.cookie.indexOf(nome + "=");
      if(c_start != -1){ 
        c_start = c_start + nome.length + 1; 
        c_end = document.cookie.indexOf(";", c_start);
        if(c_end == -1)
          c_end = document.cookie.length;
        return unescape(document.cookie.substring(c_start, c_end));
      } 
    }
    return null;
}
