<!--

banners_sup = true;

if (screen.width>800) hires = true;

function anadirMisJuegos(juego){
	window.open('/misjuegos/add_juego.php?juego='+juego, '', 'width=300,height=350,scrollbars=no,resizable=no,status=no,location=no');
}

function menu() {

	var urlplus="/";
	var url = document.location.href;
	
	var dominio=document.domain;
	var eldominio='';
	if (dominio.search(".nid")>-1)
  	{
  		eldominio='canalgame.nid';
  	}
  	else
  	{
  		eldominio='canalgame.com';
  	}
	if (dominio.search("inicia.")>-1)
	{
		eldominio='inicia.'+eldominio;
	}
	
	pathname = document.location.pathname.substr(1);
	var plata = pathname.substring(0, pathname.indexOf("/"));


	if 	(url.indexOf("/pc")>=0			&& url.indexOf("/pc")<30)		{ tipoclase = "menucpc"; }
	else if (url.indexOf("/xbox")>=0 		&& url.indexOf("/xbox")<30)		{ tipoclase = "menucxb"; }
	else if (url.indexOf("/gamecube")>=0 		&& url.indexOf("/gamecube")<30) 	{ tipoclase = "menucgc"; }
	else if (url.indexOf("/playstation2")>=0 	&& url.indexOf("/playstation2")<30) 	{ tipoclase = "menucps"; }
	else if (url.indexOf("/gameboy")>=0 		&& url.indexOf("/gameboy")<30) 		{ tipoclase = "menucgb"; }
	else if (url.indexOf("/ngage")>=0 		&& url.indexOf("/ngage")<30) 		{ tipoclase = "menucng"; }
	else if (url.indexOf("/psp")>=0 		&& url.indexOf("/psp")<30) 		{ tipoclase = "menucpsp"; }
	else if (url.indexOf("/nds")>=0 		&& url.indexOf("/nds")<30) 		{ tipoclase = "menucnd"; }
	else if (url.indexOf("/movil")>=0 		&& url.indexOf("/movil")<30) 		{ tipoclase = "menucmo"; }
	//nuevas
	else if (url.indexOf("/ps3")>=0 		&& url.indexOf("/ps3")<30) 		{ tipoclase = "menucps3"; }
	else if (url.indexOf("/xbox360")>=0 		&& url.indexOf("/xbox360")<30) 		{ tipoclase = "menucxbox360"; }
	else if (url.indexOf("/wii")>=0 		&& url.indexOf("/wii")<30) 		{ tipoclase = "menucwii"; }
	//fin nuevas
	else if (url.indexOf("/noticias")>=0) 		{ tipoclase = "menuc"; }
	else if (url.indexOf("/arcades")>=0) 		{ tipoclase = "menuc"; }
	else 						{ tipoclase = "menuc"; }
	

	if (tipoclase!="menu") {
		tmpu = document.location.pathname;
		tmpu2 = document.location.pathname.substring(1);
		tmp = document.location.pathname.length - 1;

		if ( (document.location.pathname.indexOf("/")!=document.location.pathname.lastIndexOf("/")) && plata!="" ) {
			var urlplus= "/" + plata + "/";
		} else  if (document.location.pathname.charAt(tmp) != "/") {
			var urlplus=document.location.pathname+"/";
		} else if (!document.location.pathname) {
			var urlplus="";	
		}
		
	}
	
	if (urlplus.indexOf("/cg")>=0) urlplus="/";
	if (urlplus.indexOf("/noticias")>=0) urlplus="/";
	if (urlplus.indexOf("/buscador")>=0) urlplus="/";
	if (urlplus.indexOf("/usuarios")>=0) urlplus="/";
	if (urlplus.indexOf("/misjuegos")>=0) urlplus="/";
	
	if (urlplus.indexOf("index.php")>=0) urlplus="/";
	if (urlplus.indexOf("home.php")>=0) urlplus="/";
	if (urlplus.indexOf("/descargas")>=0) urlplus="/";
	if (urlplus.indexOf("/arcades")>=0) urlplus="/";
	if (urlplus.indexOf("/aventuras")>=0) urlplus="/";
	if (urlplus.indexOf("/deportes")>=0) urlplus="/";
	if (urlplus.indexOf("/accion")>=0) urlplus="/";
	if (urlplus.indexOf("/estrategia")>=0) urlplus="/";
	if (urlplus.indexOf("/inteligencia")>=0) urlplus="/";
	if (urlplus.indexOf("/lucha")>=0) urlplus="/";
	if (urlplus.indexOf("/rol")>=0) urlplus="/";
	if (urlplus.indexOf("/simulacion")>=0) urlplus="/";
	if (urlplus.indexOf("/plataformas")>=0) urlplus="/";
	if (urlplus.indexOf("/conduccion")>=0) urlplus="/";
	if (urlplus.indexOf("/chat")>=0) urlplus="/";
	
	//especiales, glosario y paginas amigas
	if (urlplus.indexOf("/especiales")>=0) urlplus="/";
	if (urlplus.indexOf("/glosario")>=0) urlplus="/";
	if (urlplus.indexOf("/paginas_amigas")>=0) urlplus="/";
	
	if (document.cookie.indexOf("canalgame_usuario")==-1) {
		auth ="Registrate";
	} else {
		auth ="Zona privada";
	}


	var cf;
	if (url.indexOf("/pc")>=0) 		cf="#edd8a1";
	if (url.indexOf("/xbox")>=0)		cf="#c5ecca";
	if (url.indexOf("/playstation2")>=0) 	cf="#c5d0eb";
	if (url.indexOf("/gamecube")>=0) 	cf="#edbcec";
	if (url.indexOf("/gameboy")>=0) 	cf="#c6d8d7";
	if (url.indexOf("/ngage")>=0) 		cf="#c4c4c4";
	if (url.indexOf("/psp")>=0) 		cf="#afaecd";
	if (url.indexOf("/nds")>=0) 		cf="#f1ba88";
	if (url.indexOf("/movil")>=0) 		cf="#e19ace";
	// nuevo
	if (url.indexOf("/ps3")>=0)		cf="#c5d0eb";
	if (url.indexOf("/xbox360")>=0)		cf="#c5ecca";
	if (url.indexOf("/wii")>=0)		cf="#edbcec";
	// fin nuevo
	
	if (!cf) cf = "#e2b9b9";

	menu = Array (
	'1', cf, '', 'ZONA DE USUARIO',
	'0', cf, '/usuarios/', '<img border=0 src="/img/mfl.gif">&nbsp;&nbsp;<b>'+auth+'</b>',
	'0', cf, '/foros/', 'Foros de debate',
	'0', cf, '/misjuegos/', '<font color=#B82424><b>Mis Juegos</b></font>',
	'0', cf, '/correo/', 'CanalG@me mail',
	'0', cf, '/chat/', 'CanalGame Chat',
	'0', cf, 'http://www.centraldelvideojuego.com/Home.aspx?af=01CANAL', 'Tienda',
	'1', cf, '', 'BUSCAR UN JUEGO',
	'0', cf, '/buscador', 'Buscador',
	'0', cf, '/buscador/avanzado', 'Buscador avanzado',
	'0', cf, '/buscador/los_mas_populares', 'Los más populares',
	'0', cf, '/buscador/los_mas_valorados', 'Los más valorados',
	'0', cf, '/buscador/top100', 'Top 100 búsquedas',
	'0', cf, '/buscador/proximamente', 'Próximamente',
	'0', cf, '/buscador/memorables', 'Memorables',
	'0', cf, 'http://www.tiendaociofuturo.com/b2c/', 'Comprar juegos',
	'1', cf, '', 'NOVEDADES',
	'0', cf, urlplus + 'noticias', 'Noticias',
	'0', cf, urlplus + 'noticias', 'Artículos',
	'0', cf, '/noticias/titulares', 'Prensa',
	'0', cf, '/descargas', '<b>Últimas descargas</b>',
	'0', cf, '/buscador/los_ultimos_juegos', 'Los últimos juegos',
	'0', cf, '/buscador/las_ultimas_reviews', '<b>Reviews</b>',
	'0', cf, '/buscador/las_ultimas_previews', 'Previews',
	'0', cf, '/buscador/las_ultimas_guias_y_trucos', 'Guías / Trucos',
	'0', cf, '/glosario/', 'Glosario',
	'1', cf, '', 'BUSCA POR GENERO',
	'0', cf, urlplus + 'arcades',	'Arcades',
	'0', cf, urlplus + 'aventuras', 	'Aventuras',
	'0', cf, urlplus + 'deportes', 	'Deportes',
	'0', cf, urlplus + 'accion',	 'Acción',
	'0', cf, urlplus + 'estrategia', 	'Estrategia',
	'0', cf, urlplus + 'inteligencia', 	'Inteligencia',
	'0', cf, urlplus + 'lucha', 	'Lucha',
	'0', cf, urlplus + 'rol', 		'Rol',
	'0', cf, urlplus + 'simulacion', 	'Simulación',
	'0', cf, urlplus + 'plataformas', 	'Plataformas',
	'0', cf, urlplus + 'conduccion', 	'Conducción',	
	'1', cf, '', 'POR PLATAFORMA',
	'0', '#edd8a1', '/pc', 			'<span class="tpc">PC</span>',
	'0', '#c5d0eb', '/playstation2', 	'<span class="tplaystation2">PlayStation 2</span>',
	// nuevo
	'0', '#c5d0eb', '/ps3', 		'<span class="tplaystation2">PlayStation 3</span>',
	// fin nuevo
	'0', '#c5ecca', '/xbox', 		'<span class="txbox">Xbox</span>',
	// nuevo
	'0', '#c5ecca', '/xbox360', 		'<span class="txbox">Xbox 360</span>',
	// fin nuevo
	'0', '#edbcec', '/gamecube', 		'<span class="tgamecube">GameCube</span>',
	// nuevo
	'0', '#edbcec', '/wii', 		'<span class="tgamecube">Nintendo WII</span>',
	// fin nuevo
	'0', '#c6d8d7', '/gameboy', 		'<span class="tgameboy">Gameboy Advance</span>',
	'0', '#c4c4c4', '/ngage', 		'<span class="tngage">N-Gage</span>',
	'0', '#afaecd', '/psp', 		'<span class="tpsp">PS Portátil</span>',
	'0', '#f1ba88', '/nds', 		'<span class="tnds">Nintendo DS</span>',
	'0', '#e19ace', '/movil', 		'<span class="tmovil">Móviles</span>',
	'1', cf, '', 'OPCIONES',
	'0', cf, '/usuarios/envia.php', 'Enviar <b>esta</b> página',
	//'0', cf, 'javascript:GFavoritos();', 'Guardar en favoritos',
	'0', cf, '/cg/ayuda.php', 'Ayuda general',
	'0', cf, 'http://' + eldominio + '/flash.php', 'Flash intro',
	'0', cf, 'http://www.centraldelvideojuego.com/Home.aspx?af=01CANAL', 'Tienda canalgame'
	);


	for (i=0; i<menu.length; i+=4) {
		if (menu[i]=='0') {
       			document.write ('<tr><td bgcolor="#DCDCDC" onClick="document.location.href=\''+menu[i+2]+'\'" class="menu" onMouseOver="mh(1,this,');
       			document.write ("'" + menu[i+1] + "'");
       			document.write (')" onMouseOut="mh(0,this,');
       			document.write ("'" + menu[i+1] + "'");
       			document.write (')"><a href="'+menu[i+2]+'"><span class="menua">'+menu[i+3]+'</span></a></td></tr>');
		} else {
			document.write ('<tr><td class='+tipoclase+'>'+menu[i+3]+'</td></tr>');
		}
	}
	//document.write('<tr><td>'+document.location.href+'</td></tr>');
	/*
	document.write ('<!-- ciao -->'+
	'<tr>'+
	'	<td bgcolor=#EAEAEA align=center class="ciao_td"><br>'+
			'<div ALIGN=JUSTIFY; style="border-color:000000; border-width:1px; border-style:solid; padding-top:2px; padding-bottom:1px; padding-left:1px; padding-right:1px; width:112px; text-align:center; font-family:arial; font-size:11px; text-decoration:none; color:000000;"   >'+
	'			<a href="http://www.ciao.es/"><img src="/img/ciao_RGB.gif" border="0" alt="Comparación de precios"></a><br>'+
	'			Lee opiniones, compara precios y encuentra tu <a href="http://www.ciao.es/Consolas_274255_2">Consola</a> y <a href="http://www.ciao.es/Videojuegos_7924_1">Videojuegos</a>. Elige entre '+
	'			<a href="http://www.ciao.es/Sony_PlayStation_2_PS2_consolas__140428">Playstation 2</a>, '+ 
	'			<a href="http://www.ciao.es/Sony_PlayStation_3_PS3__505313">Playstation 3</a>, '+
	' 			<a href="http://www.ciao.es/Nintendo_Wii__702521">Wii</a>, '+ 
	' 			<a href="http://www.ciao.es/Microsoft_Xbox_360_consolas__505089">XBOX 360</a> y '+
	' 			<a href="http://www.ciao.es/Sony_PSP_PlayStation_Portatil_consolas__406530">PSP</a>. '+
	'			Encuentra además tu <a href="http://www.ciao.es/Ordenadores_personales_273526_2">PC</a> y '+ 
	'			<a href="http://www.ciao.es/Telefonos_moviles_273440_2">Móviles</a>.'+
	'		</div>'+
	'	</td>'+
	'</tr>'+
	'<!-- fin ciao -->');
	*/
}

function mh(modo,f,cc) {
	//var colorObj=f.style.backgroundColor;
	var colorObj=f.style.background;
	/*
	if (colorObj!=cc && colorObj.indexOf('rgb(')<0) {
		f.style.backgroundColor=cc;
	} else {
		
		f.style.backgroundColor='#dcdcdc';
	}
	*/
	if (modo==1) {
		f.style.background=cc;
	} else {
		
		f.style.background='#dcdcdc';
	}
}

function tableOver(o,c) {
	o.style.backgroundColor=c;
	o.style.cursor='hand';
}

function tableOut(o,c) {
	o.style.backgroundColor=c;
	o.style.cursor='hand';
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function habilitarCampoQuien(seleccion){
	if (seleccion > 6) {
		document.alta.estado_quien.disabled = false;
	} else {
		document.alta.estado_quien.bgcolor = "#cdcdcd";
		document.alta.estado_quien.disabled = true;
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function GFavoritos (este) {

	if (window.external) {
		external.AddFavorite(location.href, document.title)
	} else {
		alert("Tu navegador no es compatible para guardar automáticamente un enlace.\n\nPero puedes hacerlo manualmente.");
	}
}

function OpenSS(srcHref,title) {
	popupss=window.open(srcHref,title,'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,height=400,width=400,resizable=no');
	popupss.focus();
}

function winBRopen(theURL, Name, popW, popH, scroll) {
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
	}


/* tiscali roba páginas */
var pageid2006=Math.floor(Math.random() * 19031982);
function makeAD2006(sito, tags, dimw, dimh)
{
	var now = new Date();
	var magic=now.getTime();
	document.write('<sc'+'ript language="JavaScript1.2" src="' + sito + '/jserver' + tags + '/ACC_RANDOM='+ magic + '/PAGEID=' + pageid2006 + '"> </sc'+'ript>');
}
/* fin tiscali roba páginas*/


//function oncem () {
//	winBRopen('http://sync.es/11m.html','11m','600','500','no');
//}

//-->

