﻿
function MM_showHideLayers2() { //v6.0
    var i, p, v, obj, args = MM_showHideLayers2.arguments;
    for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) {
        v = args[i + 2];
        if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
        obj.visibility = v;
    }
}


function popaChat(nomeSWF, Width, Height) {
    var arquivo = nomeSWF + ".swf";
    var htML = '';
    var largo = Width;
    var alto = Height;
    var version = "9,0,0,0";
    var quality = "high";
    var bgcolor = "#ffffff";
    var wmode = "transparent";
    htML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + '" width=' + largo + ' height=' + alto + '>\n';
    htML =htML + '<param name="movie" value=' + arquivo + ' />\n';
    htML =htML + '<param name="quality" value=' + quality + '>\n';
    htML =htML + '<param name="bgcolor" value=' + bgcolor + '>\n';
    htML =htML + '<param name="wmode" value=' + wmode + '>\n';
    htML =htML + '<embed src=' + arquivo + ' wmode=' + wmode + ' bgcolor=' + bgcolor + ' quality=' + quality + ' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + largo + ' height=' + alto + '></embed>';
    htML = htML + '</object>\n';
    document.getElementById("topbar").innerHTML = htML;
    MM_showHideLayers2('topbar', '', 'show');
}
//window.setTimeout(alert('aaaa'), 20000);
function inicia() {
    MM_showHideLayers2('topbar', '', 'hide');
    setTimeout("popaChat('http://www.patrimovel.com/app_themes/flash/chatAtivo', '500', '500')", 30000);  // Tempo de atividade do DHTML
}
function iniciaRVI() {
    MM_showHideLayers2('topbar', '', 'hide');
    setTimeout("popaChat('http://www.rubemvasconcelosimoveis.com.br/app_themes/flash/chatAtivo', '300', '300')", 30000);  // Tempo de atividade do DHTML
}

function iniciaRev() {
    MM_showHideLayers2('topbar', '', 'hide');
    setTimeout("popaChat('http://www.patrimovel.com/app_themes/flash/chatAtivo', '300', '300')", 30000);  // Tempo de atividade do DHTML
}

function fecha() {
    MM_showHideLayers2('topbar', '', 'hide');
}

function MM_findObj(n, d) { //v4.01
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n); return x;
}
