/* Popups */
function AbrirPopUp (iNumero, intLocal, idOferta) {
	var sNombre = '';
	var sScroll = 'no';
	var sWidth = '450';
	var sHeight= '300';
	var resiz = 'no';
	switch (iNumero) {
		case 1:
			sNombre = 'fotos/foto_1.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 2:
			sNombre = 'fotos/foto_2.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 3:
			sNombre = 'fotos/foto_3.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 4:
			sNombre = 'fotos/foto_4.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 5:
			sNombre = 'fotos/foto_5.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 6:
			sNombre = 'fotos/foto_6.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 7:
			sNombre = 'fotos/foto_7.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;

		case 8:
			sNombre = 'fotos/foto_8.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;

		case 9:
			sNombre = 'fotos/foto_9.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 10:
			sNombre = 'fotos/foto_10.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 11:
			sNombre = 'fotos/foto_11.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 12:
			sNombre = 'fotos/foto_12.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;

		case 13:
			sNombre = 'fotos/foto_13.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
		case 14:
			sNombre = 'fotos/foto_14.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;
			
		case 15:
			sNombre = 'fotos/foto_15.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;			
		case 16:
			sNombre = 'fotos/foto_16.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;		
		case 17:
			sNombre = 'fotos/foto_17.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;				
		case 18:
			sNombre = 'fotos/foto_18.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;				
		case 19:
			sNombre = 'fotos/foto_19.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;	
		case 20:
			sNombre = 'fotos/foto_20.html';
			var sWidth = '338';
			var sHeight= '450';
		    break;				
		case 21:
			sNombre = 'fotos/foto_21.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;				
		case 22:
			sNombre = 'fotos/foto_22.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;	

		case 23:
			sNombre = 'fotos/foto_23.html';
			var sWidth = '338';
			var sHeight= '450';
		    break;

		case 24:
			sNombre = 'fotos/foto_24.html';
			var sWidth = '450';
			var sHeight= '248';
		    break;	
		case 25:
			sNombre = 'fotos/foto_25.html';
			var sWidth = '338';
			var sHeight= '450';
		    break;
}


var anchosc=screen.availWidth;
var altosc=screen.availHeight;
window.open (sNombre, 'ventana' + iNumero + intLocal, 'left='+((anchosc/2)-parseInt(sWidth)/2)+',top='+((altosc/2)-parseInt(sHeight)/2)+',toolbar=no,location=no,directories=no,status=no,menubar=no,resizable='+resiz+',scrollbars=' + sScroll + ',width=' + sWidth + ',height=' + sHeight + '');
}

function randomLayer(iCantidadLayers) {
	var iRandomNumber;
	var iIndex;
	var sEstadoLayer;
	
	iRandomNumber = Math.floor(Math.random()*iCantidadLayers) + 1;
	iCantidadLayers ++;
	
	setPosition(getDivStyle('nece' + iRandomNumber), 'imgpercurva',30,0);
	
	for (iIndex = 1; iIndex < iCantidadLayers; iIndex ++) {
		if (iIndex == iRandomNumber) sEstadoLayer = 'show';
		else sEstadoLayer = 'hide';
		MM_showHideLayers('nece' + iIndex,'', sEstadoLayer);
	}
}
