subject_id = ''; function handleHttpResponse() { if (http.readyState == 4) { if (subject_id != '') { document.getElementById(subject_id).innerHTML = http.responseText; } } } function getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } var http = getHTTPObject(); function gsp(file, div_id, content_id,where) { subject_id = div_id; File = file; Where = where; content = document.getElementById(content_id).value; http.open("GET", "ajax/" + escape(File) + ".php?file=" + escape(File) + "&where=" + escape(Where) + "&id=" + escape(content) + "", true); http.onreadystatechange = handleHttpResponse; http.send(null); } function NewChangeEl(cible, El) { eval("self.opener.document.getElementById(cible).value = ' + El + '"); eval("self.opener.document.getElementById(cible).value = '" + El + "'"); self.close(); } function check_an_email(field_name, message) { var email = document.getElementById(field_name); var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (!filter.test(email.value)) { alert(message); email.focus; return false; } return true; } function mylittlepop(msg) { var content ="
" + msg + "
"; document.getElementById('littlepop').innerHTML = content; wind.visibility = "visible"; } function get_mouse(e) { var x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft; var y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop; wind.left = x - 60; wind.top = y+10; } function mylittlepopdead() { wind.visibility = "hidden"; } /* function openclose(id) { if(document.getElementById('open_'+id).value=='1') { document.getElementById('open_'+id).value='0'; document.getElementById('ouvrir_'+id).style.display='none'; document.getElementById('fermer_'+id).style.display='block'; } else { document.getElementById('open_'+id).value='1'; document.getElementById('ouvrir_'+id).style.display='block'; document.getElementById('fermer_'+id).style.display='none'; } } */ //Fonction d'afficher/cacher menu langue dans header function montre(id) { var d = document.getElementById(id); if (d.style.display == 'none') {d.style.display='block'; visibilite('lieninfo'); } else {d.style.display='none'; visibilite('lieninfo');} } function visibilite(thingId) { var d = document.getElementById(thingId); if (d.style.visibility == 'hidden') {d.style.visibility='visible';} else {d.style.visibility='hidden';} } RatingStar = function(obj) { this.obj = obj; var subs = new Array(); this.subs = subs; this.subs.push(this.obj); this.appendsub = function(sub){ subs.push(sub); } } RatingStar.prototype.bindfunction = function(target, clear) { target.obj.onmouseover = function() { for(var i = 0; i < target.subs.length; i++) { target.subs[i].className = "rating_on"; } } target.obj.onmouseout = function() { for(var i = 0; i < target.subs.length; i++) { target.subs[i].className = "rating_off"; } } target.obj.onmousedown = function() { if(PostRatingToBackEnd()) { for(var i=0; i= 0; j--) { star.appendsub(this.stars[j]); } star.bindfunction(star, this.stars); } } function PostRatingToBackEnd() { //TODO return true; } if (/msie/i.test (navigator.userAgent)) { document.nativeGetElementById = document.getElementById; document.getElementById = function(id) { // Get element using native method var elem = document.nativeGetElementById(id); if (elem) { // If id match, return element if (elem.attributes['id'].value == id) { return elem; } // Otherwise look for the right one else { for (var i = 1; i < document.all[id].length; i++) { if (document.all[id][i].attributes['id'].value == id) { return document.all[id][i]; } } } } return null; } }