
var req;
function loadXMLMenu(pagina,div){
    req = null;
	divi = div;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChangeMenu;
        req.open("GET", pagina, true);
        req.send(null);
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChangeMenu;
            req.open("GET", pagina, true);
            req.send();
        }
    }
}
function processReqChangeMenu(){
	if (req.readyState == 1){
		document.getElementById(divi).innerHTML = "<div align='center'><font face='Verdana' size='-1'><strong>Carregando...</strong></font>";
	}
    if (req.readyState == 4) {
		document.getElementById(divi).innerHTML = "Carregando...";
        if (req.status == 200) {
            document.getElementById(divi).innerHTML = req.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + req.statusText);
			document.getElementById('text').innerHTML = "";
        }
    }

}

function ajax(pagina,div){
	loadXMLMenu(pagina,div);
}


function imprimir(cod,tab)
{
	var desktop = window.open('../../faleconosco/imprimir.asp?cod='+cod+'&tab='+tab, '_blank', 'left=150,top=80,width=440,height=360,toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=no')
}


function imprimir(cod,tab)
{
	var desktop = window.open('../faleconosco/imprimir.asp?cod='+cod+'&tab='+tab, '_blank', 'left=150,top=80,width=440,height=360,toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=no')
}


function tocado(titulo)
{
	var desktop = window.open('../faleconosco/tocado.asp?titulo='+titulo, '_blank', 'width=416,height=520,left=150,top=50,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no')
}

function flash(nome,width,height){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"'>");
   document.write("<param name='movie' value='"+ nome +"'>");
   document.write("<param name='quality' value='high'>");
   document.write("<embed src='"+ nome +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed>");
   document.write("</object>");
}

function flashp(nome,width,height){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"' vspace='8'>");
   document.write("<param name='movie' value='"+ nome +"'>");
   document.write("<param name='quality' value='high'>");
   document.write("<param name='wmode' value='transparent'/>");
   document.write("<embed src='"+ nome +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' vspace='8' wmode='transparent'></embed>");
   document.write("</object>");
}

function flashfoto(nome,width,height){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"' align='left' hspace='5'>");
   document.write("<param name='movie' value='"+ nome +"'>");
   document.write("<param name='quality' value='high'>");
   document.write("<param name='wmode' value='transparent'/>");
   document.write("<embed src='"+ nome +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' align='left' hspace='5' wmode='transparent'></embed>");
   document.write("</object>");
}