function editarP()	{
	xajax.$('submitButton').disabled=true;
	xajax_editarperfil(xajax.getFormValues('formperfil'));
	return false;
}


function ContactoSubmit()	{
	xajax.$('submitButton').disabled=true;
	/*xajax.$('submitButton').value="Por Favor espere...";*/
	xajax_Contacto(xajax.getFormValues('contactoForm'));
	return false;
}

function RegistroSubmit()	{
	xajax.$('submitButton').disabled=true;
	xajax.$('submitButton').value="Por Favor espere...";
	xajax_registro(xajax.getFormValues('registroForm'));
	return false;
}



function Abrepop (url, ancho, alto) { 
	window.open(url,'ventana1','width='+ancho+', height='+alto+', scrollbars=no, menubar=no, location=no, resizable=no');
}

function esconde(id){
	document.getElementById(id).style.display='none';
}

function MuestraExpande(aid) { 
	current=(document.getElementById(aid).style.display == 'none') ? 'block' : 'none'; 
	document.getElementById(aid).style.display = current; 
}


function addBookmark() {
	var BookmarkURL="http://www.protojuegos.com/"
    var BookmarkTitle="PROTOjuegos.com - Juega sin limites"
    // If the browser is Internet Explorer
    if (document.all){
		// Add to Favorites (Internet Explorer)
        window.external.AddFavorite(BookmarkURL,BookmarkTitle)
    }
    else
    {
        // Add to Bookmarks (Mozilla Firefox)
        window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
    }
}

function vacio(cadena)  
   {                                    // DECLARACION DE CONSTANTES  
     var blanco = " \n\t" + String.fromCharCode(13); // blancos  
                                        // DECLARACION DE VARIABLES  
     var i;                             //en cadena  
     var es_vacio;                      // cadena es vacio o no  
     for(i = 0, es_vacio = true; (i < cadena.length) && es_vacio; i++) // INICIO  
       es_vacio = blanco.indexOf(cadena.charAt(i)) != - 1;  
     return(es_vacio);  
   }  
   
function ValidaCamposBuskeda(form) {  
   	var todo_bien = true;
	 if(vacio(form.key.value) || form.key.value.length <= 3 )  {
       alert("La descripcion debe contener mas de 3 caracteres."); 
	   todo_bien = false;
    }
	 if(todo_bien == true) {
     	return(true);  
	 } else {
		 return(false);
	 }
} 

				function clickclear(thisfield, defaulttext) {
				if (thisfield.value == defaulttext) {
				thisfield.value = "";
				}
				}
				 function clickrecall(thisfield, defaulttext) {
				if (thisfield.value == "") {
				thisfield.value = defaulttext;
				}
				}
				

function Abrir_Ventana(el_url) {
	var especificaciones="top=0, left=0, toolbar=no,location=no, status=no,menubar=no,scrollbars=no, resizable=no, width=850,height=400"
	var titulo="Afiliados de ProtoJuegos.com"
	window.open(el_url,titulo,especificaciones);
}