// JavaScript Document


//////////////////////////////////////////////////////////////////////////////// 
//  
// PRELOAD ImageS
//  
//////////////////////////////////////////////////////////////////////////////// 
//preload menu Images
function loadImages() {
img0        = new Image();
img1        = new Image();
img2        = new Image();
img3        = new Image();
img4        = new Image();
img5        = new Image();
img6        = new Image();
img7        = new Image();
img8        = new Image();
/*
Img9	      = new Image();
Img10	      = new Image();
Img11	      = new Image();
Img12	      = new Image();
Img13	      = new Image();
Img14	      = new Image();
Img15	      = new Image();
Img18	      = new Image();
Img19	      = new Image();
Img20	      = new Image();
Img21	      = new Image();
Img22	      = new Image();
*/
Img16	      = new Image();
Img17	      = new Image();
Img23       = new Image();
Img24	      = new Image();
img0.src    = "img/header4.jpg";
img1.src    = "img/btneventosdark.gif";
img2.src    = "img/btnterapeutadark.gif";
img3.src    = "img/btnpsicologiadark.gif";
img4.src    = "img/btnhipnoterapiadark.gif";
img5.src    = "img/btndepressaodark.gif";
img6.src    = "img/btnquestoesdark.gif";
img7.src    = "img/btnlinksdark.gif";
img8.src    = "img/btncuriosidadesdark.gif";
/*
Img9.src	  = "img/bluebar.gif"
Img10.src	  = "img/bluedot.gif"
Img11.src	  = "img/bottomblue.gif"
Img12.src	  = "img/bottomgreen.gif"
Img13.src	  = "img/bottomred.gif"
Img14.src	  = "img/bottomyellow.gif"
Img15.src	  = "img/bottomyellowlarge.gif"
Img18.src	  = "img/topblue.gif"
Img19.src	  = "img/topgreen.gif"
Img20.src	  = "img/topred.gif"
Img21.src	  = "img/topyellow.gif"
Img22.src	  = "img/topyellowlarge.gif"
*/
Img16.src	  = "img/greendot.gif"
Img17.src	  = "img/reddot.gif"
Img23.src	  = "img/transparentdot.gif"
Img24.src	  = "img/yellowdot.gif"
}
//////////////////////////////////////////////////////////////////////////////// 




//////////////////////////////////////////////////////////////////////////////// 
//  
// ADJUST CELLS
// assumes the visibility of redtherapies, greentherapies and yellowcell;
// sets the yellow or red&green cells' height to match the highest one's. 
//
//////////////////////////////////////////////////////////////////////////////// 
function adjustCells()
{
  var redh    = document.getElementById('redtherapies').offsetHeight;
  var greenh  = document.getElementById('greentherapies').offsetHeight;
  var yellowh = document.getElementById('yellowcell').offsetHeight;
  var constanth = 16;

  if(redh + constanth + greenh < yellowh)
  {
    redh = (yellowh - constanth) / 2;
    greenh = redh;
    document.getElementById('redtherapies').height = redh + "px";
    document.getElementById('greentherapies').height = greenh + "px";
  }
  else
  {
    yellowh = redh + greenh + constanth;
    document.getElementById('yellowcell').height = yellowh + "px";
  }  
}
//////////////////////////////////////////////////////////////////////////////// 




//////////////////////////////////////////////////////////////////////////////// 
//  
// ADJUST YELLOW CELL
// assumes the visibility of redtherapies, greentherapies and yellowcell;
// sets yellowcell's height to the height of the left 
// redtherapies + greentherapies boxes height
//////////////////////////////////////////////////////////////////////////////// 
function adjustYellowCell()
{
  var redh    = document.getElementById('redtherapies').offsetHeight;
  var greenh  = document.getElementById('greentherapies').offsetHeight;
  var constanth = 16;
  var yellowh = redh + greenh + constanth;
  document.getElementById('yellowcell').height = yellowh + "px";
}
//////////////////////////////////////////////////////////////////////////////// 
