document.theform.pseudo.onfocus=function(){xfocus(this);if(document.theform.pseudo.value=='pseudo ou email')document.theform.pseudo.value=''};
document.theform.pseudo.onblur=function(){xblur(this);if(document.theform.pseudo.value=='')document.theform.pseudo.value='pseudo ou email'};
document.theform.pass.onfocus=function(){xfocus(this);};
document.theform.pass.onblur=function(){xblur(this);};

function control_leform(){
	if(document.theform.sw!=null)document.theform.sw.value = screen.width;
	if(document.theform.sh!=null)document.theform.sh.value = screen.height;

	var msg_err='';
	var vpass = document.theform.pass.value.toLowerCase();
	var vpseudo = document.theform.pseudo.value.toLowerCase();

	if (vpass == ''){
  	msg_err = '- Le champ "mot de passe" est vide.';
  	document.theform.pass.focus();
	}
	if (vpseudo == '' || vpseudo == 'votre pseudo' || vpseudo == 'pseudo ou email' ){
  	msg_err = '- Le champ "pseudo" est vide.\n'+msg_err;
  	document.theform.pseudo.focus();
	}
  if (msg_err!=''){
    alert('ERREUR!\n\n'+msg_err);
    return false;
  }
  if(document.getElementById('loading')!=null)document.getElementById('loading').style.visibility='visible';
  return true;
}

function xblur(k) {
  k.style.backgroundColor='';
}

function xfocus(k){
  if(skin==3)
    k.style.backgroundColor='#FFB9D3';
  else if(skin==2)
    k.style.backgroundColor='#B9E6FF';
  else
    k.style.backgroundColor='#FFE3B9';
}
