//Simple AJAX Code-Kit (SACK) v1.6.1 ©2005 Gregory Wild-Smith www.twilightuniverse.com Software licenced under a modified X11 licence, see documentation or authors website for more details ::: minified with jscompress.com function sack(file){this.xmlhttp=null,this.resetData=function(){this.method="POST",this.queryStringSeparator="?",this.argumentSeparator="&",this.URLString="",this.encodeURIString=!0,this.execute=!1,this.element=null,this.elementObj=null,this.requestFile=file,this.vars=new Object,this.responseStatus=new Array(2)},this.resetFunctions=function(){this.onLoading=function(){},this.onLoaded=function(){},this.onInteractive=function(){},this.onCompletion=function(){},this.onError=function(){},this.onFail=function(){}},this.reset=function(){this.resetFunctions(),this.resetData()},this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){this.xmlhttp=null}}this.xmlhttp||("undefined"!=typeof XMLHttpRequest?this.xmlhttp=new XMLHttpRequest:this.failed=!0)},this.setVar=function(t,e){this.vars[t]=Array(e,!1)},this.encVar=function(t,e,n){if(1==n)return Array(encodeURIComponent(t),encodeURIComponent(e));this.vars[encodeURIComponent(t)]=Array(encodeURIComponent(e),!0)},this.processURLString=function(t,e){for(encoded=encodeURIComponent(this.argumentSeparator),regexp=new RegExp(this.argumentSeparator+"|"+encoded),varArray=t.split(regexp),i=0;i/g, ""); alert(msg); } /** * Because AJAX doesn't support cross-domain requests, this function allows a proxy * to be set as the destination for AJAX requests * @param url The url of the proxy script which must be on this domain */ function gu_gadgets_set_ajax_proxy(url){ gu_gadgets_ajax_proxy = url; } /** * Creates a basic subscribe link to the subscribe page * @param list_id The ID of a list (optional) * @param text The text of the link * @return The gadget HTML */ function gu_gadgets_create_basic_link(list_id, text){ var sub_url = gu_gadgets_subcribe_url + ((list_id > 0) ? ("?list=" + list_id) : ''); return '' + text.replace(/"/g,'"') + ''; } /** * Creates a basic subscribe form which redirects to the subscribe page * @param list_id The ID of a list (optional) * @param btn_text The submit button label (optional) * @param prefix The prefix applied to all IDs of elements * @return The gadget HTML */ function gu_gadgets_create_basic_form(list_id, btn_text, prefix){ var html = ''; if (!gu_gadgets_formless) html += '
'; html += ''; html += ''; if (btn_text != '') html += ''; else html += ''; if (!gu_gadgets_formless) html += '
'; return html; } /** * Creates a link which uses AJAX to submit a subscription * @param list_id The ID of a list * @param text The text of the link * @return The gadget HTML */ function gu_gadgets_create_ajax_link(list_id, text){ if (list_id == '' || list_id == 0) return 'Ce gadget nécessite une liste de diffusion valide'; return '' + text.replace(/"/g,'"') + ''; } /** * Creates a subscribe form which uses an inline AJAX submission * @param list_id The ID of a list * @param btn_text The submit button label (optional) * @param prefix The prefix applied to all IDs of elements * @return The gadget HTML */ function gu_gadgets_create_ajax_form(list_id, btn_text, email_hint, prefix){ if (list_id == '' || list_id == 0) return 'Ce gadget nécessite une liste de diffusion valide'; var html = ''; if (!gu_gadgets_formless) html += '
'; html += ''; html += ''; if (btn_text != '') html += ''; if (!gu_gadgets_formless) html += '
'; if (email_hint != '') html += '