//Contient les foctions globales pour tous les fichiers //fonction pour ouvrir les pages des sponsors avec les mêmes prop. function sponsorwindow(url){ window.open (url,'','height=600,width=800,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes'); } //fonction pour séléctionner toutes les checkboxes function checkAll(field){ for (i = 0; i < field.length; i++) field[i].checked = true ; } //fonction pour supprimer le contenu d'une boîte d'édition function focus_delete(textbox,text){ if (textbox.value == "") textbox.value="" } //fonction pour changer valeur radiobutton function rbToggle(id){ var el1 = document.getElementById('rbNet'); var el2 = document.getElementById('rbSite'); if(id=='rbNet'){ if(el1.value=='t'){ el2.checked=false; el2.value='t'; el1.value='f'; } } if(id=='rbSite'){ if(el2.value=='t'){ el1.checked=false; el1.value='t'; el2.value='f'; } } } //fonction de recherche site-net function searchSite(form){ var monsite="hbmersch.com" var el1 = document.getElementById('rbSite'); var el2 = document.getElementById('rbNet'); if (el1.value=='f') window.open( "http://www.google.com/search?hl=fr&ie=UTF-8&oe=UTF-8&q="+form.q.value +"+site%3A"+monsite+"&btnG=Recherche+Google&lr=","","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); else window.open('http://www.google.com/search?q='+form.q.value+'&btnG=Recherche+Google&hl=fr&lr=lang_fr','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes'); } //fonction myMouseOver function myMouseOver(imgName,repImg){ document.images[imgName].src=repImg; } function myMouseOut(imgName,repImg){ document.images[imgName].src=repImg; } //fonction pour ouvrir la page event en agrendi. function eventwindow(url){ window.open (url,'','height=470,width=385,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); } //function for management of news function ckTable(id){ var el1 = document.getElementById('tblNormal'); var el2 = document.getElementById('tblArticle'); if ((id=='tblNormal')&&(el1.style.display == 'none')){ el1.style.display = 'block'; }else{ el1.style.display = 'none'; } if ((id=='tblArticle')&&(el2.style.display == 'none')){ el2.style.display = 'block'; }else{ el2.style.display = 'none'; } } function rbToggleWithTable(id){ var el1 = document.getElementById('rbNormal'); var el2 = document.getElementById('rbInterview'); if(id=='rbNormal'){ if(el1.value=='t'){ ckTable('tblArticle'); ckTable('tblNormal'); el2.checked=false; el2.value='t'; el1.value='f'; } } if(id=='rbInterview'){ if(el2.value=='t'){ ckTable('tblNormal'); ckTable('tblArticle'); el1.checked=false; el1.value='t'; el2.value='f'; } } } //function addRowToTable function addRowToTable(id){ var tbl = document.getElementById('tblArticle'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow; var row = tbl.insertRow(lastRow); // left cell var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.appendChild(textNode); // right cell var cellRight = row.insertCell(1); var el = document.createElement('input'); el.type = 'text'; el.name = 'txtRow' + iteration; el.id = 'txtRow' + iteration; el.size = 40; el.onkeypress = keyPressTest; cellRight.appendChild(el); // select cell var cellRightSel = row.insertCell(2); var sel = document.createElement('select'); sel.name = 'selRow' + iteration; sel.options[0] = new Option('text zero', 'value0'); sel.options[1] = new Option('text one', 'value1'); cellRightSel.appendChild(sel);'' }