/****************************************************************************
  Funciones para el manejo de ventanas
****************************************************************************/

/*
  Abre una nueva ventana de navegador sin menus
*/
function cc_openBrowserWindowLite(theURL,winName, myWidth, myHeight, isCenter) {
  var features = '';
  if (isCenter) {
    if ((isCenter == "screen") || (isCenter == "true")) {
      if (window.screen) {
        var myLeft = (screen.width-myWidth)/2;
        var myTop = (screen.height-myHeight)/2;
        features='left='+myLeft+',top='+myTop;
      }
    }
    if (isCenter == "parent") {
    
      /*
        leech mode on
        This code was developed by Peter-Paul Koch at http://www.quirksmode.org/
      */
      var x,y;
      if (self.innerHeight) { // all except Explorer
        x = self.innerWidth;
        y = self.innerHeight;
      } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
        x = document.documentElement.clientWidth;
        y = document.documentElement.clientHeight;
      } else if (document.body) { // other Explorers
        x = document.body.clientWidth;
        y = document.body.clientHeight;
      }
      /*
        leech mode off
      */
      
      var myLeft = (x - myWidth)/2;
      var myTop = (y - myHeight)/2
      features='left='+myLeft+',top='+myTop;
    }
  } else {
    // Por defecto
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function cc_autoSizeWindow()
{  
var anchura, altura;
/*
var x,y;
var test1 = document.body.scrollHeight;
var test2 = document.body.offsetHeight
if (test1 > test2) // all but Explorer Mac
{
x = document.body.scrollWidth;
y = document.body.scrollHeight;
}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
x = document.body.offsetWidth;
y = document.body.offsetHeight;
}
*/

  var altura = document.body.height;
  var anchura = document.body.width;
      
  window.resizeTo(anchura+10,altura+32);
  
  document.body.style.width = "1000px";
}