var tam=900;

function imagenFondo(id)
{

	
	$("#fondo").css("height",(alto-100));
	
	tam=900;
	
	if(ancho<=1200)
	{
		tam=900;
	}
	
	if(ancho>1200 )
	{
		tam=2000;
	}
	
	//
	if(id==0)
	{
		segunda(id);
	}
	if(id==2)
	{
		primera(id);
	}
}



function primera(id)
{

	$("#fondo").css("opacity",0);
	loader(id);
}



function segunda(id)
{
	var imgF = document.createElement('img');
		
		imgF.src = './contenido/fondos/' + tam +'_fondo_'+ id +'.jpg';
		imgF.width = ancho;
		
	document.getElementById('fondo').appendChild(imgF);


}


function loader(id)
{

	
	
	var imgF = document.createElement('img');
		
		imgF.src = './contenido/fondos/' + tam +'_fondo_'+ id +'.jpg';
		imgF.width = ancho;
		
	document.getElementById('fondo').appendChild(imgF); // 4

	//imgF.onload=alert("ya se cargó");
	

	if(imgF.complete  )
	{
		
		
		//$("#fondo").css("visibility","visible");
		
	$("#fondo").fadeTo(3000,1);
		clearTimeout(t);
	}
	else
	{
		t = setTimeout('loader("'+ id + '")');
	}

}



function situaProyector(modelo)
{
	
	
	if(modelo == 0)
	{
		var pan = document.getElementById('pantalla');
		
		pan.style.width= 650 + "px";
		pan.style.height= cos + "px";
		
		var nos = document.getElementById('nos');
		
		if(cos <= 450)
		{
			
			nos.style.height = (cos-50-20)  + "px";
			
			$('#sellosNos').css("top", 10 +"px");
			$('#sellosNos').css("left", (-120)+"px");
			$('#sellosNos').css("width", 120 +"px");
			$('#sellosNos').css("height", cos+"px");
			
		}
		if(cos > 550)
		{
			nos.style.height= 400 + "px";
			
			$('#sellosNos').css("top", 470 + "px");
			
			
		}
		nos.style.width= 600 + "px";
	}
	
	if(modelo == 1)
	{
		var nos = document.getElementById('orla');
		
		var cuan = document.getElementById('albumOrla').offsetHeight - 60;
		nos.style.height= cuan + "px";
		
	}
	//---------------------------------------------------------------------------
	
	$(function()
	{
		$('.scroll-pane').jScrollPane(
		{
			verticalGutter:50,
		}
		);
		
	});
	
	$('#albumOrla').css("visibility","visible");
	
}



