	// ****************** ABRIR VENTANA ***********************************
	function openWin (pag,nomVentana, ancho, alto, posx, posy, propiedades, desp) {
		//si left y top llegan en blanco, hay que centrarlo
		
		if (posx== 99) {
			//calculo de las coordenadas para centrar el popup
			//gets top and left positions based on user's resolution so hint window is centered.
			posx = (window.screen.width/2) - (ancho/2 + 10 + desp); //half the screen width minus half the new window width (plus 5 pixel borders).
		}

		if (posy == 99)	{
			//calculo de las coordenadas para centrar el popup
			//gets top and left positions based on user's resolution so hint window is centered.
			posy = (window.screen.height/2) - (alto/2 - 20); //half the screen height minus half the new window height (plus title and status bars).
		}

		if (propiedades == "") {
			scrollbar="no";
		} else {
			scrollbar=propiedades;
		}
		propiedades = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbar + ",resizable=no,titlebar=no"

		stringCaracteristicas = ""
		stringCaracteristicas += "width=" + ancho 
		stringCaracteristicas += " ,height=" + alto
		stringCaracteristicas += propiedades
		stringCaracteristicas += " ,left=" + posx
		stringCaracteristicas += " ,top=" + posy
		stringCaracteristicas += " ,screenX=" + posx
		stringCaracteristicas += " ,screenY=" + posy
					 
		myWin=open(pag,nomVentana,stringCaracteristicas);
	}
	
	function shake_xy(n) {
    if (self.moveBy) {
        for (i = 10; i > 0; i--) {
            for (j = n; j > 0; j--) {
            self.moveBy(0,i);
            self.moveBy(i,0);
            self.moveBy(0,-i);
            self.moveBy(-i,0);
            }
          }
       }
    }