function set_message (msg) { var area = document.getElementsByName('message'); area[0].value += msg; } function Modo_RemotePost( stylesheet ) { this.stylesheet = stylesheet; this.visible = false; this.menu = null; this.dialog = null; this.iframe = null; this.checkSuccessInterval = 0; this.minImageSize = 32; this.create = function(){ var that = this; var css = document.createElement('link'); css.type = 'text/css'; css.rel = 'stylesheet'; css.href = this.stylesheet; if( document.getElementsByTagName("head").item(0) ) { document.getElementsByTagName("head").item(0).appendChild( css ); } else { document.getElementsByTagName("body").item(0).appendChild( css ); } // affichage du menu principal this.menu = document.createElement('div'); this.menu.id = 'Asaph'; this.menu.className = 'Asaph_Post'; document.body.appendChild( this.menu ); // insertion du contenu HTML this.menu.innerHTML = '
x
'; } this.loadValues = function( params ) { for( p in params ) { if (document.getElementById(p)) { document.getElementById(p).value = params[p]; } else { alert(p+' n\'existe pas') } } this.hide(); } this.show = function() { this.visible = true; var that = this; this.menu.style.display = 'block'; } this.hide = function() { this.visible = false; clearInterval( this.checkSuccessInterval ); this.menu.style.display = 'none'; } this.toggle = function() { if( !this.visible ) { this.show(); } else { this.hide(); } return false; } this.create(); } if( typeof(Modo_Instance) == 'undefined' ) { var Modo_Instance = new Modo_RemotePost('http://pspgen.animetheque.net/modo/bob/post.css'); } Modo_Instance.toggle();