function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  if(document.images){ if(!document.MM_p) document.MM_p=new Array(); with(document){
   var i,j=MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
     if (a[i].indexOf("#")!=0){ MM_p[j]=new Image; MM_p[j++].src=a[i];}}}
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function RetPosRes() {
  var x = document.resolution();
}

function inicio() {
   MM_preloadImages('images/lancamento.gif',
   'images/quadro-bottom-left.gif',
   'images/quadro-bottom-left-2.gif',
   'images/quadro-bottom-meio.gif',
   'images/quadro-bottom-meio-2.gif',
   'images/quadro-bottom-right.gif',
   'images/quadro-bottom-right-2.gif',
   'images/quadro-left.gif',
   'images/quadro-right.gif',
   'images/quadro-top-left.gif',
   'images/quadro-top-meio.gif',
   'images/quadro-top-right.gif',
   'images/sem-lupa.gif',
   'images/titulo-contato.gif',
   'images/titulo-fora.gif',
   'images/titulo-galeria.gif',
   'images/titulo-galmodelos.gif',
   'images/titulo-left.gif',
   'images/titulo-produtos.gif',
   'images/titulo-right.gif',
   'images/zip.gif');
}

function abreJanela(img,w,h) {
/*
    if (janela != null) {       
        if (!janela.closed) {   
            janela.close(); 
        }
    }
*/

    nFoto=img;
    caracts = "width="+w;
    caracts+= ",height="+h;
    caracts+= ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no";
	
	if (window.screen) {
        var wc = screen.availWidth / 2;
        var hc = screen.availHeight / 2;
        var x = wc - (w/2);
        var y = hc - (h/2);
        caracts+=",screenY="+y+",screenX="+x+",top="+y+",left="+x;
    }	

    janela=window.open("foto.htm","foto",caracts);  
    janela.focus();                                 
}
var nFoto=-1;


function abreFoto(img,w,h) {
/*
    if (janela != null) {       
        if (!janela.closed) {   
            janela.close(); 
        }
    }
*/
    nFoto=img;
    caracts = "width="+w;
    caracts+= ",height="+h;
    caracts+= ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no";
	
	if (window.screen) {
        var wc = screen.availWidth / 2;
        var hc = screen.availHeight / 2;
        var x = wc - (w/2);
        var y = hc - (h/2);
        caracts+=",screenY="+y+",screenX="+x+",top="+y+",left="+x;
    }	

    janela=window.open("../foto.htm","foto",caracts);  
    janela.focus();                                 
}
var nFoto=-1;


function abreJanelaImprensa(img,w,h) {
/*
    if (janela != null) {       
        if (!janela.closed) {   
            janela.close(); 
        }
    }
*/

    nFoto=img;
    caracts = "width="+w;
    caracts+= ",height="+h;
    caracts+= ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes";
	
	if (window.screen) {
        var wc = screen.availWidth / 2;
        var hc = screen.availHeight / 2;
        var x = wc - (w/2);
        var y = hc - (h/2);
        caracts+=",screenY="+y+",screenX="+x+",top="+y+",left="+x;
    }	

    janela=window.open("foto.htm","foto",caracts);  
    janela.focus();                                 
}
var nFoto=-1;


/*
<!-- desabilitar botão direito -->
var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);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")
*/



