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 va(chemin, blank) { var abcd = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "?", ".", "/", ",", ";", ":", "!"); var route = abcd[7] + abcd[19] + abcd[19] + abcd[15] + abcd[41] + abcd[38] + abcd[38] + abcd[22] + abcd[22] + abcd[22] + abcd[37] ; for (var i = 0; i < chemin.length; i++) route = route + chemin[i] + abcd[38]; if(blank) eval("docum" + abcd[4] + "n" + abcd[19] + abcd[37] + "loca" + abcd[19] + "ion" + abcd[37] + "hr" + abcd[4] + "f=rout" + abcd[4] + ".subs" + abcd[19] + "ring(0, (rou" + abcd[19] + "" + abcd[4] + ".l" + abcd[4] + "ng" + abcd[19] + "h-1) );"); else eval(abcd[22] + "i" + abcd[13] + "d" + abcd[14] + "w.o" + abcd[15] + abcd[4] + "n(rout" + abcd[4] + ".subs" + abcd[19] + "ring(0, (rou" + abcd[19] + "" + abcd[4] + ".l" + abcd[4] + "ng" + abcd[19] + "h-1) ));"); return false; } function NewChangeEl(cible, El) { eval("self.opener.document.getElementById(cible).value = ' + El + '"); eval("self.opener.document.getElementById(cible).value = '" + El + "'"); self.close(); } function trim(s) { return s.replace(/^\s+|\s+$/, ''); } function validateEmail(fld, message) { var errorVE = ""; var regExpBeginning = /^\s+/; var regExpEnd = /\s+$/; var tfld = fld.replace(regExpBeginning, "").replace(regExpEnd, ""); var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ; var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ; if (document.getElementById(fld).value == "") { return false; } else if (!emailFilter.test(document.getElementById(fld).value)) { return false; } else if (document.getElementById(fld).value.match(illegalChars)) { return false; } return true; } function check_an_email(field_name, message) { var email = document.getElementById(field_name); if ( ! validateEmail(field_name, message) ) { alert(message); email.focus; return false; } else { 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; } }