var imagen = 1;

function verImagenGrande(){
	Ext.onReady(function(){

		// This just creates a window to wrap the login form.
		// The login object is passed to the items collection.
		var paginaWeb = new Ext.Window({
			layout:'fit',
			title:'Paso '+imagen,
			html:'<img src="./plantillas/images/promos/'+imagen+'.jpg" id="imagen" />',
			width:736,
			height:609,
			closable: true,
			modal:true,
			plain: true,
	buttons:[{
				text:'Anterior',
				handler:function(){
					if(imagen > 1){
						imagen--;
					}else{
						imagen=4;	
					}
					paginaWeb.destroy();
					verImagenGrande();
				}
			},{
				text:'Siguiente',
				handler:function(){
					if(imagen<4){
						imagen++;
					}else{
						imagen=1;	
					}
					paginaWeb.destroy();
					verImagenGrande();
				}
			}]
		});
		paginaWeb.show();

	});
}