// JavaScript Document

function sound(n, tocar) {
var Musica;
if(n == 1){ 
Musica = "tools/musiccompress.mp3"} // Vangelis
else{
Musica = "tools/s9.mp3"}            // Nine Inch Nails

document.write("<table width='10%' border='0' cellpadding='0' cellspacing='0' height='10'>")
document.write("<tr><td rowspan='2' align='right' valign='bottom' bgcolor='#FFFFFF'><img src='../css/tools/leftmu.gif' width='3' height='43' ></td>")
document.write("<td height='10' valign='bottom' bgcolor='#FFFFFF'> <div align='center'><img src='../css/tools/topmu.gif'></div></td><td height='10' rowspan='2' align='left' valign='bottom' bgcolor='#FFFFFF'><img src='../css/tools/rightmu.gif' width='3' height='43'></td></tr>")
document.write("<tr><td valign='bottom' height='10' bgcolor='#FFFFFF'><embed src='../css/%22%2B%20Musica%20%2B%22' loop='true' autostart='"+tocar+"' width='75' height='25' vspace='false' hspace='false'></embed></td></tr>")
document.write("</table>")} 
//
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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&ia.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  window.status= "Clinica de Bioplastia - Bioplastia, a plástica sem cortes!"
}

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&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); 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];}
window.status= "Clinica de Bioplastia - Bioplastia, a plástica sem cortes!"
}                       
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_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
window.status= "Clinica de Bioplastia - Bioplastia, a plástica sem cortes!"
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function grava(chet){
if(chet.checked == false){
writeCookie("bioplastia", "nao", 24)
}
else
{writeCookie("bioplastia", "sim", 24)
}
}
function grava2(){
var carro = readCookie("bioplastia")
if(carro != "sim" && carro != "nao"){
writeCookie("bioplastia", "sim", 24)}
}
function leia(){
var carro = readCookie("bioplastia")
if(carro == "nao"){
document.write("<input name='che' type='checkbox' id='che' onChange='javascript:grava(this)' onclick='javascript:window.location.reload()'>" )
}else{
document.write("<input name='che' type='checkbox' id='che' onChange='javascript:grava(this)' checked onclick='javascript:window.location.reload()'>")}
}
// Example:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}                   

 // Example:
// alert( readCookie("bioplastia") );
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function ler(){
var carro = readCookie("bioplastia")
if( carro == "sim"){
return sound(1, true)                    
}
else{
return sound(1, false)
}}

function BrWindow(img,w,h) { //v2.0
b = "height="+h
x = parseInt(h)+30
newwindow = window.open(img,'catrod',b);
newwindow.document.open()
newwindow.document.write('<html><head><title>Figura ampliada</title></head><body topmargin="0" leftmargin="0" onload=focus()>')
newwindow.document.write('<script>window.resizeTo(width="'+w+'",height="'+x+'")</script>')
newwindow.document.write('<img src="../css/%27%2Bimg%2B%27"></body></html>')
newwindow.document.close()
 }

//solto
window.status= "Clinica de Bioplastia - Bioplastia a plástica sem cortes!"
                          
function clickIE() {
if (document.all) {
showModalDialog("security.htm",
    "window",'help:no;status:no;scroll:no;edge:raised;dialogWidth:270px;edge:raised;dialogHeight:210px') 

return false;
}
} 
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) {
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") 
 
                         
                          
                        
                      
