/* precarga de imagenes
abrir capas
... etc. */
function toCbe( str ){
  return cbeGetElementById( str ).cbe;
}

function toObj( str ){
  return cbeGetElementById( str );
}

function mostrarCapa( idCapa ){
	if ( toObj( idCapa ) != null )
	{
		toCbe( idCapa ).visibility( true );
	}
}

function cerrarCapa( idCapa ){
	toCbe( idCapa ).visibility( false );
}

function mostrarImg( n, nLength ){
	for (var i=0; i<=nLength ; i++ )
	{
		if ( i == n )
			toObj( "idimgScroll" + i ).style.display = "";
		else
			toObj( "idimgScroll" + i ).style.display = "none";
		}
}

function imgScrollLeft( strScroll ){
  imgScrollMove( strScroll, 0 );
}
function imgScrollRight( strScroll ){
  var o = toCbe( strScroll )
  imgScrollMove( strScroll , 220 - o.width() );	
//    imgScrollMove( strScroll , 220 - 300 );
//    imgScrollMove( strScroll , -440 );
}
function imgScrollMove( strScroll, x ){
  var o = toCbe( strScroll )
  imgScrollStop( strScroll );
  o.slideTo( x, o.top(), Math.abs( o.left() - x ) * 10 );
}
function imgScrollStop( strScroll ){
  toCbe( strScroll ).stop = true;
}

//var anchoDocum = document.body.style.width

//alert( anchoDocum )

// Para hacer las ventanas modales, al incluirla en el onload
function ventanaModal( alto, ancho )
{
	self.resizeTo(ancho,alto);
	ancho_p=screen.width;
	alto_p=screen.height;
	self.moveTo(ancho_p/2-ancho/2,alto_p/2-alto/2);
	self.focus();
}

