/****************************************************************************
  Funciones para el manejo de ventanas
****************************************************************************/

/*
  Abre una nueva ventana de navegador sin menus
*/
function cc_openBrowserWindowLite(theURL,winName, myWidth, myHeight, isCenter) {
  features = '';
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features='left='+myLeft+',top='+myTop;
  }  
  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.scrollHeight;
  //var anchura = document.body.scrollWidth;
  //var altura = document.body.offsetHeight;
  //var anchura = document.body.offsetWidth;
  var altura = document.body.height;
  var anchura = document.body.width;
  
  /*
  if (document.all) {
    altura = document.body.scrollHeight;
    anchura = document.body.scrollWidth;
  }else {
    altura = document.images[0].height;
    anchura = document.images[0].width;
  }
  */
      
  //document.boby.clientHeight = altura;
  //window.resizeTo(x+10,y+20);
  //window.resizeTo(anchura+28,altura+30);
  window.resizeTo(anchura+10,altura+32);
  //document.write("w: " + anchura + " h: " + altura + " ");
  
  /*
  if (window.opera) {
    setTimeout('cc_autoSizeWindow()',1000);
  }
  */
  
  document.body.style.width = "1000px";
}
