//*****************************************************
//********************* SONIDO 21 *********************
//*****************************************************


	var barra="<<< Bienvenido a la página WEB OFICIAL de SONIDO XXI. Estudio de grabación >>>                     ";

	function click()
		{ 
			var fecha = new Date()
			var anyo = fecha.getYear()

			msg = "Copyright © SONIDO XXI - 1994-"+anyo;
			if (event.button==2)
		{
			alert(msg);
		}
		}
			document.onmousedown=click





//*****************************************************
//**************** FUNCIONES GENERALES ****************
//*****************************************************
// Funciones para todos las paginas.

	function openNewWindow(URLtoOpen, windowName)
		{
			var Lft = (screen.width) ? (screen.width-800)/2 : 0;
			var Tpo = (screen.height) ? (screen.height-600)/2 : 0;

			if ((screen.width == 800) && (screen.height == 600))
				newWindow=window.open(URLtoOpen,windowName,'toolbar=No,menubar=No,left='+Lft+',top='+Tpo+',resizable=Yes,scrollbars=Yes,status=No,location=No,width=750,height=550');
			else if ((screen.width == 1024) && (screen.height == 768))
				newWindow=window.open(URLtoOpen,windowName,'toolbar=No,menubar=No,left='+Lft+',top='+Tpo+',resizable=Yes,scrollbars=Yes,status=No,location=No,width=800,height=600');
			else newWindow=window.open(URLtoOpen,windowName,url1024x768);			
		}

	function MM_openBrWindow(theURL)
		{
			var url800x600 = "height=550,width=750,left=0,top=0,scrollbars=1,status=0,menubar=0,resizable=1,titlebar=0,toolbar=0";
			var url1024x768 = "height=600,width=800,left=0,top=0,scrollbars=1,status=0,menubar=0,resizable=1,titlebar=0,toolbar=0'";
			if ((screen.width == 800) && (screen.height == 600))
				newWindow=window.open(theURL,'SONIDO-XXI',url800x600);
			else if ((screen.width == 1024) && (screen.height == 768))
				newWindow=window.open(theURL,'SONIDO-XXI',url1024x768);
			else window.open(theURL,'SONIDO-XXI',url1024x768);

		}

	function Item()
		{
			this.length = Item.arguments.length 
			for (var i = 0; i < this.length; i++)
			this[i] = Item.arguments[i]
		}


	function Fecha()
		{
			var ndia = new Item('Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado')
			var nmes = new Item('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre')
			var ahora
			var fecha = new Date()
			var ano = fecha.getYear()
			var mes = fecha.getMonth()
			var dia = fecha.getDay()
			var aux = "" + fecha

			if (ano<10)
				{
					ano2 = "200" + eval(ano)
				}
			else if (ano<80)
				{// ano tiene 2 dígitos 19xx (más de 80)
					ano2 = "20" + ano
				} 
			else if (ano<=99)
				{// ano tiene 2 dígitos 20xx (menor de 80)
					ano2 = "19" + ano
				}
			else if (ano<1000)
				{// ano tiene 3 dígitos (100 es 2000)
					ano2 = eval(ano) + eval(1900)
				}
			else
				{// ano tiene 4 dígitos
					ano2 = ano
				}
			ahora = ndia[dia] + ", " + eval(aux.substring(7, 10)) + " de " + nmes[mes] + " de " + ano2
			return ahora
		}


	function scroll()
		{
			window.status = barra;
		  	barra = barra.substring(1, barra.length) + barra.charAt(0);
		  	window.setTimeout("scroll()",150);
		  	window.width=600;
		}



//*****************************************************
//***************** ABRIR FOTOGRAFIAS *****************
//*****************************************************
// Asignar la posicion horizontal y vertical de la ventana popup.

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Asignar a la variable AutoClose (true o false), segun lo que queramos hacer.
// TRUE - Para cerrar la ventana popup automaticamente o FALSE, para abrir varias ventanas popup.

var AutoClose = true;

// ================================
	if (parseInt(navigator.appVersion.charAt(0))>=4){
		var isNN=(navigator.appName=="Netscape")?1:0;
		var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
		var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
		var optIE='scrollbars=no,width=200,height=100,left='+PositionX+',top='+PositionY;

	function popImage(imageURL,imageTitle){
		if (isNN){imgWin=window.open('about:blank','',optNN);}
		if (isIE){imgWin=window.open('about:blank','',optIE);}
		with (imgWin.document){
			writeln('<html><head><title>Cargando imagen...</title><style>body{margin:0px;}</style>');
			writeln('<sc'+'ript>');
			writeln('var isNN,isIE;');
			writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
			writeln('isNN=(navigator.appName=="Netscape")?1:0;');
			writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
			writeln('function reSizeToImage(){');
			writeln('if (isIE){');
			writeln('window.resizeTo(100,100);');
			writeln('width=100-(document.body.clientWidth-document.images[0].width);');
			writeln('height=100-(document.body.clientHeight-document.images[0].height);');
			writeln('window.resizeTo(width,height);}');
			writeln('if (isNN){');       
			writeln('window.innerWidth=document.images["SONIDO-XXI"].width;');
			writeln('window.innerHeight=document.images["SONIDO-XXI"].height;}}');
			writeln('function doTitle(){document.title="'+imageTitle+'";}');
			writeln('</sc'+'ript>');
			if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
			else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
			writeln('<img name="SONIDO-XXI" src='+imageURL+' style="display:block"></body></html>');
			close();	
}}

