/* 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 = 'mapa.html';
			var sWidth = '575';
			var sHeight= '315';
		    break;
		case 2:
			sNombre = 'foto_1.html';
			var sWidth = '406';
			var sHeight= '265';
		    break;
		case 3:
			sNombre = 'foto_2.html';
			var sWidth = '406';
			var sHeight= '265';
		    break;
		case 4:
			sNombre = 'foto_3.html';
			var sWidth = '406';
			var sHeight= '265';
		    break;
		case 5:
			sNombre = 'foto_4.html';
			var sWidth = '406';
			var sHeight= '265';
		    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);
	}
}
