function resultado_comparar_en_main()
{
    hideMapLoader();
    loadTooltip2();
}

function disable_butt()
{
    $("#comparaMapa").attr("disabled", "true");
    $("#comparaMapa").attr("class","loginButtonDisabled");
}

function comparar(id)
{
    var tipo = $("#dynamicTable").css("position");
    if(tipo === "fixed")
        tipo = "sobre";
    else
        tipo = "normal";

    xajax__comparar_residencial(id,"add", tipo);
    return false;
}
function comparar_borrar_todo()
{
    xajax__comparar_residencial(1,"del_all");
    return false;
}
function comparar_borrar(id)
{
    var tipo = $("#dynamicTable").css("position");
    if(tipo === "fixed")
        tipo = "sobre";
    else
        tipo = "normal";
    xajax__comparar_residencial(id,"del", tipo);
    return false;
}

function sacar_elemento_desde_tabla(id)
{

    var tipo = $("#dynamicTable").css("position");
    if(tipo === "fixed")
        tipo = "sobre";
    else
        tipo = "normal";
    xajax__comparar_residencial(id,"del", tipo,"inside");
    return false;

}
function showCompareTable(){
	
	$('body').append(html_comparacion);

	var arrPageSizes = ___getPageSize();
    //if(arrPageSizes[0]< 970) arrPageSizes[0]=970;

	$('#jquery-overlay').fadeIn();

	$('#compareTableLayer').css({
		opacity:			'1',
		top:				0,
		left:				arrPageSizes[2]/2-472,
		width:				935,
		//height:				arrPageSizes[3]-150,
		'z-index': '100',
		position: 'absolute'
	}).fadeIn();

	$('#compareMapContainer').css({
		opacity:			'1',
		top:				105,
		left:				0,
		width:				935,
                'background-color':             '#FFFFFF',
	//	height:				$('#compareTableContent').height(),
		'z-index': '101',
		position: 'absolute'
	});

	$('#compareTablePics').css({
		opacity:			'1',
		top:				105,
		left:				0,
		width:				935,
                'background-color':             '#FFFFFF',
	//	height:				$('#compareTableContent').height(),
		'z-index': '101',
		position: 'absolute'
	}).fadeIn();

	$(window).resize(function() {

		// Get page sizes
		var arrPageSizes = ___getPageSize();
		//if(arrPageSizes[0]< 970) arrPageSizes[0]=970;
		// Style overlay and show it
		$('#jquery-overlay').css({
			width:		"100%",
			height:		arrPageSizes[1]
		});

		$('#controlBar').css({
			top: 0,
			left: arrPageSizes[0]/2-150

		});
		$('#compareTableLayer').css({
			opacity:			'1',
			top:				0,
			left:				arrPageSizes[2]/2-472,
			width:				935,
			//height:				arrPageSizes[3]-150,
			'z-index': '100',
			position: 'absolute'
		});
	});



	$('#jquery-overlay').click(function() {
		_finishCompare();
	});

        xajax__generar_tabla_comparacion();

}


function showCompareMap(lat, longi){
   // $("#compareMapContainer").html('asdasdsda');
    $('#compareMapContainer').css({
        height:	$('#compareTableContent').height()-20
    }).fadeIn();
    $("#compareMapContainer").show();
    loadGmap('compareMap',11,lat,longi);
    ajaxQryWGE('','ajaxCompareTableMapPoints','','POST','json',createMarkersCompare);
}


