<!--
function clickIE() {
	if (document.all) {
		return false;
	}
}
function clickNS(e) {
	if (document.layers || (document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {
			return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS;
}else{
	document.onmouseup = clickNS;
	document.oncontextmenu = clickIE;
}
document.oncontextmenu=new Function("return false")

/********************************************************************************************************************************************************************************
				MANIPULAÇÃO DE IMAGENS
*******************************************************************************************************************************************************************************/
function chgFoto(NUM, FOTO)
{
	$("img#CHFOTO").attr('src', 'images/transpar.gif');

	$('a#LINK').attr('href', FOTO+'_g.jpg');
	$("img#CHFOTO").attr('src', FOTO+'_m.jpg');
}


HELP = false;
function ShwAlert(MSG, OBJ)
{
	if (HELP === false || HELP !=MSG)
	{
		HELP		= MSG;
		var TXT		= new Array (
						'Para selecionar mais de um bairro segure a tecla ctrl e clique sobre as opções desejadas',
						'Para selecionar mais de um tipo de imóvel segure a tecla ctrl e clique sobre as opções desejadas',
						'Digite os valores desejado, não utilize centavos nem pontos ou vírgula'
					);
		var pos		= $('#'+OBJ).position();
		var LEFT	= pos.left - 10;
		var TOP		= pos.top - 90;
		var WIDTH	= $('#'+OBJ).width();
		
//alert(pos.top+' - '+$('#'+OBJ).height() +' = '+TOP);
	
		$('#ALERTA').remove();
	
		$('<span id="ALERTA">'+TXT[MSG]+'</span>')
			.prependTo('div#BUSCA');
	
		$('span#ALERTA')
			.css({
				'position':'absolute',
				'width': ( WIDTH * 1.5 ),
				'left': LEFT,
				'top': TOP
			});
	
		$('span#ALERTA')
			.fadeIn('slow')
			.animate({opacity: 1.0}, 2500)
			.fadeOut('slow', function() {
				$(this).remove();
				HELP = false;
			 });
	}
}

/********************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************/
function ShowCnt (OBJ)
{
	var TEXT = (document.all) ? '<a href="msnim:chat?contact='+ OBJ +'">'+ OBJ +'</a>' : OBJ;
	document.write(TEXT);
}

/********************************************************************************************************************************************************************************
				GOOGLE MAPS:			showAddress("Rua, Nº, CIDADE, UF");
*******************************************************************************************************************************************************************************/
var map			= null;
var geocoder	= null;

function GM_load()
{
	if (GBrowserIsCompatible())
	{
		map 		= new GMap2(document.getElementById("GOOGLEMAPS"));
//		map.setCenter(new GLatLng(-27.590088,-48.510381), 15);
		map.setUIToDefault();
		geocoder	= new GClientGeocoder();
	}
}

function GM_showAddress(CORD, ADRESS, CHAMADA, ZOOM)
{
	if (geocoder)
	{
		var ONDE = (CORD) ? CORD : ADRESS;

		geocoder.getLatLng(
			ONDE,
			function(point)
			{
				if (!point)
				{
					alert(ONDE+' Endereço não encontrado');
					return false;
				}
				else
				{
					var CENTRO = (CORD) ? eval('new GLatLng('+CORD+')') : point;
					map.setCenter(CENTRO, ZOOM);
					
					// ÍCONE MARCADOR
					var icoLogo			= new GIcon(G_DEFAULT_ICON);
					icoLogo.image		= "http://www.atualfloripaimoveis.com.br/images/maps_icone.png";
					markerOptions		= { icon:icoLogo };
					icoLogo.iconSize	= new GSize(25, 32);
					icoLogo.shadowSize	= new GSize(27, 34);

					var marker = new GMarker(CENTRO, markerOptions);
					map.addOverlay(marker);
					
					var TEXTO = (ADRESS) ? '<br /><span>'+ADRESS+'</span><br />'+CHAMADA : '<br />'+CHAMADA;
					if (CHAMADA)
						marker.openInfoWindowHtml('<div id="MAPT"><strong>Atual Floripa Imóveis</strong>'+TEXTO+'</div>');
				}
			}
		);
	}
}

//-->
