function mOvr(src,clrOver) {
  if (!src.contains(event.fromElement)) {
    src.style.cursor = 'hand';
    src.bgColor = clrOver;
 }
 }

function mOut(src,clrIn) {
  if (!src.contains(event.toElement)) { 
    src.style.cursor = 'default';
    src.bgColor = clrIn;
 }
 }

function mClk(src) { 
  if(event.srcElement.tagName=='TD'){ 
    src.children.tags('A')[0].click();
}
}

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
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function checanav(){
var x = navigator.appVersion;
y = x.substring(0,4);
if (y>=4) variaveis(),local();
}
function variaveis(){
if (navigator.appName == "Netscape") {
h=".left";
v=".top";
dS="document.";
sD="";
iW="window.innerWidth"
iH="window.innerHeight"
osX="window.pageXOffset"
osY="window.pageYOffset"
}else{
h=".pixelLeft";
v=".pixelTop";
dS="";
sD=".style";
iW="document.body.clientWidth"
iH="document.body.clientHeight"
osX="document.body.scrollLeft"
osY="document.body.scrollTop"
}
}
obW=676+30
obH=310+40
objectXY="marca" 

function local(){
eval(dS+objectXY+sD+h+"="+((eval(iW))-obW+(eval(osX))));
eval(dS+objectXY+sD+v+"="+((eval(iH))-obH+(eval(osY))));
setTimeout("local()",100)
}

function OpenSite() {
width = "780";
height = "560"
windowX = Math.ceil( (window.screen.width - width) / 2 );
windowY = Math.ceil( (window.screen.height - height) / 2 );
window.open("?sec=abrir", "website", "toolbar=no, location=no, directories=no, scrollbars=no, status=no, menubar=no, resizeable=no, width=" + width + ",height=" + height +", left=" + windowX +", top=" + windowY);
}

function GetCode(sec,pg,txt) {
color1 = "''"; color2 = "'#DEDEDE'";

if(pg == 0) { document.write('<tr><td width=175 onMouseOut=mOut(this,'+color1+'); onMouseOver=mOvr(this,'+color2+'); onClick=mClk(this); class=txt align=center><a href='+sec+' target=_self><b>'+txt+'</b></a></td></tr>');
}

if(pg >= 1) { document.write('<tr><td width=175 onMouseOut=mOut(this,'+color1+'); onMouseOver=mOvr(this,'+color2+'); onClick=mClk(this); class=txt align=center><a href=?sec='+sec+'&pg='+pg+' target=_self><b>'+txt+'</b></a></td></tr>');
}

if(pg == "out") { document.write('<tr><td width=175 onMouseOut=mOut(this,'+color1+'); onMouseOver=mOvr(this,'+color2+'); onClick=mClk(this); class=txt align=center><a href='+sec+' target=_blank><b>'+txt+'</b></a></td></tr>');
}

}

function GetMenu(menu) {

if(menu == "sindimoveis") {
GetCode( "sindimoveis" , "1" , "Circular Informativa" );
GetCode( "sindimoveis" , "2" , "Quem Somos?" );
GetCode( "sindimoveis" , "3" , "História do Sindicato" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "editorial") {
GetCode( "editorial" , "1" , "Novidades" );
GetCode( "editorial" , "2" , "Editorial" );
GetCode( "editorial" , "3" , "Palavra do Presidente" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "diretoria") {
GetCode( "diretoria" , "1" , "Diretoria" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "beneficios") {
GetCode( "beneficios" , "1" , "Introdução" );
GetCode( "beneficios" , "2" , "Serviços Médicos" );
GetCode( "beneficios" , "3" , "Serviços Odontológicos" );
GetCode( "beneficios" , "4" , "Colônias de Férias" );
GetCode( "beneficios" , "5" , "Auxílios" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "homologacao") {
GetCode( "homologacao" , "1" , "Homologação" );
GetCode( "contato.php?id=homologacao" , "0" , "Agende sua Homologação" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "ccoletiva") {
GetCode( "ccoletiva" , "1" , "Introdução" );
GetCode( "ccoletiva" , "2" , "Convenção Coletiva Atual" );
GetCode( "ccoletiva" , "3" , "Convenção 2010" );
GetCode( "ccoletiva" , "4" , "Convenção 2009" );
GetCode( "ccoletiva" , "5" , "Convenção 2008" );
GetCode( "ccoletiva" , "6" , "Pisos Salariais" );
GetCode( "home" , "1" , "Página Inicial" );
}

if(menu == "contato") {
GetCode( "contato.php" , "0" , "Enviar Contato" );
GetCode( "contato.php?id=homologacao" , "0" , "Agende sua Homologação" );
GetCode( "index.php?sec=home&pg=1" , "0" , "Página Inicial" );
}

if(menu == "links") {
GetCode( "links.php" , "0" , "Links e Parceiros" );
GetCode( "index.php?sec=home&pg=1" , "0" , "Página Inicial" );
}

if(menu == "boletos") {
GetCode( "boletos" , "1" , "Como Imprimir" );
GetCode( "http://www.mirah.com.br/localizacnpj2.aspx?codigoentidade=020144056954" , "out" , "Gerar Guia" );
GetCode( "http://www.mirah.com.br/localizacnpj2.aspx?codigoentidade=020144056954&contribuicao=Assistencial" , "out" , "Gerar Assistencial" );
GetCode( "index.php?sec=home&pg=1" , "0" , "Página Inicial" );
}

}
