function Checkall(form, checked){ for (var i = 1; i < form.elements.length; i++){ if(form.elements[i].type=='checkbox') { form.elements[i].checked = checked; } } } function verif() { if(document.getElementById('ActionMaker').value=='0') {alert("Vous devez choisir une action !!"); return false;} else { if(confirm("Etes vous surs de vouloir supprimer cette ou ces entrées ?")) {return true;} else return false; } } function removeF(link) { var pos1= link.indexOf("f="); var debut=link.substring(0,pos1); var pos2=link.indexOf("&"); var fin=link.substring(pos2); var rlink=debut+fin; return rlink; } function show(obj) { document.getElementById(obj).style.display= 'block'; } function hide(obj) { document.getElementById(obj).style.display= 'none'; } function closePopup() { var app= document.getElementById('app') app.removeChild(document.getElementById('blackout')); app.removeChild(document.getElementById('popupContainer')); app.removeChild(document.getElementById('popup')); app.removeChild(document.getElementById('popupClose')); } function changeNbRowsPerPage(n) { var link = '&nbRowsPerPage='+n; document.location.href = '?'+link; } function findObj(theObj, theDoc) { var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj; } function invertVisibility() { var i, visStr,disStr, obj, args = invertVisibility.arguments; for (i=0; i<(args.length); i++) { if ((obj = findObj(args[i])) != null) { visStr = "hide"; if (obj.style) { obj = obj.style; if(obj.visibility == 'visible') { visStr = 'hidden'; disStr = 'none'; } else { if(obj.visibility == 'hidden') { visStr = 'visible'; disStr = 'block'; } } } obj.visibility = visStr; obj.display = disStr; } } return visStr == 'visible'; } function invertSelection() { var Chckbox; var i=0; var allChckbox = document.getElementsByTagName("input"); Chckbox = allChckbox[i]; while (Chckbox!=null) { if (Chckbox.name.search('check') != -1) { if(Chckbox.checked) Chckbox.checked = false; else Chckbox.checked = true; } i++; Chckbox = allChckbox[i]; } } function invertOne(id) { var Chckbox = document.getElementById(id); if(Chckbox.checked) Chckbox.checked = false; else Chckbox.checked = true; } function deleteRow(id, table, returnLink) { if(confirm("Etes vous sur de vouloir supprimer ce(tte) "+table)) { var link = 'f='+table+'_del&elementId='+id+'&returnLink='+returnLink; document.location.href = '?'+link; } } var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; function encode64(input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; do { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); } while (i < input.length); return output; } function decode64(input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); do { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } while (i < input.length); return output; }