// JavaScript Document

<!--   
/* Script by: www.jtricks.com  
 * Version: 20071017  
 * Latest version:  
 * www.jtricks.com/javascript/navigation/floating.html  
 */  
var floatingMenuId = 'floatdiv';   
var floatingMenu =   
{   
    targetX: -250,   
    targetY: 10,   
  
    hasInner: typeof(window.innerWidth) == 'number',   
    hasElement: typeof(document.documentElement) == 'object'  
        && typeof(document.documentElement.clientWidth) == 'number',   
  
    menu:   
        document.getElementById   
        ? document.getElementById(floatingMenuId)   
        : document.all   
          ? document.all[floatingMenuId]   
          : document.layers[floatingMenuId]   
};   
  
floatingMenu.move = function ()   
{   
    floatingMenu.menu.style.left = floatingMenu.nextX + 'px';   
    floatingMenu.menu.style.top = floatingMenu.nextY - 10 + 'px';   
}   
  
floatingMenu.computeShifts = function ()   
{   
    var de = document.documentElement;   
  
    floatingMenu.shiftX =     
        floatingMenu.hasInner     
        ? pageXOffset     
        : floatingMenu.hasElement     
          ? de.scrollLeft     
          : document.body.scrollLeft;     
    if (floatingMenu.targetX < 0)   
    {   
        floatingMenu.shiftX +=   
            floatingMenu.hasElement   
            ? de.clientWidth   
            : document.body.clientWidth;   
    }   
  
    floatingMenu.shiftY =    
        floatingMenu.hasInner   
        ? pageYOffset   
        : floatingMenu.hasElement   
          ? de.scrollTop   
          : document.body.scrollTop;   
    if (floatingMenu.targetY < 0)   
    {   
        if (floatingMenu.hasElement && floatingMenu.hasInner)   
        {   
            // Handle Opera 8 problems   
            floatingMenu.shiftY +=   
                de.clientHeight > window.innerHeight   
                ? window.innerHeight   
                : de.clientHeight   
        }   
        else  
        {   
            floatingMenu.shiftY +=   
                floatingMenu.hasElement   
                ? de.clientHeight   
                : document.body.clientHeight;   
        }   
    }   
}   
  
floatingMenu.calculateCornerX = function()   
{   
    if (floatingMenu.targetX != 'center')   
        return floatingMenu.shiftX + floatingMenu.targetX;   
  
    var width = parseInt(floatingMenu.menu.offsetWidth);   
  
    var cornerX =   
        floatingMenu.hasElement   
        ? (floatingMenu.hasInner   
           ? pageXOffset   
           : document.documentElement.scrollLeft) +    
          (document.documentElement.clientWidth - width)/2   
        : document.body.scrollLeft +    
          (document.body.clientWidth - width)/2;   
    return cornerX;   
};   
  
floatingMenu.calculateCornerY = function()   
{   
    if (floatingMenu.targetY != 'center')   
        return floatingMenu.shiftY + floatingMenu.targetY;   
  
    var height = parseInt(floatingMenu.menu.offsetHeight);   
  
    // Handle Opera 8 problems   
    var clientHeight =    
        floatingMenu.hasElement && floatingMenu.hasInner   
        && document.documentElement.clientHeight    
            > window.innerHeight   
        ? window.innerHeight   
        : document.documentElement.clientHeight   
  
    var cornerY =   
        floatingMenu.hasElement   
        ? (floatingMenu.hasInner     
           ? pageYOffset   
           : document.documentElement.scrollTop) +    
          (clientHeight - height)/2   
        : document.body.scrollTop +    
          (document.body.clientHeight - height)/2;   
    return cornerY;   
};   
  
floatingMenu.doFloat = function()   
{   
    var stepX, stepY;   
  
    floatingMenu.computeShifts();   
  
    var cornerX = floatingMenu.calculateCornerX();   
  
    var stepX = (cornerX - floatingMenu.nextX) * .07;   
    if (Math.abs(stepX) < .5)   
    {   
        stepX = cornerX - floatingMenu.nextX;   
    }   
  
    var cornerY = floatingMenu.calculateCornerY();   
  
    var stepY = (cornerY - floatingMenu.nextY) * .07;   
    if (Math.abs(stepY) < .5)   
    {   
        stepY = cornerY - floatingMenu.nextY;   
    }   
  
    if (Math.abs(stepX) > 0 ||   
        Math.abs(stepY) > 0)   
    {   
        floatingMenu.nextX += stepX;   
        floatingMenu.nextY += stepY;   
        floatingMenu.move();   
    }   
  
    setTimeout('floatingMenu.doFloat()', 20);   
};   
  
// addEvent designed by Aaron Moore   
floatingMenu.addEvent = function(element, listener, handler)   
{   
    if(typeof element[listener] != 'function' ||    
       typeof element[listener + '_num'] == 'undefined')   
    {   
        element[listener + '_num'] = 0;   
        if (typeof element[listener] == 'function')   
        {   
            element[listener + 0] = element[listener];   
            element[listener + '_num']++;   
        }   
        element[listener] = function(e)   
        {   
            var r = true;   
            e = (e) ? e : window.event;   
            for(var i = element[listener + '_num'] -1; i >= 0; i--)   
            {   
                if(element[listener + i](e) == false)   
                    r = false;   
            }   
            return r;   
        }   
    }   
  
    //if handler is not already stored, assign it   
    for(var i = 0; i < element[listener + '_num']; i++)   
        if(element[listener + i] == handler)   
            return;   
    element[listener + element[listener + '_num']] = handler;   
    element[listener + '_num']++;   
};   
  
floatingMenu.init = function()   
{   
    floatingMenu.initSecondary();   
    floatingMenu.doFloat();   
};   
  
// Some browsers init scrollbars only after   
// full document load.   
floatingMenu.initSecondary = function()   
{   
    floatingMenu.computeShifts();   
    floatingMenu.nextX = floatingMenu.calculateCornerX();   
    floatingMenu.nextY = floatingMenu.calculateCornerY();   
    floatingMenu.move();   
}   
  
if (document.layers)   
    floatingMenu.addEvent(window, 'onload', floatingMenu.init);   
else  
{   
    floatingMenu.init();   
    floatingMenu.addEvent(window, 'onload',   
        floatingMenu.initSecondary);   
}   
  

//   -->
/*

function closer()
{document.all.apDiv1.style.display='none'}

function laser(){ //dentro de fun&atilde;o pra ficar desativado
if (navigator.appName == "Microsoft Internet Explorer"){	
document.write('<div id="apDiv1" style="position:absolute; left:324px; top:150px; width:314px; height:284px; z-index:1; background-color: #FFFFFF;">');
document.write(' <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('    <tr>');
document.write('      <td width="25" height="30" background="imagens/tools/topleft.jpg">&nbsp;</td>');
document.write('      <td width="260" background="imagens/tools/topcenter.jpg" class="adasubtitulo1"> Promoç&atilde;o Depilaç&atilde;o a Laser - Cl&iacute;nica LEGER</td>');
document.write('      <td width="30" background="imagens/tools/topright.jpg" onClick="javascript:closer()">&nbsp;</td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td colspan="3" align="center"> <script type="text/javascript">');
document.write('AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",');
document.write(' "width","314","height","284","src","flash/laserpopup2.swf","quality","high",');
document.write(' "pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","flash/laserpopup2" );');
document.write('</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="314" height="284">');
document.write('        <param name="movie" value="flash/laserpopup2.swf">');
document.write('       <param name="quality" value="high">');
document.write('        <embed src="flash/laserpopup2.swf" quality="high" ');
document.write('		pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" ');
document.write('		type="application/x-shockwave-flash" width="314" height="284"></embed>');
document.write('      </object></noscript>  </td>');
document.write('    </tr>   </table> </div>');
}}


if (navigator.appName == "Microsoft Internet Explorer"){	
document.write('<div id="apDiv1" style="position:absolute; left:350px; top:150px; width:326px; height:272px; z-index:1; background-color: #FFFFFF;">');
document.write(' <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('    <tr>');
document.write('      <td width="25" height="30" background="imagens/tools/topleft.jpg">&nbsp;</td>');
document.write('      <td width="260" background="imagens/tools/topcenter.jpg" class="adasubtitulo1"> Promoç&otilde;es - Cl&iacute;nica LEGER</td>');
document.write('      <td width="30" background="imagens/tools/topright.jpg" onClick="javascript:closer()">&nbsp;</td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td colspan="3" align="center"> <script type="text/javascript">');
document.write('AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",');
document.write(' "width","326","height","272","src","flash/promo.swf","quality","high",');
document.write(' "pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","flash/promo" );');
document.write('</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="326" height="272">');
document.write('        <param name="movie" value="flash/promo.swf">');
document.write('       <param name="quality" value="high">');
document.write('        <embed src="flash/promo.swf" quality="high" ');
document.write('		pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" ');
document.write('		type="application/x-shockwave-flash" width="326" height="272"></embed>');
document.write('      </object></noscript>  </td>');
document.write('    </tr>   </table> </div>');
}

function ultrashape(){ //dentro de fun&atilde;o pra ficar desativado
if (navigator.appName == "Microsoft Internet Explorer"){	
document.write('<div id="apDiv1" style="position:absolute; left:324px; top:61px; width:490px; height:387px; z-index:1; background-color: #FFFFFF;">');
document.write(' <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('    <tr>');
document.write('      <td width="25" height="30" background="imagens/tools/topleft.jpg">&nbsp;</td>');
document.write('      <td width="452" background="imagens/tools/topcenter.jpg" class="adasubtitulo1"> UltraShape - Cl&iacute;nica LEGER</td>');
document.write('      <td width="29" background="imagens/tools/topright.jpg" onClick="javascript:closer()">&nbsp;</td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td colspan="3" align="center"> <script type="text/javascript">');
document.write('AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",');
document.write(' "width","506","height","356","src","flash/ultrashapetoall","quality","high",');
document.write(' "pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","flash/ultrashapetoall" );');
document.write('</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="506" height="356">');
document.write('        <param name="movie" value="flash/ultrashapetoall.swf">');
document.write('       <param name="quality" value="high">');
document.write('        <embed src="flash/ultrashapetoall.swf" quality="high" ');
document.write('		pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" ');
document.write('		type="application/x-shockwave-flash" width="506" height="356"></embed>');
document.write('      </object></noscript>  </td>');
document.write('    </tr>   </table> </div>');
}
}
function diadospais(){ //dentro de fun&atilde;o pra ficar desativado
if (navigator.appName == "Microsoft Internet Explorer"){	
document.write('<div id="apDiv1" style="position:absolute; left:324px; top:150px; width:460px; height:425px; z-index:1; ">');
document.write(' <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('    <tr>');
document.write('      <td width="25" height="30" background="imagens/tools/topleft.gif">&nbsp;</td>');
document.write('      <td width="405" background="imagens/tools/topcenter.jpg" class="adasubtitulo1"> Promoç&atilde;o Dia dos Pais - Cl&iacute;nica LEGER</td>');
document.write('      <td width="30" background="imagens/tools/topright.jpg" onClick="javascript:closer()">&nbsp;</td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td colspan="3" align="center"> <image src="imagens/dia-dos-pais.jpg"></td>');
document.write('    </tr>   </table> </div>');
}}*/