function abrirGrande(ventana,nombre)
{
e='width=screen.availWidth,'
f='height=screen.availHeight,'
hola=window.open(ventana,nombre,e+f+'left=0,top=0,statusbar=no,resizable=yes');
hola.focus();
hola.resizeTo(screen.availWidth, screen.availHeight);
}

function abrir(ventana,nombre,a,b)
{
e='left=50,top=50,width='+a+','
f='height='+b+','
hola=window.open(ventana,nombre,e+f+'left=50,top=50,statusbar=no');
hola.focus();
}

function abrirJuego(ventana)
{
hola=window.open(ventana,'RofoJuegos','width=640,height=480,left=20,top=20,resizable=yes');
hola.focus();
}

function abrirImg(img,nombre,a,b)
{
hola=window.open('', nombre ,'width=' + a + ',height=' + b +',left=50,top=50,location=0,statusbar=0,resizable=0');
hola.focus();
hola.document.writeln('<html>');
hola.document.writeln('<head>');
hola.document.writeln('<title>' + nombre + '</title>');
hola.document.writeln('<style>');
hola.document.writeln('body {background-image: url(images/icon_inprogress.gif);	background-position:center;background-repeat: no-repeat;}');
hola.document.writeln('</style>');
hola.document.writeln('</head>');
hola.document.writeln('<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor="#ffffff">');
hola.document.writeln('<img src="' + img + '" width="' + a + '" height="' + b + '" />');
hola.document.writeln('</body>');
hola.document.writeln('</html>');
}


function agregar()
{ 
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4))
	{ 
	var url="http://www.industriasrofo.com/"; 
	var titulo=" Industrias ROFO"; 
	window.external.AddFavorite(url,titulo);
	} 
else
	{ 
	if(navigator.appName == "Netscape") 
	alert ("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
	} 
window.location.reload();   	
} 

function flashIntro()
{
moveTo(0,0);
resizeTo(screen.availWidth,screen.availHeight);
document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="100%" HEIGHT="100%" id="home" ALIGN="">')
document.writeln('<PARAM NAME=movie VALUE="flash/home.swf">')
document.writeln('<PARAM NAME=quality VALUE=high>')
document.writeln('<PARAM NAME=bgcolor VALUE=#000000>')
document.writeln('<EMBED src="flash/home.swf" quality=high bgcolor=#000000  WIDTH="100%" HEIGHT="100%" NAME="home" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">')
document.writeln('</EMBED>')
document.writeln('</OBJECT>')

}

function flashMiniIntro()
{
izquierda=(screen.availWidth-200)/2-20;
moveTo(0,0);
resizeTo(screen.availWidth,screen.availHeight);
document.writeln('<DIV style="position:absolute; left:'+izquierda+'px; top:50px;">')
document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="200" HEIGHT="275" id="home" ALIGN="">')
document.writeln('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/intro.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#000000" />')
document.writeln('<EMBED src="flash/intro.swf" quality=high bgcolor=#000000  WIDTH="200" HEIGHT="275" NAME="home" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">')
document.writeln('</EMBED>')
document.writeln('</OBJECT>')
document.writeln('</DIV>')
}

function capaContenedora()
{
moveTo(0,0);
resizeTo(screen.availWidth,screen.availHeight);
document.writeln('<div id="contenedor" style="position:absolute;left:0;top:0;height:'+screen.availHeight+';width:'+screen.availWidth+'">');
}

function cabecera()
{
document.writeln('<img src="images/panorama.jpg" class="sinmargen">');	
}
function capaBanner(archivo,ancho,alto)
{
var ancho_pantalla=(screen.availWidth)-20;
var alto_pantalla=(screen.availHeight)*.20;

document.writeln('<div style="position:absolute;border: 1px solid #999999;background-color:#eeeeee;left:5px;top:5px;height:'+alto_pantalla+';width:'+ancho_pantalla+';z-index:0;">')
document.writeln('	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width='+ancho+' height='+alto+' style="padding:0; ">')
document.writeln('		<param name=movie value='+archivo+'>')
document.writeln('		<param name=quality value=High>')
document.writeln('		<param name="LOOP" value="0">')
document.writeln('		<param name="_cx" value="14552">')
document.writeln('		<param name="_cy" value="2910">')
document.writeln('		<param name="FlashVars" value="-1">')
document.writeln('		<param name="Src" value='+archivo+'>')
document.writeln('		<param name="WMode" value="Transparent">')
document.writeln('		<param name="Play" value="-1">')
document.writeln('		<param name="SAlign" value>')
document.writeln('		<param name="Menu" value="-1">')
document.writeln('		<param name="Base" value>')
document.writeln('		<param name="Scale" value="ShowAll">')
document.writeln('		<param name="DeviceFont" value="0">')
document.writeln('		<param name="EmbedMovie" value="0">')
document.writeln('		<param name="BGColor" value>')
document.writeln('		<param name="SWRemote" value>')
document.writeln('		<embed src='+archivo+' quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width='+ancho+' height='+alto+' loop="false">')
document.writeln('		</embed>')
document.writeln('	</object>')
document.writeln('</div>')
}

function capaMenu()
{
var top_capa=(screen.availHeight)*.20+10;
var alto_capa=screen.availHeight-top_capa-165;
var LibroVisitas="javascript:abrir('librovisitas/index.php','','800','600,scrollbars=1')"
document.writeln('<div id="navcontainer" style="position:absolute;left:5px;top:'+top_capa+';width:175;height:'+alto_capa+';">')
document.writeln('<p class="peq">Utiliza este menú para acceder a las diferentes secciones:<br></p>')
document.writeln('	<ul id="navlist">')
document.writeln('		<li><a href="inicio.htm">Bienvenid@!</a></li>')
document.writeln('		<li><a href="prehistoria.htm">Prehistoria</a></li>')
document.writeln('		<li><a href="componentes.htm">La Banda</a></li>')
document.writeln('		<li><a href="canciones.htm">Letras de canciones</a></li>')
document.writeln('		<li><a href="mptreses.htm">Para escuchar</a></li>')
document.writeln('		<li><a href="conciertos.htm">Videos/Conciertos</a></li>')
document.writeln('		<li><a href="rofofotos.htm">Fotos</a></li>')
document.writeln('		<li><a href="rofoklub.htm">RofoKlub</a></li>')
document.writeln('		<li><a href="noticias.php">Noticias</a></li>')
document.writeln('		<li><a href="enlaces.htm">Webs amigas</a></li>')
document.writeln('		<li><a href='+LibroVisitas+'>Libro de visitas</a></li>')

document.writeln('	</ul>')
document.writeln('</div>')
}

function capaPie()
{
var alto=screen.availHeight-160;
var descargas="javascript:abrir('rofoklub/descargas/descargas.htm','','350','400,scrollbars=1')"
var guestbook="javascript:abrir('libro_visitas/index.php','','800','600,scrollbars=1')"
var juegos="javascript:abrir('rofoklub/juegos/juegos.htm','','300','400,scrollbars=1,resizable=1')"
document.writeln('<div id="pie" class="peq" style="position:absolute;clear: both;padding: 2px; left:5px;top:'+alto+';width:97%;border-top: 1px solid #999999;text-align:center;">')
document.writeln('<img align="absmiddle" class="img_pie" src="images/intro.gif">&nbsp;<a target="_top" href="index.html">Intro</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/favoritos.gif">&nbsp;<a href="#" onclick="agregar()">Favoritos</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/email.gif">&nbsp;<a href="mailto:rofomanus@industriasrofo.com?subject=ˇHola Rofosssss!">Contacto</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/descargas.gif">&nbsp;<a href='+descargas+'>Descargas</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/libro.gif">&nbsp;<a href='+guestbook+'>Libro de visitas</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/cool.gif">&nbsp;<a href='+juegos+'>RofoJuegos</a> | ')
document.writeln('<img align="absmiddle" class="img_pie" src="images/webmail.gif">&nbsp;<a href="http://webmail.industriasrofo.com/">CorreoWeb</a></div>')
}

function capaContenido()
{
var ancho_capa=screen.availWidth-200;
var top_capa=(screen.availHeight)*.20+10;
var alto_capa=screen.availHeight-top_capa-165;

document.writeln('<div style="position:absolute;left:185;top:'+top_capa+';width:'+ancho_capa+';height:'+alto_capa+';overflow:auto;">')
}

function capaContenidoKlub()
{
var ancho_capa=screen.availWidth-200;
var top_capa=(screen.availHeight)*.20+10;
var alto_capa=screen.availHeight-top_capa-165;

document.writeln('<div class="bgklub" style="position:absolute;left:185;top:'+top_capa+';width:'+ancho_capa+';height:'+alto_capa+';overflow:auto;">')
}

function colocaFlash(archivo)
{

document.writeln('	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="90%" height="100%" style="padding:0; ">')
document.writeln('		<param name=movie value='+archivo+'>')
document.writeln('		<param name=quality value=High>')
document.writeln('		<param name="LOOP" value="0">')
document.writeln('		<param name="_cx" value="14552">')
document.writeln('		<param name="_cy" value="2910">')
document.writeln('		<param name="FlashVars" value="-1">')
document.writeln('		<param name="Src" value='+archivo+'>')
document.writeln('		<param name="WMode" value="Transparent">')
document.writeln('		<param name="Play" value="-1">')
document.writeln('		<param name="SAlign" value>')
document.writeln('		<param name="Menu" value="-1">')
document.writeln('		<param name="Base" value>')
document.writeln('		<param name="Scale" value="ShowAll">')
document.writeln('		<param name="DeviceFont" value="0">')
document.writeln('		<param name="EmbedMovie" value="0">')
document.writeln('		<param name="BGColor" value>')
document.writeln('		<param name="SWRemote" value>')
document.writeln('		<embed src='+archivo+' quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="90%" height="100%" loop="false">')
document.writeln('		</embed>')
document.writeln('	</object>')
}

function colocaJuego(archivo)
{

resizeTo(screen.availWidth,screen.availHeight);
moveTo(0,0);
document.writeln('<BODY style="margin:0;">');
document.writeln('	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="100%" height="100%" style="padding:0; ">')
document.writeln('		<param name=movie value='+archivo+'>')
document.writeln('		<param name="Src" value='+archivo+'>')
document.writeln('		<embed src='+archivo+' quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="100%" loop="true">')
document.writeln('		</embed>')
document.writeln('	</object>')
document.writeln('</BODY>')
}

function mostrarCapa(nombreCapa){
document.getElementById(nombreCapa).style.visibility="visible";
}

function ocultarCapa(nombreCapa){
document.getElementById(nombreCapa).style.visibility="hidden";
}

function ocultarFlashComponentes(){
document.getElementById("flash_componentes").style.visibility="hidden";
document.getElementById("flash_componentes").style.height=0;
}

function Reproductor(archivo,nombre)
{
mostrarCapa('reproductor');
document.getElementById('reproductor').innerHTML='<span style="width:321px;border: 1px solid #888; "><a href="#" onClick=ocultarReproductor()> <img src="images/cerrar2.jpg" alt="Cerrar" style="float:right;margin: 0px;border: 0px;"></a>'+nombre+'</span><embed src="flash/mp3player.swf" width="320" height="20" allowfullscreen="true" flashvars="&file='+archivo+'&showdownload=true&height=20&width=320&autostart=true" /></embed>';
}

function ocultarReproductor()
{

document.getElementById('reproductor').innerHTML='<p>ciao</p>';
ocultarCapa('reproductor');
}

function muestraFoto(archivo,nombre,ancho,alto)
{
mostrarCapa('foto');
document.getElementById('foto').innerHTML='<span style="width:'+ancho+'px;"><a href="#" onClick=ocultarCapa("foto");ocultarCapa("blur")> <img src="images/cerrar2.jpg" alt="Cerrar" style="float:right;margin: 0px;border: 0px;"></a>'+nombre+'</span><img src="'+archivo+'" width="'+ancho+'" height="'+alto+'" />';
mostrarCapa('blur');
}


