function preloadmi(){ document.getElementById('preload').style.display='block'; } function contget_noeffect(monurl){ new Ajax.Request(monurl, { method:'get', evalScripts: true, onSuccess: function(transport){ var response = transport.responseText || "no response text"; try{ new Ajax.Autocompleter ('comm_filiere', 'filiereup', 'http://kelekole.com/autofilieres.html', { method:'post', paramName: 'comm_filiere', afterUpdateElement: ac_return }); }catch (ex) {} try{ maj_link(); }catch (ex) {} try{ new Ajax.Autocompleter ('region', 'regionup', 'http://kelekole.com/autoregion.html', { method: 'post', paramName: 'region', afterUpdateElement: ac_return }); }catch (ex) {} try{ new Ajax.Autocompleter ('ecole_ville', 'ecole_villeup', 'http://kelekole.com/autovilles.html', { method: 'post', paramName: 'ecole_ville', afterUpdateElement: ac_return }); new Ajax.Autocompleter ('ecole_cp', 'ecole_cpup', 'http://kelekole.com/autocp.html', { method: 'post', paramName: 'ecole_cp', afterUpdateElement: ac_return }); }catch (ex) {} }, onFailure: function(){ alert('Something went wrong...') } }); } function allget(monurl){ filter(); document.getElementById('preload').style.display='block'; new Ajax.Request(monurl, { method:'get', evalScripts: true, onSuccess: function(transport){ var response = transport.responseText || "no response text"; document.getElementById('preload').style.display='none'; document.getElementById('conteneur').innerHTML=response; unfilter(); }, onFailure: function(){ alert('Something went wrong...') } }); } function contget(monurl){ document.getElementById('preload').style.display='block'; new Ajax.Request( monurl, { method:'get', evalScripts: true, onComplete: function(transport){ var response = transport.responseText || "no response text"; try{ var pozition = response.search(''); var pozition_end = response.search(''); newhtml=response.substring(pozition, pozition_end); document.getElementById('contenu').innerHTML = newhtml; } catch(ex){alert(ex);} try{ new Ajax.Autocompleter ('searchin', 'searchin_update', 'http://kelekole.com/searchin.html', { method: 'post', paramName: 'searchin', afterUpdateElement: ac_return }); }catch(ex){} try{ new Ajax.Autocompleter ('comm_filiere', 'filiereup', 'http://kelekole.com/autofilieres.html', { method:'post', paramName: 'comm_filiere', afterUpdateElement: ac_return }); }catch (ex) {} try{ maj_link(); }catch (ex) {} try{ new Ajax.Autocompleter ('region', 'regionup', 'http://kelekole.com/autoregion.html', { method: 'post', paramName: 'region', afterUpdateElement: ac_return }); }catch (ex) {} try{ new Ajax.Autocompleter ('ecole_ville', 'ecole_villeup', 'http://kelekole.com/autovilles.html', { method: 'post', paramName: 'ecole_ville', afterUpdateElement: ac_return }); new Ajax.Autocompleter ('ecole_cp', 'ecole_cpup', 'http://kelekole.com/autocp.html', { method: 'post', paramName: 'ecole_cp', afterUpdateElement: ac_return }); }catch (ex) {} } }); setTimeout("document.getElementById('preload').style.display='none'", 500); try{ FB.init("964d27b28a9f278c59a1fa2c7983fccc", "http://kelekole.com/xd_receiver.htm"); } catch(ex){alert(ex);} maj_link(); } function unfilter(){ document.getElementById('preload').style.display='none'; } function change_onclick(element){ var sav = element.href; if(sav.replace('promobe', '') == sav && sav.replace('norefresh', '') == sav && sav.replace('javascript', '') == sav && sav.replace('png', '') == sav && sav.replace('#', '') == sav){ element.href="#"; var bonus_link=''; try{ element.onclick="javascript:contget('" + sav + "');" + bonus_link; }catch (ex) {} try{ element.setAttribute("onclick","contget('" + sav + "');") + bonus_link; }catch (ex) {} } } function maj_link(){ return ; var i=null; for (var i=0;i < document.links.length;i++) { var sav = document.links[i].href; var element = document.links[i]; change_onclick(document.links[i]); } for (var i=0;i < document.forms.length;i++) { var form_id = document.forms[i].id; if(!form_id || form_id == "" || form_id == NaN || form_id == null){ form_id = 'genform' + i; try{document.forms[i].setAttribute('id', form_id );}catch(ex){} try{document.forms[i].id= form_id ;}catch(ex){} } var action_actuelle = document.forms[i].getAttribute("onsubmit"); if(!action_actuelle || action_actuelle == "" || action_actuelle == NaN || action_actuelle == null){ document.forms[i].setAttribute('onsubmit','Action(\'' + form_id + '\'); return false;'); } } } function mail(){ document.getElementById('filter').style.display="block"; } function Action(form) { preloadmi(); new Ajax.Request(document.getElementById(form).action, { method: 'post', parameters: Form.serialize(form), evalScripts: true, asynchronous:false, onSuccess: function(transport){ var response = transport.responseText || "no response text"; var pozition = response.search(''); var pozition_end = response.search(''); newhtml=response.substring(pozition, pozition_end); document.getElementById('contenu').innerHTML = newhtml; }, onFailure: function(){ alert('Something went wrong...') } });maj_link(); document.getElementById('preload').style.display='none'; } function limite(zone,max) { document.getElementById('nbrestant').innerHTML= (max - zone.value.length) ; if(zone.value.length>=max){zone.value=zone.value.substring(0,max);} } function getval(unid){ var m =''; try{var m=document.getElementById(unid).value;}catch(ex){} if(m == '')m=' '; return m; } function formvote(){ addavis(getval('year'),getval('avistxt'),getval('comm_filiere'),getval('vote')); new Ajax.Request(document.getElementById('formvote').action, { method: 'post', parameters: Form.serialize('formvote'), asynchronous:false, onSuccess: function(transport){ var response = transport.responseText || "no response text"; }, onFailure: function(){ alert('Something went wrong...'); } } ); document.getElementById('formvote').innerHTML='Merci d\'avoir commenté cette école.'; try{document.getElementById('formvote').className='info';}catch(ex){} //try{document.getElementById('formvote').class='info';}catch(ex){} try{document.getElementById('mii').className='';}catch(ex){} //try{document.getElementById('mii').class='';}catch(ex){} try{document.getElementById('formvote').setAttribute('class','info');}catch(ex){} try{document.getElementById('mii').setAttribute('class','');}catch(ex){} maj_link(); } function addavis(year, commentaire, filiere, vote){ var curenthtml = document.getElementById('listecomm').innerHTML; if(filiere.replace(' ', '') != filiere)filiere = 'en '+filiere+' '; else filiere = ''; newval='
'; newval += ''; update_content('listecomm', newval + curenthtml); setTimeout("Effect.Appear('nvcomm')", 517); } function update_content(unid, unevalue){ document.getElementById(unid).innerHTML=unevalue; } function show_voting_form(){ var newval=''; newval+='Votre avis :