function byId(elmId){
	var elm = document.getElementById(elmId);
	if(elm==null) elm = document.getElementsByName(elmId)[0];
	return elm;
}

function setFocus(ctrl){
	try{
		byId(ctrl).focus();
	}catch(e){;};
}

function trim(string){
	return string.replace(/(^\s*)|(\s*$)/g,'');
}

function IsValid(s,min,num){
	if(s.value.length<min) return false;
	if (num && isNaN(s.value)) return false;
	return true;
}

function lda(who,what){
	div=byId(who);
	var s='';
	if(what==2){
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font-size:12px;background :  url(\'http://www.recherche-inverse.com/images/recherche-inverse-120x291.gif\')  no-repeat; height : 291px; width : 120px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #fff; left : 4px; position : relative; text-decoration : none; top : 61px;">Recherche inverse</a>\n';
		s+='<input type="text" size="10" name="num" id="num" style="font :  11px arial; border : #abadb3 solid 1px; left : 6px; position : relative; top : 113px;">\n';
		s+='<input type="submit" value="ok" style="font : 11px arial; left : 6px; position : relative; top : 113px;">\n';
		s+='</form>\n';
	}else if(what==3){
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font-size:12px;background :  url(\'http://www.recherche-inverse.com/images/recherche-inverse-300x146.gif\')  no-repeat; height : 146px; width : 300px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #fff; left : 7px; position : relative; text-decoration : none; top : 48px; display:block;">Recherche inverse</a>\n';
		s+='<input type="text" size="10" name="num" id="num" style="font :  11px arial; border : #abadb3 solid 1px; left : 20px; position : relative; top : 76px;">\n';
		s+='<input type="submit" value="ok" style="font : 11px arial; left : 20px; position : relative; top : 76px;">\n';
		s+='</form>\n';
	}else if(what==4){
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font-size:12px;background :  url(\'http://www.recherche-inverse.com/images/recherche-inverse-120x90.gif\')  no-repeat; height : 90px; width : 120px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #fff; left : 5px; position : relative; text-decoration : none; top : 75px;">Recherche inverse</a>\n';
		s+='<input type="text" size="10" name="num" id="num" style="font :  11px arial; border : #abadb3 solid 1px; left : 6px; position : relative; top : 35px;">\n';
		s+='<input type="submit" value="ok" style="font : 11px arial; left : 6px; position : relative; top : 35px;">\n';
		s+='</form>\n';
	}else if(what==5){
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font-size:12px;background :  url(\'http://www.recherche-inverse.com/images/recherche-inverse-120x51.gif\')  no-repeat; height : 51px; width : 120px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #fff; left : 5px; position : relative; text-decoration : none; top : 36px;">Recherche inverse</a>\n';
		s+='<input type="text" size="10" name="num" id="num" style="font :  11px arial; border : #abadb3 solid 1px; left : 6px; position : relative; top : 0px;">\n';
		s+='<input type="submit" value="ok" style="font : 11px arial; left : 6px; position : relative; top : 0px;">\n';
		s+='</form>\n';
	}else if(what==6){
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font : 12px arial; margin : 0px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #000; text-decoration : none;">Recherche inverse</a><br />\n';
		s+='<div>Entrez un num&#233;ro</div>\n';
		s+='<input type="text" size="10" maxlenght="10" name="num" style="border: #abadb3 solid 1px; font-size : 11px;">\n';
		s+='<input type="submit" value="ok" style="font-size : 11px;">\n';
		s+='</form>\n';
	}else{
		s+='<form action="http://www.recherche-inverse.com/annuaire-inverse.php" method="post" style="font-size:12px;background :  url(\'http://www.recherche-inverse.com/images/recherche-inverse-468x60.gif\')  no-repeat; height : 60px; width : 468px; text-align:left;">\n';
		s+='<a href="http://www.recherche-inverse.com" title="Annuaire inverse des mobiles et num&#233;ros fixes" style="font :  bold  12px arial; color : #fff; left : 3px; position : relative; text-decoration : none; top : 0px;">Recherche inverse</a>\n';
		s+='<input type="text" size="10" name="num" id="num" style="font :  11px arial; border : #abadb3 solid 1px; left : 104px; position : relative; top : 27px;">\n';
		s+='<input type="submit" value="ok" style="font : 11px arial; left : 104px; position : relative; top : 27px;">\n';
		s+='</form>\n';
	}
	div.innerHTML=s;
}