var nava = (document.layers); var dom = (document.getElementById); var iex = (document.all); function Chargement() { if (nava) { loadobj = document.loading; } else if (dom) { loadobj = document.getElementById("loading").style; } else if (iex) { loadobj = loading.style; } loadobj.visibility = "hidden"; } function resizePopup() { var popupWidth = 0; var popupHeight = 0; var scWidth = 0; if (document.all) { if (document.getElementById('content').offsetHeight+61 > window.screen.height-50) scWidth = 17; popupWidth = Math.min(document.getElementById('content').offsetWidth+12+scWidth, window.screen.width-50); popupHeight = Math.min(document.getElementById('content').offsetHeight+61, window.screen.height-50); } else { if (document.getElementById('content').offsetHeight+56 > window.screen.height-50) scWidth = 19; popupWidth = Math.min(document.getElementById('content').offsetWidth+8+scWidth, window.screen.width-50); popupHeight = Math.min(document.getElementById('content').offsetHeight+56, window.screen.height-50); } window.resizeTo(popupWidth, popupHeight); document.getElementById('content').style.width = "100%"; document.getElementById('content').style.height = "100%"; } function popup(url, name, width, height, left, top) { if (!width) width = 10; if (!height) height = 10; if (!left) left = 10; if (!top) top = 10; var popup=window.open(url, name, "width="+width+",height="+height+",status=yes,top="+top+",left="+left+",resizable=yes,scrollbars=yes"); popup.focus(); } function openPopup (width,height,left,top,url,name) { popup=window.open(""+url,name,"width="+width+",height="+height+",status=yes,top="+top+",left="+left+",resizable=yes,scrollbars=yes"); popup.focus(); } function changeInnerHTML(id, newText) { element = document.getElementById(id); element.innerHTML = newText; } function delConfirm() { agree=confirm("Valider la suppression ?"); if (agree) { return true; } else { return false; } } function cmdConfirm(action) { var txt; if (action=="emptyPlaylist") { txt="Etes vous sur de vouloir vider votre playlist ?"; } if (action=="addPlaylist") { txt="Etes vous sur de vouloir ajouter les éléments sélectionnés à votre Playlist ?"; } agree=confirm(txt); if (agree) { return true; } else { return false; } } function del (name,id) { document.forms[name].del.value=id; document.forms[name].submit(); } function soumettre (name) { document.forms[name].submit(); } function authwindow() { if (nava) { element = document.identification } else if (dom) { element = document.getElementById("identification").style } else if (iex) { element = identification.style } element.left = Math.round((screen.width-300)/2); element.visibility = "visible"; } function changeStatus(id,obj,url,id2) { if (obj.type=='checkbox') { var status; if (obj.checked) { status=1; } else { status=0; } openPopup ('1','1','2000','2000',url+'?id='+id+'&id2='+id2+'&status='+status,'remote'); } else { if (obj.options[obj.selectedIndex].value=='INI') { openPopup ('1','1','2000','2000',url+'?id='+id+'&status='+obj.options[obj.selectedIndex].value,'remote'); } else { if (confirm('Veuillez confirmer la mise en ligne de cette News.')) { openPopup ('1','1','2000','2000',url+'?id='+id+'&status='+obj.options[obj.selectedIndex].value,'remote'); } else { obj.selectedIndex=1; } } } } function execCmd(form,action) { document.forms[form].elements["action"].value=action; document.forms[form].submit(); } function display_full(id) { document.getElementById("tbh"+id).style.display = ''; document.getElementById("th"+id).style.display = ''; document.getElementById("tbbh"+id).style.display = ''; document.getElementById("tb"+id).style.display = 'none'; document.getElementById("t"+id).style.display = 'none'; } function hide_full(id) { document.getElementById("tbh"+id).style.display = 'none'; document.getElementById("th"+id).style.display = 'none'; document.getElementById("tbbh"+id).style.display = 'none'; document.getElementById("tb"+id).style.display = ''; document.getElementById("t"+id).style.display = ''; } function FlashRequest(trigger, options) { //FlashRequest('stateChanged', '"paused", "buffering", 0'); } function submitonce(theform) { //if IE 4+ or NS 6+ if (document.all||document.getElementById) { //screen thru every element in the form, and hunt down "submit" and "reset" for (i=0;i < theform.length;i++) { var tempobj=theform.elements[i] if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") //disable em tempobj.disabled=true } } }