// variables de colores y backgrounds comunes a todas las funciones
var bgcolor_oscuro="00303c";
var background_oscuro="/videojuegos/especiales/img/vj_esp_bg01.gif";
var bgcolor_claro="005266";
var background_claro="/videojuegos/especiales/img/vj_esp_bg02.gif";
var bgcolor_titulos="000000"; // el color de los subtitulos
var bgcolor_titulo_4="6792a6";  // el de Praetorians
var bgcolor_caixa_text_lateral="3d6b80"; 
var bgcolor_caixa_text_interior="6792a6";
var background_titulo_2="/videojuegos/img/hrevista_recomenbg.gif"; // subtitulo general
var color_fondo_flotante="46889e";


// esta se utiliza en la pagina personajes
function muestra_flotante(nombre,texto,texto2,directorio,imagen,num_fotos,altura,banner) {	var date=new Date();
	var seconds=date.getSeconds();
	var title = escape(title);
	var myWindow=window.open("/videojuegos/especiales/vj_flotante.php?color="+color_fondo_flotante+"&nombre="+nombre+"&texto="+texto+"&texto2="+texto2+"&num_fotos="+num_fotos+"&directorio="+directorio+"&imagen="+imagen+"&banner="+banner,seconds,"width=488,height="+altura+",menubar=no,locationbar=no,toolbar=no,status=no,scrollbars=no,scroll=no,resizable=yes");
}

// esta es la "autentica"
function muestra_flotante_personaje(nombre,texto,texto2,directorio,imagen,num_fotos,altura,banner) {
	var date=new Date();
	var seconds=date.getSeconds();
	var title = escape(title);
	var myWindow=window.open("/videojuegos/especiales/vj_flotante_personaje.php?color="+color_fondo_flotante+"&nombre="+nombre+"&texto="+texto+"&texto2="+texto2+"&num_fotos="+num_fotos+"&directorio="+directorio+"&imagen="+imagen+"&banner="+banner,seconds,"width=488,height="+altura+",menubar=no,locationbar=no,toolbar=no,status=no,scrollbars=no,scroll=no,resizable=yes");
}
function muestra_imagen_ampliada(imagen,banner,titulo) {
	var date = new Date();
	var seconds = date.getSeconds();    
	if (banner=="si") 	altura=459;
	else				altura=395;
	var myWindow=window.open("/videojuegos/especiales/vj_flotante_img_ampliada.php?imagen="+imagen+"&banner="+banner+"&titulo="+titulo,seconds,"width=480,height="+altura+",menubar=no,locationbar=no,toolbar=no,status=no,scrollbars=no,scroll=no,resizable=yes,screenX=100,screenY=100,top=100,left=100");
}


//// INICIO - CAJA DE TITULO 1 (TITULO GENERAL)
function titulo(imagen,w_imagen) {
	var w_tbgif_div=(522-w_imagen)/2;
	var w_tbgif_mod=(522-w_imagen)%2;
	var dret=0;
	var esquerra=0;
	if (w_tbgif_mod==0) {
		dret=w_tbgif_div;
		esquerra=dret;
	} else {
		dret=w_tbgif_div-0.5;
		esquerra=w_tbgif_div+0.5;
	}	
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="31" bgcolor="#'+bgcolor_titulos+'"><img src="/img/tb.gif" width="1" height="31"></td>');
	document.write('	<td width="522" height="31" bgcolor="#'+bgcolor_titulos+'" align="center"><img src="/img/tb.gif" width="'+dret+'" height="1"><img src="/videojuegos'+imagen+'" width="'+w_imagen+'" height="31" border="0"><img src="/img/tb.gif" width="'+esquerra+'" height="1"></td>');
	document.write('	<td width="50%" height="31" bgcolor="#'+bgcolor_titulos+'"><img src="/img/tb.gif" width="1" height="31"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TITULO 1 (TITULO GENERAL)

//// INICIO - CAJA DE TITULO 2 (SUBTITULO GENERAL)
function titulo2(imagen,w_imagen) {
	var w_tbgif_div=(522-w_imagen)/2;
	var w_tbgif_mod=(522-w_imagen)%2;
	var dret=0;
	var esquerra=0;
	if (w_tbgif_mod==0) {
		dret=w_tbgif_div;
		esquerra=dret;
	} else {
		dret=w_tbgif_div-0.5;
		esquerra=w_tbgif_div+0.5;
	}	
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="22" bgcolor="#'+bgcolor_titulos+'" background="'+background_titulo_2+'"><img src="/img/tb.gif" width="1" height="22"></td>');
	document.write('	<td width="522" height="22" bgcolor="#'+bgcolor_titulos+'" background="'+background_titulo_2+'" align="center"><img src="/videojuegos'+imagen+'" width="'+w_imagen+'" height="22"></td>');
	document.write('	<td width="50%" height="22" bgcolor="#'+bgcolor_titulos+'" background="'+background_titulo_2+'"><img src="/img/tb.gif" width="1" height="22"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TITULO 2 (SUBTITULO GENERAL)

//// INICIO - CAJA DE TITULO 3 (TITULOS DE SECCIONES CON FONDO OSCURO)
function titulo3(directorio, nombre_caja, w_imagen, frase) {
	var imagen;
	var dreta=79+w_imagen;
	var esquerra=522-dreta;

	if (directorio=='general') {
		imagen = '/videojuegos/especiales/img/' + nombre_caja;
	} else {
		imagen = '/videojuegos/especiales/' + directorio + '/img/vj_' + directorio + '_' + nombre_caja + '_tit.gif';
	}
	

	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="21" bgcolor="#'+bgcolor_titulos+'"><img src="/img/tb.gif" width="1" height="21"></td>');
	document.write('	<td width="'+dreta+'" height="21" bgcolor="#'+bgcolor_titulos+'" align="left"><img src="/videojuegos/especiales/img/vj_flechas_tit.gif" width="79" height="21" border="0" alt=""><img src="'+imagen+'" width="'+w_imagen+'" height="21" border="0" alt=""></td>');
	document.write('	<td width="'+esquerra+'" height="21" bgcolor="#'+bgcolor_titulos+'" align="left" class="TD_CAJA"><img src="/img/tb.gif" width="'+esquerra+'" height="1"><br><img src="/img/tb.gif" width="10" height="1">'+frase+'</td>');
	document.write('	<td width="50%" height="22" bgcolor="#'+bgcolor_titulos+'"><img src="/img/tb.gif" width="1" height="21"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TITULO 3 (TITULOS DE SECCIONES CON FONDO OSCURO)

//// INICIO - CAJA DE TITULO 4 (PRAETORIANS CON FONDO CLARO)
function titulo4(imagen,w_imagen) {
	var w_tbgif_div=(522-w_imagen)/2;
	var w_tbgif_mod=(522-w_imagen)%2;
	var dret=0;
	var esquerra=0;
	if (w_tbgif_mod==0) {
		dret=w_tbgif_div;
		esquerra=dret;
	} else {
		dret=w_tbgif_div-0.5;
		esquerra=w_tbgif_div+0.5;
	}	
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="24" bgcolor="#'+bgcolor_titulo_4+'"><img src="/img/tb.gif" width="1" height="24"></td>');
	document.write('	<td width="522" height="24" bgcolor="#'+bgcolor_titulo_4+'"  align="center" valign="top"><img src="/videojuegos'+imagen+'" width="'+w_imagen+'" height="24"></td>');
	document.write('	<td width="50%" height="24" bgcolor="#'+bgcolor_titulo_4+'"><img src="/img/tb.gif" width="1" height="24"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TITULO 4 (PRAETORIANS CON FONDO CLARO)

//// INICIO - CAJA DE TEXTO
function caixa_text(texto,orientacion) {
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="10" bgcolor="#'+bgcolor_caixa_text_lateral+'"><img src="/img/tb.gif" width="1" height="22"></td>');
	document.write('	<td width="5" height="10" bgcolor="#'+bgcolor_caixa_text_interior+'"><img src="/img/tb.gif" width="5" height="1"></td>');
	document.write('	<td width="512" height="10" bgcolor="#'+bgcolor_caixa_text_interior+'" align="'+orientacion+'" class="TD_CAJA"><img src="/img/tb.gif" width="512" height="5"><br>'+texto+'<br><img src="/img/tb.gif" width="512" height="5"></td>');
	document.write('	<td width="5" height="10" bgcolor="#'+bgcolor_caixa_text_interior+'"><img src="/img/tb.gif" width="5" height="1"></td>');
	document.write('	<td width="50%" height="10" bgcolor="#'+bgcolor_caixa_text_lateral+'"><img src="/img/tb.gif" width="1" height="22"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TEXTO

//// INICIO - CAJA DE PLATAFORMA
function plataformas(link1,link2,link3,link4,link5) {
	var inicitd='<td width="506" height="48" bgcolor="#000000"  align="center" valign="top"><img src="/img/tb.gif" width="10" height="1">';
	var finaltd='<img src="/img/tb.gif" width="10" height="1"></td>';
	if (link1!="") {
		var mitgtd='<a href="'+link1+'" target="_blank"><img src="/videojuegos/especiales/img/vj_logo_pc.gif" width="29" height="48" border="0" alt=""></a><img src="/img/tb.gif" width="42" height="1"><a href="'+link2+'" target="_blank"><img src="/videojuegos/especiales/img/vj_logo_xbox.gif" width="43" height="48" border="0" alt=""></a><img src="/img/tb.gif" width="41" height="1"><a href="'+link3+'" target="_blank"><img src="/videojuegos/especiales/img/vj_logo_play2.gif" width="76" height="48" border="0" alt=""></a><img src="/img/tb.gif" width="41" height="1"><a href="'+link4+'" target="_blank"><img src="/videojuegos/especiales/img/vj_logo_gamecube.gif" width="36" height="48" border="0" alt=""></a><img src="/img/tb.gif" width="42" height="1"><a href="'+link5+'" target="_blank"><img src="/videojuegos/especiales/img/vj_logo_gameboyadvance.gif" width="136" height="48" border="0" alt=""></a>';
	} else {
		var mitgtd='<img src="/videojuegos/especiales/img/vj_logo_pc.gif" width="29" height="48" border="0" alt=""><img src="/img/tb.gif" width="42" height="1"><img src="/videojuegos/especiales/img/vj_logo_xbox.gif" width="43" height="48" border="0" alt=""><img src="/img/tb.gif" width="41" height="1"><img src="/videojuegos/especiales/img/vj_logo_play2.gif" width="76" height="48" border="0" alt=""><img src="/img/tb.gif" width="41" height="1"><img src="/videojuegos/especiales/img/vj_logo_gamecube.gif" width="36" height="48" border="0" alt=""><img src="/img/tb.gif" width="42" height="1"><img src="/videojuegos/especiales/img/vj_logo_gameboyadvance.gif" width="136" height="48" border="0" alt="">';
	}
	titulo3('general','vj_plataformas_tit.gif',134,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="8" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_claro+'" colspan="3"><img src="/img/tb.gif" width="522" height="6"></td>');
	document.write('	<td width="50%" height="8" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('	<td width="50%" height="48" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="48"></td>');
	document.write('	<td width="8" height="48" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="8" height="1"></td>');
	document.write(inicitd+mitgtd+finaltd);
	document.write('	<td width="8" height="48" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="8" height="1"></td>');
	document.write('	<td width="50%" height="48" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="48"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('	<td width="50%" height="8" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_claro+'" colspan="3"><img src="/img/tb.gif" width="522" height="6"></td>');
	document.write('	<td width="50%" height="8" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE PLATAFORMA

//// INICIO - CAJA DE FORO
function foro() {
	titulo3('general','vj_foro_tit.gif',225,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="30" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('	<td width="522" height="30" bgcolor="#'+bgcolor_oscuro+'" bgcolor="#'+bgcolor_oscuro+'" valign="middle" align="left"><img src="/img/tb.gif" width="522" height="2"><br><img src="/img/tb.gif" width="78" height="1"><a href="/foros/foro.php?f=c20" target="_top" class="TD_CAJA">Quieres opinar sobre este juego?...</a> <a href="/foros/foro.php?f=c20" target="_top" class="TD_DESCARGAS">Clica aquí</a></td>');
	document.write('	<td width="50%" height="30" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE FORO

//// INICIO - FLOTANTE DE NOTICIAS
function flotante_noticia(fecha,titulo,texto,banner,altura) {
	var date=new Date();
	var seconds=date.getSeconds();
	var myWindow=window.open("/videojuegos/especiales/vj_flotante_noticia.php?color="+color_fondo_flotante+"&fecha="+fecha+"&titulo="+titulo+"&texto="+texto+"&banner="+banner,seconds,"width=476,height="+altura+",menubar=no,locationbar=no,toolbar=no,status=no,scrollbars=no,scroll=no,resizable=yes");
}
//// FINAL - FLOTANTE DE NOTICIAS

//// INICIO - CAJA DE NOTICIAS
function cabecera_noticias() {
	titulo3('general','vj_noticias_tit.gif',86,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="10" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('	<td width="522" height="30" bgcolor="#'+bgcolor_oscuro+'" bgcolor="#'+bgcolor_oscuro+'" valign="middle" align="left"><img src="/img/tb.gif" width="522" height="6"><br>');
}
function noticias(fecha,titulo,texto,banner,altura) {
	document.write('&nbsp;&nbsp;&nbsp;<span class="TD_CAJA">•</span>&nbsp;<a href="javascript:flotante_noticia(\''+fecha+'\',\''+titulo+'\',\''+texto+'\',\''+banner+'\',\''+altura+'\')" class="TD_FECHA">'+fecha+'</a>&nbsp;<a href="javascript:flotante_noticia(\''+fecha+'\',\''+titulo+'\',\''+texto+'\',\''+banner+'\',\''+altura+'\')" class="TD_CAJA">'+titulo+'</a>&nbsp;<a href="javascript:flotante_noticia(\''+fecha+'\',\''+titulo+'\',\''+texto+'\',\''+banner+'\',\''+altura+'\')" class="TD_DESCARGAS">Más...</a><br><img src="/img/tb.gif" width="522" height="3"><br>');
}
function fin_noticias() {
	document.write('<img src="/img/tb.gif" width="522" height="6"><br></td>');
	document.write('	<td width="50%" height="10" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE NOTICIAS


//// INICIO - CAJA DE LISTADO
function cabecera_listado() {
	titulo3('general','vj_noticias_tit.gif',86,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="10" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="10"></td>');
	document.write('	<td width="522" height="10" colspan="3" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="center" class="TITULO_FLOTANTE"><img src="/img/tb.gif" width="522" height="3"><br>Clica en listado para bla bla bla<br><img src="/img/tb.gif" width="522" height="2"></td>');
	document.write('	<td width="50%" height="10" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="10"></td>');
	document.write('</tr>');
}
function inicio_linea_listado() {
	document.write('<tr>');
	document.write('	<td width="50%" height="20" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="20"></td>');
	document.write('	<td width="80" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="80" height="1"></td>'); 
}
function linea_listado_url(texto,url) {
	document.write('	<td width="221" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="left"><img src="/img/tb.gif" width="221" height="1"><br><a href="'+url+'" target="_top" class="TD_FLOTANTE">•&nbsp;'+texto+'</a><br><img src="/img/tb.gif" width="221" height="3"><br></td>');
}
function	linea_listado_descarga(texto,imagen_descarga,imagen_cortesia,url_cortesia,url_descarga,title,banner) {
	document.write('	<td width="221" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="left"><img src="/img/tb.gif" width="221" height="1"><br><a href="javascript:flotante_descarga(\''+imagen_descarga+'\',\''+imagen_cortesia+'\',\''+url_cortesia+'\',\''+url_descarga+'\',\''+title+'\',\''+banner+'\');" class="TD_FLOTANTE">•&nbsp;'+texto+'</a><br><img src="/img/tb.gif" width="221" height="3"><br></td>');
}
function linea_listado_imagen(texto,imagen,banner,titulo) {
	document.write('	<td width="221" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="left"><img src="/img/tb.gif" width="221" height="1"><br><a href="javascript:muestra_imagen_ampliada(\''+imagen+'\',\''+banner+'\',\''+titulo+'\');" class="TD_FLOTANTE">•&nbsp;'+texto+'</a><br><img src="/img/tb.gif" width="221" height="3"><br></td>');
}
function linea_listado_vacia() {
	document.write('	<td width="221" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="221" height="1"></td>');
}
function final_linea_listado() {
	document.write('	<td width="50%" height="20" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="20"></td>');
	document.write('</tr>');
}
function fin_listado() {
	document.write('<tr>');
	document.write('	<td width="50%" height="5" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="5"></td>');
	document.write('	<td width="522" height="5" colspan="3" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="522" height="5"></td>');
	document.write('	<td width="50%" height="5" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="5"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE LISTADO

//// INICIO - CAJA DE IMAGENES PEQUEÑAS
function imagenes(directorio,nombre_caja,numero,title) {
	titulo3('general','vj_foro_tit.gif',225,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="30" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('	<td width="522" height="30" bgcolor="#'+bgcolor_oscuro+'" bgcolor="#'+bgcolor_oscuro+'" valign="middle" align="left" class="T_FLOTANTE"><img src="/img/tb.gif" width="522" height="2"><br><img src="/img/tb.gif" width="10" height="2">Bloque de texto con tira de fotos...<br><img src="/img/tb.gif" width="522" height="5"><br>');
	var xurro="";
	var cont=1;
	var cont2="";
	while (cont<=numero) {
		if (cont<10)	cont2="0"+cont;
		else			cont2=cont;
		if ((cont%6)==0) xurro=xurro+'<br><img src="/img/tb.gif" width="522" height="10"><br>';
		xurro=xurro+'<img src="/img/tb.gif" width="10" height="1"><a href="javascript:	muestra_imagen_ampliada(\'/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+cont2+'.jpg\',\'si\',\''+title+'\')"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+cont2+'_th.jpg" width="58" height="45" border="0" alt=""></a>';
		cont=cont+1;
	}
	document.write(xurro+'<br><img src="/img/tb.gif" width="522" height="10"></td><td width="50%" height="30" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE IMAGENES PEQUEÑAS

//// INICIO - CAJA DE PERSONAJES
function cabecera_personajes() {
	titulo3('general','vj_personajes_tit.gif',125,'Aqui va una posible frase de personajes');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="10" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="10"></td>');
	document.write('	<td width="522" height="10" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="center" class="TITULO_FLOTANTE"><img src="/img/tb.gif" width="522" height="3"><br>Clica en los personajes para bla bla bla<br><img src="/img/tb.gif" width="522" height="2"></td>');
	document.write('	<td width="50%" height="10" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="10"></td>');
	document.write('</tr>');
}
function inicio_fila_personajes() {
	document.write('<tr>');
	document.write('	<td width="50%" height="20" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="20"></td>');
	document.write('	<td width="522" height="20" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="top" align="left">');
}
function personaje(directorio,nombre,texto_flotante1,texto_flotante2,imagen,num_fotos,altura,banner) {
	document.write('<img src="/img/tb.gif" width="6" height="1"><a href="javascript:muestra_flotante_personaje(\''+nombre+'\',\''+texto_flotante1+'\',\''+texto_flotante2+'\',\''+directorio+'\',\''+imagen+'\','+num_fotos+','+altura+',\''+banner+'\')"><img src="/videojuegos/especiales/'+directorio+'/img/'+imagen+'_0.gif" width="80" height="142" border="0" alt=""></a>');
}
function final_fila_personajes(numero_personajes) {
	var w_img_tb=((6-numero_personajes)*86)+6
	document.write('<img src="/img/tb.gif" width="'+w_img_tb+'" height="20"></td><td width="50%" height="20" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="20"></td>');
	document.write('</tr>');
}
function final_personajes() {
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE PERSONAJES



//// INICIO - CAJA DE TEXTOMASFOTO
function texto_foto(directorio,nombre_caja,imagen,imagen2,posicion_foto,titulo,texto,link) {
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="8" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	if (imagen2=="") { // solo hay una imagen
		document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_oscuro+'" colspan="5"><img src="/img/tb.gif" width="522" height="6"></td>');
	} else {
		document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_oscuro+'" colspan="7"><img src="/img/tb.gif" width="522" height="6"></td>');
	}	
	document.write('	<td width="50%" height="8" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('</tr>');
	if (posicion_foto=="izquierda") {// la foto va a la izquierda y el texto a la derecha
		document.write('<tr>');
		document.write('	<td width="50%" height="100" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="99"></td>');
		document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
		
		if (imagen2=="") { // solo hay una imagen
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="362" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="362" height="1"><br><a href="'+link+'" target="_top" class="TD_FECHA">'+titulo+'</a><br><img src="/img/tb.gif" width="362" height="3"><br><a href="'+link+'" target="_top" class="TD_CAJA_F">'+texto+'<br><a href="'+link+'" target="_top" class="TD_DESCARGAS">Más info</a></td>');
			} else {
				document.write('	<td width="362" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="362" height="1"><br><span class="TITULO_FLOTANTE">'+titulo+'<br><img src="/img/tb.gif" width="362" height="3"><br><span class="T_FLOTANTE">'+texto+'</span></td>');
			}
		} else { // hay 2 imagenes
		
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen2+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen2+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="222" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="222" height="1"><br><a href="'+link+'" target="_top" class="TD_FECHA">'+titulo+'</a><br><img src="/img/tb.gif" width="222" height="3"><br><a href="'+link+'" target="_top" class="TD_CAJA_F">'+texto+'&nbsp;&nbsp;<a href="'+link+'" target="_top" class="TD_DESCARGAS">Más info</a></td>');
			} else {
				document.write('	<td width="222" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="222" height="1"><br><span class="TITULO_FLOTANTE">'+titulo+'<br><img src="/img/tb.gif" width="222" height="3"><br><span class="T_FLOTANTE">'+texto+'</span></td>');
			}
		}
		document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
		document.write('	<td width="50%" height="100" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="100"></td>');
		document.write('</tr>');

	} else { // la foto va a la derecha y el texto a la izquierda

		document.write('<tr>');
		document.write('	<td width="50%" height="100" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="99"></td>');
		document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
		if (imagen2=="") { // solo hay una imagen
			if (link!="") {
				document.write('	<td width="362" height="100" valign="top" align="right" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="362" height="1"><br><a href="'+link+'" target="_top" class="TD_FECHA">'+titulo+'</a><br><img src="/img/tb.gif" width="362" height="3"><br><a href="'+link+'" target="_top" class="TD_CAJA_F">'+texto+'&nbsp;&nbsp;<a href="'+link+'" target="_top" class="TD_DESCARGAS">Más info</a></td>');
			} else {
				document.write('	<td width="362" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="362" height="1"><br><span class="TITULO_FLOTANTE">'+titulo+'<br><img src="/img/tb.gif" width="362" height="3"><br><span class="T_FLOTANTE">'+texto+'</span></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
		} else { // 2 imagenes...
			if (link!="") {
				document.write('	<td width="222" height="100" valign="top" align="right" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="222" height="1"><br><a href="'+link+'" target="_top" class="TD_FECHA">'+titulo+'</a><br><img src="/img/tb.gif" width="222" height="3"><br><a href="'+link+'" target="_top" class="TD_CAJA_F">'+texto+'&nbsp;&nbsp;<a href="'+link+'" target="_top" class="TD_DESCARGAS">Más info</a></td>');
			} else {
				document.write('	<td width="222" height="100" valign="top" align="left" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="222" height="1"><br><span class="TITULO_FLOTANTE">'+titulo+'<br><img src="/img/tb.gif" width="222" height="3"><br><span class="T_FLOTANTE">'+texto+'</span></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
			document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
			if (link!="") {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><a href="'+link+'" target="_top"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen2+'.jpg" width="130" height="99" border="0" alt=""></a><br><img src="/img/tb.gif" width="1" height="1"></td>');
			} else {
				document.write('	<td width="130" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/videojuegos/especiales/'+directorio+'/img/vj_'+nombre_caja+'_'+imagen2+'.jpg" width="130" height="99" border="0" alt=""><br><img src="/img/tb.gif" width="1" height="1"></td>');
			}
		}	
		document.write('	<td width="10" height="100" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="10" height="6"></td>');
		document.write('	<td width="50%" height="100" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="1"></td>');
		document.write('</tr>');
	}			
	
	document.write('<tr>');
	document.write('	<td width="50%" height="8" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	if (imagen2=="") { // solo hay una imagen
		document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_oscuro+'" colspan="5"><img src="/img/tb.gif" width="522" height="6"></td>');
	} else {
		document.write('	<td width="522" height="6" bgcolor="#'+bgcolor_oscuro+'" colspan="7"><img src="/img/tb.gif" width="522" height="6"></td>');
	}	
	document.write('	<td width="50%" height="8" background="'+background_oscuro+'" bgcolor="#'+bgcolor_oscuro+'"><img src="/img/tb.gif" width="1" height="8"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE TEXTOMASFOTO

//// INICIO - FLOTANTE DE DESCARGAS
function flotante_descarga(urlFotoGrande,img_cortesia,url_cortesia,url_descarga,title,banner) {
	var date=new Date();
	var seconds=date.getSeconds();
	var title = escape(title);
	if (banner=="si") 	altura=270;
	else				altura=207;
	var myWindow=window.open("/videojuegos/especiales/vj_flotante_descarga.php?Imagen="+urlFotoGrande+"&img_cortesia="+img_cortesia+"&url_cortesia="+url_cortesia+"&url_descarga="+url_descarga+"&title="+title+"&banner="+banner,seconds,"width=476,height="+altura+",menubar=no,locationbar=no,toolbar=no,status=no,scrollbars=no,scroll=no,resizable=yes");
}
//// FINAL - FLOTANTE DE DESCARGAS

//// INICIO - CAJA DE DESCARGAS
function descarga(imagen,imagen_cortesia,url_cortesia,url_descarga,title,banner) {
	titulo3('general','vj_descargas_tit.gif',114,'');
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('	<td width="50%" height="30" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('	<td width="522" height="30" bgcolor="#'+bgcolor_claro+'" bgcolor="#'+bgcolor_claro+'" valign="middle" align="center"><img src="/img/tb.gif" width="522" height="2"><br><a href="javascript:flotante_descarga(\''+imagen+'\',\''+imagen_cortesia+'\',\''+url_cortesia+'\',\''+url_descarga+'\',\''+title+'\',\''+banner+'\');" class="TD_DESCARGAS">Clica aquí para descargar la demo</a></td>');
	document.write('	<td width="50%" height="30" background="'+background_claro+'" bgcolor="#'+bgcolor_claro+'"><img src="/img/tb.gif" width="1" height="30"></td>');
	document.write('</tr>');
	document.write('</table>');
}
//// FINAL - CAJA DE DESCARGAS

