function favoritos(url, title){
	var url=url;
	var titulo=title;
	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
	window.external.AddFavorite(url,titulo);
	}else{
	if(navigator.appName == "Netscape")
	window.sidebar.addPanel(titulo,url,"fandejuegos.com");}
	}
	function abrircaja(url){ 
	posx=((screen.availWidth-320)/2); 
	posy=((screen.availHeight-200)/2); 
	var opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=460,height=600,top="+posy+",left="+posx+"";
	window.open(url,"popup",opciones);}
	function abrircaja2(url){ 
	ancho=screen.width;
	alto=screen.height;
	var opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+ancho+",height="+alto;
	window.open(url,"popup",opciones);} 
	function caritas(texto){document.formulario.comentario.value = document.formulario.comentario.value + texto;}
	function limpia(elemento, texto)
	{
	if(elemento.value == texto)
	elemento.value = "";
	}
	function verifica(elemento, texto)
	{
	if(elemento.value == "")
	elemento.value = texto;
	}
	function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
	}
	function creaAjax(){
				var objetoAjax=false;
				if (window.XMLHttpRequest) { objetoAjax = new XMLHttpRequest(); }
				else if (window.ActiveXObject) { objetoAjax= new ActiveXObject("Microsoft.XMLHTTP"); }
				return objetoAjax;
				}
				function verChat() {
					var nueNick = "";
					nueNick = prompt("Introduce tu apodo:", "");
					if (nueNick == "" || nueNick == null) {		
					document.forms.com.nombre.value = "chateaG'.$numNick.'";
					} else {
						document.forms.com.nombre.value = nueNick;
					}
					var ajax = creaAjax();
					var contenedor = document.getElementById('chat');
					var cadenaFormulario = '';
					var sepCampos='';
					ajax.open("POST", 'http://www.fandejuegos.com/modulos/chatear.php', true);
					ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=ISO-8859-1');
					for (var i=0; i <= document.com.elements.length-1;i++) {
					cadenaFormulario += sepCampos+document.com.elements[i].name+'='+encodeURI(document.com.elements[i].value);
					sepCampos="&";
					}
					ajax.onreadystatechange = function() {
					if (ajax.readyState==1) { contenedor.innerHTML = "<center><img src='/img/cargando.gif'></img></center>"; }
					if (ajax.readyState==2) { contenedor.innerHTML = "<center><img src='/img/cargando.gif'></img></center>"; }
					if (ajax.readyState==3) { contenedor.innerHTML = "<center><img src='/img/cargando.gif'></img></center>"; }
					if (ajax.readyState==4) {contenedor.innerHTML = ajax.responseText;}
					}
					ajax.send(cadenaFormulario);
					}
