// ····················································································································································
// Abre ventanas
function abrirVentana(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// ····················································································································································
// Cambiar el largo del Flash
function cambiarAltoFlash (datoY,posicion) {
	
	//alert(datoY)
	
	if(document.all && !document.getElementById) {
		
		//alert("document.all");
 		//document.all['menu-columna-derecha'].style.pixelWidth = datoX;
 		document.all['contenedor_flash'].style.pixelHeight = datoY + "px";
	}else{
		
		//alert("getElementById");
		//document.getElementById('menu-columna-derecha').style.width = datoX;
		//document.getElementById('cuerpo').style.height = (datoY) + "px";
		document.getElementById('contenedor_flash').style.height = (datoY) + "px";
		//document.getElementById('portofino').height = datoY;
	}

	//alert(document.getElementById('portofino').height);
}

// ····················································································································································
// Obtener área vertical disponible de la ventana
function obtenerAreaVertical () {
	
	if (window.innerHeight){
	   area_vertical = window.innerHeight;
	}else{ 
	   area_vertical = document.body.offsetHeight; 
	}

	//alert(area_vertical);
	return area_vertical;
}

// ····················································································································································
// 
function moverScroll (posicion) {

	 document.body.scrollTop = posicion;
	
}

function ___obtenerScrollTop () {

	 return document.body.scrollTop;
	
}

function obtenerScrollTop () {

	if(window.pageYOffset){
		
		pos_y_scroll = window.pageYOffset;
	 } else {
		pos_y_scroll = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	 }
	 //alert (pos_y_scroll);
	 return pos_y_scroll;

}

function dimensiones_ventana (que) {
	
  var Tamanyo = [0, 0];
  
  if (typeof window.innerWidth != 'undefined')
  {
    Tamanyo = [
        window.innerWidth,
        window.innerHeight
    ];
  }
  else if (typeof document.documentElement != 'undefined'
      && typeof document.documentElement.clientWidth !=
      'undefined' && document.documentElement.clientWidth != 0)
  {
 Tamanyo = [
        document.documentElement.clientWidth,
        document.documentElement.clientHeight
    ];
  }
  else   {
    Tamanyo = [
        document.getElementsByTagName('body')[0].clientWidth,
        document.getElementsByTagName('body')[0].clientHeight
    ];
  }
  
  //return Tamanyo;
  
  if (que == "ancho") {
	  return Tamanyo[0];
  } else if (que == "alto") {
	  return Tamanyo[1];
  }
  
  return Tamanyo;
  
}


