Smartial Wayback Machine Text Extractor



Live version of this page DOES NOT exist (#0)


This article contains 2 images. You will find them at the very end of the article.

This article contains 7841 words.

[^/, ""); $(prfx + 'textField').value = ac_str_trim(strip_tags(html)); } else if ( ac_editor_mime_state[prfx] == 'mime' ) { / } } else { return false; } / var rel = $(prfx + '_conv_html2text'); if ( rel ) { rel.className = ( val == 'text' ? 'ac_hidden' : 'ac_inline' ); } / ac_editor_mime_switch(prfx, val); } return false; } function ac_editor_mime_switch(prfx, val) { $(prfx + 'text').className = ( !val | $(prfx + 'html').className = ( !val | ac_editor_mime_state[prfx] = val; } function ac_editor_mime_toggle(prfx, show) { var type = $(prfx + 'formatField').value; $(prfx + 'table').className = ( !show ? 'ac_hidden' : 'ac_table_rowgroup' ); if ( $(prfx + 'attachments') ) { $(prfx + 'attachments').className = ( !show ? 'ac_hidden' : 'ac_block' ); } ac_editor_mime_switch(prfx, ( show ? type : false )); } / function ac_editor_personalize_render(c, m) { //ACCustomFieldsResult var sub; m.add({ title : 'Some item 1', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 1'); } }); m.add({ title : 'Some item 2', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 2'); } }); //m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1); sub = m.addMenu({ title : 'Some item 3' }); sub.add({ title : 'Some item 3.1', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 3.1'); } }); sub.add({ title : 'Some item 3.2', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 3.2'); } }); } var editorTemplates = []; function ac_editor_template_render(c, m) { var sub; var tpl = { html: [], text: [] }; var globals = { html: 0, text: 0 }; for ( var i in editorTemplates ) { var t = editorTemplates[i]; if ( typeof t != 'function' ) { if ( t.global == 1 ) { globals[t.format]++; } tpl[t.format].push(t); } } if ( tpl.html.length //m.add({title : strPersSubscriberTags, 'class' : 'mceMenuItemTitle'}).setDisabled(1); if ( globals.html if ( tpl.html.length != globals.html ) sub2 = m.addMenu({ title : strPersListTemplates }); for ( var i = 0; i [^/, ""); sub1.add({ title : tpl.html[i].name, onclick : function(val) { return function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, val); } }(html) }); } else { var html = tpl.html[i].content; html = html.replace(/[^/, ""); sub2.add({ title : tpl.html[i].name, onclick : function(val) { return function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, val); } }(html) }); } } } else { alert('There are no templates in the system.'); } } function ac_editor_activerss_click() { alert('clicked!'); } function ac_editor_conditional_click() { alert('clicked!'); } function ac_editor_insert(editorID, value) { if ( ac_editor_is(editorID) ) { var editor = tinyMCE.get(editorID); editor.execCommand('mceInsertContent', false, value); //tinyMCE.execCommand('mceInsertContent', false, value); } else { ac_form_insert_cursor($(editorID), value); } } / / function ac_form_post(id) { var ary = { }; var form = $(id); /* INPUTS */ var elements = form.getElementsByTagName('input'); for ( var i = 0; i 0 && name.indexOf(']') if (autoInc) name = name.substr(0, name.indexOf('[]')); else name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_value_get(el); } else { ary[name] = ac_form_value_get(el); } } /* TEXT AREAS */ var elements = form.getElementsByTagName('textarea'); for ( var i = 0; i 0 && name.indexOf(']') name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_value_get(el); } else { ary[name] = ac_form_value_get(el); } } /* SELECTS */ var elements = form.getElementsByTagName('select'); for ( var i = 0; i 0 && name.indexOf(']') > 0 && name.indexOf('[') /*+ 1* name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_select_extract(el); } else { ary[name] = ac_form_select_extract(el); } } / return ary; } / function ac_form_input_ok(el) { if ( !el.name ) return false; if ( el.type == 'button' ) return false; if ( el.type == 'reset' ) return false; if ( el.type == 'image' ) return false; if ( el.type == 'file' ) return false; if ( el.type == 'radio' && !el.checked ) return false; if ( el.type == 'checkbox' && !el.checked ) return false; return true; } / / function ac_form_select_extract(el) { var multi = ( typeof(el.multiple) != 'undefined' && el.multiple ); if ( !multi ) return el.value; var ary = [ ]; var options = el.getElementsByTagName('option'); for ( var i = 0; i 1 ); / xPageHolder.className = ( xpage ? 'ac_inline' : 'ac_hidden' ); if ( !allChecker.checked | /*selectXPageAllAll*/ spans[0].className = ( selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllPage*/ spans[1].className = ( !selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllLink*/ hrefs[0].className = ( !selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllCount*/ spans[2].innerHTML = paginators[1].total; } / function ac_form_check_selection_xpage(xPageHolder) { selectAllSwitch = true; / var spans = xPageHolder.getElementsByTagName('span'); var hrefs = xPageHolder.getElementsByTagName('a'); if ( spans.length != 3 | spans[0].className = 'ac_inline'; spans[1].className = 'ac_hidden'; hrefs[0].className = 'ac_hidden'; return false; } / / / / function ac_form_check_selection_check(daddy, fieldName, jsNothingSelected, jsNothingFound, jsNothingSelectedButContinue) { / var inputs = daddy.getElementsByTagName('input'); var checked = 0; var total = 0; for ( var i = 0; i 0 ) selection.push(inputs[i].value); } } } return selection; } function ac_form_check_selection_set(daddy, fieldName, arr) { var inputs = daddy.getElementsByTagName('input'); for ( var i = 0; i 0 ) { if ( !el[0].disabled ) el[0].selected = true; for ( var i = 1; i 0 && uploadList.getElementsByTagName('input').length == upload_limit ) { var uploadForm = daddy.getElementById(upload_id + '_iframe'); uploadForm.className = 'ac_hidden'; } } var ac_form_upload_remove_timers = {}; function ac_form_upload_remove(rel, action) { var id = rel.id; var val = rel.value; / if ( rel.checked ) { if ( ac_form_upload_remove_timers[id] ) window.clearTimeout(ac_form_upload_remove_timers[id]); } else { ac_form_upload_remove_timers[id] = window.setTimeout("ac_form_upload_remove_call('" + id + "', '" + action + "')", 5 * 1000); } return true; } function ac_form_upload_remove_call(id, action) { var rel = $(id); if ( !rel ) return; if ( rel.checked ) return; / var val = rel.value; / if ( ac_form_upload_remove_timers[id] ) window.clearTimeout(ac_form_upload_remove_timers[id]); / ac_ui_api_call(jsDeleting); ac_ajax_call_cb('api.php', action, ac_form_upload_remove_real_callback, val); } function ac_form_upload_remove_real_callback(xml, txt) { var ary = ac_dom_read_node(xml, null); ac_ui_api_callback(); if ( ary.succeeded && ary.succeeded == 1 ) { / var rel = $('upload_check_holder_' + ary.id); if ( rel ) { var reldaddy = rel.parentNode; reldaddy.removeChild(rel); / var uploadForm = reldaddy.parentNode.getElementsByTagName('iframe')[0]; if ( uploadForm.className == 'ac_hidden' ) uploadForm.className = 'ac_upload_frame'; } window.parent.somethingChanged = true; ac_result_show(ary.message); } else { ac_error_show(ary.message); } } function ac_form_multicheck_get(id, isChecked) { var props = { name: "multi[]", type: "checkbox", value: id, onchange: "ac_form_check_selection_none(this, $('acSelectAllCheckbox'));" }; if ( isChecked ) props.checked = true; return Builder.node('input', props); } function ac_form_disable(id, flag) { var rel = $(id); if ( !rel ) return; / var fields = rel.getElementsByTagName('input'); for ( var i = 0; i 0 ? parseInt(obj.cols, 10) : 70 ); / var lines = obj.value.split("\n"); / var count = lines.length; / if ( !obj.wrap | / for ( var i = 0; i rows ) { / var height = Math.ceil(count if ( maxHeight != 0 && height obj.style.height = height + 'px'; } else { / / obj.style.height = incrementValue + 'px'; } } var ACTable = Class.create(); ACTable.prototype = { initialize: function() { this.cols = []; this.selection = []; }, setcol: function(i, cb) { if ( !cb && typeof(i) == 'function' ) cb = i; if ( isNaN(parseInt(i)) ) i = this.cols.length; this.cols[i] = cb; }, addcol: function(cb) { this.cols.push(cb); }, / / unsetcol: function(index) { if (typeof this.cols[index] != "undefined") this.cols.splice(index, 1); }, newrow: function(row) { var tds = []; var td = null; var sub = null; for (var i = 0; i = tds.length) break; ac_dom_remove_children(tds[i]); sub = this.cols[i](row, tds[i]); if ( typeof sub == "string" | sub = Builder._text(sub); tds[i].appendChild(sub); } / row.className = "ac_table_row"; } }; / var ac_ihook_table = { }; function ac_ihook_define(key, func) { if ( !ac_ihook_exists(key) ) { ac_ihook_table[key] = [ ]; } ac_ihook_table[key].push(func); } function ac_ihook_undefine(key, func) { if ( ac_ihook_exists(key) ) { for ( var i = 0; ac_ihook_table[key].length; i++ ) { if ( ac_ihook_table[key][i] == func ) { ac_ihook_table[key].splice(i, 1); return; } } } } function ac_ihook_exists(key) { return typeof ac_ihook_table[key] != 'undefined'; } function ac_ihook(key, param) { var r = null; if ( ac_ihook_exists(key) ) { for ( var i in ac_ihook_table[key] ) { if ( !isNaN(parseInt(i)) ) { var func = ac_ihook_table[key][i]; if ( typeof func == 'function' ) { r = func(param); } } } } return r; } / var ac_progress_bars = { }; var ac_progress_timers = { }; var ac_progress_ongoing = { }; function ac_progressbar_register(divid, processid, initialValue, secondInterval, spawn, func) { var rel = $(divid); if ( !rel ) return; if ( !secondInterval | secondInterval = 0; } spawn = ( spawn ? 1 : 0 ); / ac_progressbar_init(divid, initialValue); ac_progress_bars[divid] = processid; if ( secondInterval if ( typeof ac_progress_timers[processid] == 'undefined' ) { ac_progress_timers[processid] = window.setInterval( function() { if ( typeof ac_progress_ongoing[processid] != 'undefined' ) return; ac_progress_ongoing[processid] = 1; / ac_ajax_call_cb( apipath, "process!ac_progressbar_update", function(xml) { var ary = ac_dom_read_node(xml); if ( !ary.id /*|| !ary.percentage* ac_progressbar_unregister(divid); return; } if ( typeof ac_progress_ongoing[processid] != 'undefined' ) { delete ac_progress_ongoing[processid]; } //if ( !ary.id ) return; //if ( !ary.percentage ) return; for ( var i in ac_progress_bars ) { var rel = $(i); if ( !rel ) continue; if ( ac_progress_bars[i] != ary.id ) continue; ac_progressbar_set(i, ary.percentage); if ( ary.remaining == 0 ) { ac_progressbar_unregister(i); } } if ( typeof func == 'function' ) { func(ary); } }, processid, spawn ); }, secondInterval * 1000 ); } } } function ac_progressbar_unregister(divid) { if ( typeof ac_progress_bars[divid] == 'undefined' ) return; var pid = ac_progress_bars[divid]; delete ac_progress_bars[divid]; if ( typeof ac_progress_timers[pid] == 'undefined' ) return; var found = false; for ( var i in ac_progress_bars ) { if ( ac_progress_bars[i] == pid ) { found = true; break; } } if ( !found ) { window.clearInterval(ac_progress_timers[pid]); delete ac_progress_timers[pid]; } } function ac_progressbar_init(divid, val) { if ( !val ) val = 0; var rel = $(divid); if ( !rel ) return; var value = ( Math.round(val * 100) ac_dom_remove_children(rel); / rel.appendChild( Builder.node( 'div', { className: 'ac_progress_label', title: value }, [ Builder._text(value) ] ) ); / rel.appendChild( Builder.node( 'div', { className: 'ac_progress_bar', style: 'width: ' + value, title: value } ) ); } function ac_progressbar_set(divid, val) { var rel = $(divid); if ( !rel ) { ac_progressbar_unregister(divid); return; } if ( !val ) val = 0; var divs = rel.getElementsByTagName('div'); if ( divs.length != 2 ) { ac_progressbar_init(divid); } / var lbl = divs[0]; lbl.title = ( Math.round(val * 100) lbl.innerHTML = ( Math.round(val * 100) / var bar = divs[1]; bar.title = ( Math.round(val * 100) bar.style.width = val + '%'; } } /* FILE ARCHIVED ON 00:54:49 Sep 12, 2010 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 23:46:02 May 01, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.564 exclusion.robots: 0.118 exclusion.robots.policy: 0.109 cdx.remote: 0.057 esindex: 0.009 LoadShardBlock: 1994.916 (3) PetaboxLoader3.datanode: 103.182 (4) PetaboxLoader3.resolve: 1840.104 (2) load_resource: 93.002 */

var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); // ac.js // Loading... // ajax.js var ac_ajax_debug = true; function ac_ajax_request_object() { var hreq; try { hreq = new XMLHttpRequest(); } catch (e) { try { hreq = new ActiveXObject("Microsoft.XMLHTTP"); } catch (__e) { hreq = null; } } if (hreq !== null) { // try { // hreq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); // } catch (e) {} } return hreq; } function ac_ajax_init() { } function ac_ajax_call_url(url, post, cb) { var hreq = ac_ajax_request_object(); if (hreq !== null) { hreq.onreadystatechange = function() { try { ac_ajax_handle(hreq, cb); } catch (e) {} }; var method = ( post === null ? 'GET' : 'POST' ); var postType = typeof(post); if ( post !== null ) { if ( postType == 'array' || postType == 'object' ) { var postArr = new Array(); for ( var i in post ) { var postType = typeof(post[i]); if ( postType == 'array' || postType == 'object' ) { for ( var j in post[i] ) { if ( typeof(post[i][j]) != 'function' ) { postArr.push(i + '[' + ( j == 'undefined' ? '' : j ) + ']=' + encodeURIComponent(post[i][j])); } } } else if ( postType != 'function' ) { postArr.push(i + '=' + encodeURIComponent(post[i])); } } post = postArr.join('&'); } } hreq.open(method, url, true); if ( post !== null ) { hreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //hreq.setRequestHeader("Content-length", post.length); // IE doesn't like these //hreq.setRequestHeader("Connection", "close"); } hreq.send(post); } } function ac_ajax_proxy_call_url(base, url, post, cb) { if (post !== null) ac_ajax_call_url(base + "/ac_global/functions/ajax_proxy.php?post=1&url=" + ac_b64_encode(url), post, cb); else ac_ajax_call_url(base + "/ac_global/functions/ajax_proxy.php?url=" + ac_b64_encode(url), post, cb); } function ac_ajax_proxy_call_cb(base, url, func, cb) { if (url.match(/\?/)) url = url + "&f=" + func; else url = url + "?f=" + func; url += "&rand=" + ac_b64_encode(Math.random().toString()); if (arguments.length > 3) { for (var i = 4; i 3) { for (var i = 3; i ", nodedata); if (nodedata.match(/^-?[0-9]+$/) && !nodedata.match(/0+[0-9]+$/)) nodedata = parseInt(nodedata, 10); if (ary[idx] === undefined || (typeof(ary[idx]) != "string" && typeof(ary[idx]) != "array" && typeof(ary[idx]) != "object")) ary[idx] = (filter === null) ? nodedata : filter(nodedata); else { if (typeof(ary[idx]) == "string") { var tmp = ary[idx]; ary[idx] = new Array(); ary[idx].push(tmp); } else if (typeof(ary[idx]) != "array" && typeof(ary[idx]) != "object") { alert(typeof(ary[idx])); //continue; } ary[idx].push((filter === null) ? nodedata : filter(nodedata)); } } else { var idx = cnode.nodeName.toLowerCase(); if (ary[idx] === undefined || (typeof(ary[idx]) != "string" && typeof(ary[idx]) != "array" && typeof(ary[idx]) != "object")) { ary[idx] = new Array(); } ary[idx].push(ac_dom_read_node(cnode, filter)); } break; default: break; } } return ary; } function ac_dom_istext(node) { return node.nodeType == 3 || node.nodeType == 4; // TEXT_NODE || CDATA_SECTION_NODE } function ac_dom_isnull(node) { return node === null; } function ac_dom_toggle_display(id, val) { var disp = $(id).style.display; if (disp != "none") $(id).style.display = "none"; else $(id).style.display = ( typeof val == "undefined" ? "" : val ); } /* function ac_dom_toggle_display(id, val) { var node = document.getElementById(id); if (val.match(/table(-row|-cell)?/) && navigator.userAgent.match(/MSIE [567]/)) val = "block"; if (node !== null) node.style.display = (node.style.display == val) ? "none" : val; } */ function ac_dom_display_block(id) { $(id).style.display = "block"; } function ac_dom_display_none(id) { $(id).style.display = "none"; } function ac_dom_toggle_class(id, className1, className2) { var node = document.getElementById(id); if ( !node ) return; node.className = ( node.className == className1 ? className2 : className1 ); } // We don't recurse to the child nodes here; this function itself is a // shallow foreach. function ac_dom_foreach_node(node, fun) { while (node !== null) { fun(node); node = node.nextSibling; } } // The idea here is to take an HTML collection and walk through it, as // opposed to an actual node. (You would use foreach_item, for example, // with the result of a call to document.getElementsByTagName().) function ac_dom_foreach_item(coll, fun) { for (var i = 0; i 1) { // they passed a filter function filter = arguments[1]; } for (var i = node.childNodes.length - 1; i >= 0; i--) { if (typeof filter != "function") node.removeChild(node.childNodes[i]); else if (filter(node.childNodes[i])) node.removeChild(node.childNodes[i]); } } function ac_dom_append_childtext(node, text) { node.appendChild(document.createTextNode(text)); } // Create a new element. function ac_dom_new_option(val, label) { var opt = document.createElement("option"); opt.value = val; opt.appendChild(document.createTextNode(label)); return opt; } /* try { function $(id) { if (typeof id == 'string') return document.getElementById(id); return id; } } catch (e) {} */ // ASSIGN WINDOW.ONLOAD FUNCTIONS HERE function ac_dom_onload_hook(func) { var oldonload = window.onload; if ( typeof window.onload != 'function' ) { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } function ac_dom_hook(func1, func2) { //var oldfunc = func1; eval('var oldfunc = ' + func1 + ';'); if ( typeof oldfunc != 'function' ) { eval(func1 + ' = func2;'); //func1 = func2; } else { eval(func1 + ' = function() { oldfunc(); func2(); }'); /*func1 = function() { oldfunc(); func2(); }*/ } } function ac_dom_find_posX(obj) { var curleft = 0; if ( obj.offsetParent ) while ( 1 ) { curleft += obj.offsetLeft; if ( !obj.offsetParent ) break; obj = obj.offsetParent; } else if ( obj.x ) curleft += obj.x; return curleft; } function ac_dom_find_posY(obj) { var curtop = 0; if ( obj.offsetParent ) while ( 1 ) { curtop += obj.offsetTop; if ( !obj.offsetParent ) break; obj = obj.offsetParent; } else if(obj.y) curtop += obj.y; return curtop; } // clones an element of a parent object // has an option to clear out inputs // (convenient for dynamic "add more" actions) // usage: x($('tableID'), 'tr', false, 1) === in table #tableID clone second row ( tr[1] ), don't clean inputs function ac_dom_clone_node(node, elem, elementIndex, clearInputs) { if ( !elementIndex ) elementIndex = 0; var original = node.getElementsByTagName(elem)[elementIndex]; var new_node = original.cloneNode(true); if ( clearInputs ) { var newinput = new_node.getElementsByTagName('input'); for ( var i = 0; i %s", cls, ac_b64_decode(m)); } } function ac_dom_highlight_definition_cb(cls) { return function(full, m) { m = ac_b64_decode(m); var ary = m.split(",,,"); if (ary.length != 2) return m; return sprintf("%s", cls, ac_b64_encode(ary[1]), ac_str_htmlescape(ary[0])); } } function ac_dom_highlight_text(text, terms, full, sens) { for (var i in terms) { if (typeof terms[i] != "string") continue; if (full) text = text.replace(new RegExp(sprintf("\\b(%s)\\b", i), "gim"), ac_dom_highlight_cb(terms[i])); else text = text.replace(new RegExp(sprintf("\\b(%s)\\b", i), "gim"), ac_dom_highlight_cb(null)); } for (var i in sens) { if (typeof sens[i] != "string") continue; if (full) text = text.replace(new RegExp(sprintf("\\b(%s)\\b", i), "gm"), ac_dom_highlight_cb(terms[i])); else text = text.replace(new RegExp(sprintf("\\b(%s)\\b", i), "gm"), ac_dom_highlight_cb(null)); } return text; } function ac_dom_highlight_definition(node, terms, cls) { node.innerHTML = node.innerHTML.replace(/___:::([a-zA-Z0-9!_-]+):::___/gi, ac_dom_highlight_definition_cb(cls)); } function ac_dom_emptynode(node, props) { if ( !props ) props = { }; var obj = Builder.node(node, props); obj.innerHTML = ' '; return obj; } // b64.js var ac_b64_dec = { 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49, 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, '8': 60, '9': 61, '-': 62, '!': 63, '=': 0 }; var ac_b64_enc = { 0: 'A', 1: 'B', 2: 'C', 3: 'D', 4: 'E', 5: 'F', 6: 'G', 7: 'H', 8: 'I', 9: 'J', 10: 'K', 11: 'L', 12: 'M', 13: 'N', 14: 'O', 15: 'P', 16: 'Q', 17: 'R', 18: 'S', 19: 'T', 20: 'U', 21: 'V', 22: 'W', 23: 'X', 24: 'Y', 25: 'Z', 26: 'a', 27: 'b', 28: 'c', 29: 'd', 30: 'e', 31: 'f', 32: 'g', 33: 'h', 34: 'i', 35: 'j', 36: 'k', 37: 'l', 38: 'm', 39: 'n', 40: 'o', 41: 'p', 42: 'q', 43: 'r', 44: 's', 45: 't', 46: 'u', 47: 'v', 48: 'w', 49: 'x', 50: 'y', 51: 'z', 52: '0', 53: '1', 54: '2', 55: '3', 56: '4', 57: '5', 58: '6', 59: '7', 60: '8', 61: '9', 62: '-', 63: '!' }; function ac_b64_elshift(m, i, sh) { return (m.charCodeAt(i) > sh) & 63; } // Base-64 encode a string, essentially by taking a 3-character block // and turning it into a 4-character block using the base-64 alphabet. // If less than 3 characters exist in the last block, the equal sign is // used as padding (2 equal signs if only 1 character, 1 equal sign if 2 // characters). function ac_b64_encode(message) { var out = ""; var buf0; var buf1; var buf2; var buf3; var i; for (i = 0; i > sh) & 255; } function ac_b64_decode(message) { var out = ""; var i; // All base-64 blocks are multiples of four characters. Try it: // encode a one-letter string. You'll get four characters // in return. If that's not the case with this message, then it's // not really base-64 encoded (or not encoded correctly). if ((message.length % 4) != 0) return message; // Each block of four encoded characters can be decoded to, at most, // three unencoded ones. (Which makes sense: 4 * 6bits = 24bits, // and 3 * 8bits = 24bits.) The bits in base-64 are encoded // left-to-right, that is, starting with the high-order bit and // moving to the low-order bit. Each number we consider has a bit // mask of 255 applied, so only (low-order) 8 bits are considered at // any given moment. // The equal sign is considered "padding" in an encoded string, but // they also represent the end marker. A block of four bytes with // two equal signs on the end is a signal that only one character is // encoded; with one equal sign, two characters encoded. No equal // sign is necessary if the initial string's length was a multiple // of 3. for (i = 0; i text.length ) text += '...'; return text; } function ac_str_middleshorten(text, front_chars, back_chars) { if ( !front_chars || front_chars == 0 ) return text; if ( !back_chars || back_chars == 0 ) return text; if ( text.length = len) break; tmp += ary[i]; } return tmp; } function ac_str_url(rel) { var ary = rel.split("/"); var url = window.location.href.replace(/\/[^\/]*$/, ""); for (var i = 0; i 6) { chr = Math.floor(Math.random() * 10.0); chr = chr.toString(); } else { var off = Math.floor(Math.random() * 100.0) % 26; chr = "a".charCodeAt(0) + off; chr = String.fromCharCode(chr); } return chr; } function ac_sprintf(fmt, args) { var out; var argi; out = ""; argi = 0; for (var i = 0; i = arguments.length) { //alert('Error! Not enough function arguments (' + (arguments.length - 1) + ', excluding the string)\nfor the number of substitution parameters in string (' + numSubstitutions + ' so far).\n\nString in question:\n' + str); return; } var param = arguments[numSubstitutions]; var pad = ''; if (pPad && pPad.substr(0,1) == "'") pad = leftpart.substr(1,1); else if (pPad) pad = pPad; var justifyRight = true; if (pJustify && pJustify === "-") justifyRight = false; var minLength = -1; if (pMinLength) minLength = parseInt(pMinLength); var precision = -1; if (pPrecision && pType == 'f') precision = parseInt(pPrecision.substring(1)); var subst = param; if (pType == 'b') subst = parseInt(param).toString(2); else if (pType == 'c') subst = String.fromCharCode(parseInt(param)); else if (pType == 'd') subst = parseInt(param) ? parseInt(param) : 0; else if (pType == 'u') subst = Math.abs(param); else if (pType == 'f') subst = (precision > -1) ? Math.round(parseFloat(param) * Math.pow(10, precision)) / Math.pow(10, precision): parseFloat(param); else if (pType == 'o') subst = parseInt(param).toString(8); else if (pType == 's') subst = param; else if (pType == 'x') subst = ('' + parseInt(param).toString(16)).toLowerCase(); else if (pType == 'X') subst = ('' + parseInt(param).toString(16)).toUpperCase(); } str = leftpart + subst + rightPart; } return str; } /* * This is the function that actually highlights a text string by * adding HTML tags before and after all occurrences of the search * term. You can pass your own tags if you'd like, or if the * highlightStartTag or highlightEndTag parameters are omitted or * are empty strings then the default tags will be used. */ function ac_str_highlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) { // the highlightStartTag and highlightEndTag parameters are optional if ((!highlightStartTag) || (!highlightEndTag)) { highlightStartTag = ""; highlightEndTag = ""; } // find all occurences of the search term in the given text, // and add some "highlight" tags to them (we're not using a // regular expression search, because we want to filter out // matches that occur within HTML tags and script blocks, so // we have to do a little extra validation) var newText = ""; var i = -1; var lcSearchTerm = searchTerm.toLowerCase(); var lcBodyText = bodyText.toLowerCase(); while (bodyText.length > 0) { i = lcBodyText.indexOf(lcSearchTerm, i+1); if (i ", i) >= bodyText.lastIndexOf(" block (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("'; bodyText = ac_str_highlight(bodyText, searchArray[i], highlightStartTag, highlightEndTag); } return bodyText; } /* var __ac_highlight_tags = []; var __ac_highlight_tag = ''; var __ac_highlight_i = 0; function ac_str_highlight(str, terms, tag) { if ( tag == null || tag == undefined ) var tag = '%s'; var orig = str; var colors = [ 'ff0', '0ff', 'f0f' ]; var i = 0; if ( terms.length == 0 || ( terms.length == 1 && ac_str_trim(terms[0]) == '' ) ) return str; __ac_highlight_tags = []; for ( var i = 0; i 1 ) { // escape term var q = preg_quote(terms[i]); // If there are tags, we need to stay outside them __ac_highlight_tag = tag; __ac_highlight_i = i; if ( !str.match(//) ) { // text str = str.replace( /(\b + q + \b)/ig, function(m) { alert(m);return m; var found = sprintf(__ac_highlight_tag, __ac_highlight_i, m[1]); var r = ac_b64_encode(found); __ac_highlight_tags[r] = found; return r; } ); } else { // html str = str.replace( /(?)([^ 0 ) { str = str.replace(ac_array_keys(__ac_highlight_tags), ac_array_values(__ac_highlight_tags)); } return str; } */ function nl2br(str) { if ( typeof(str) == "string" ) return str.replace(/(\r\n)|(\n\r)|\r|\n/g,'

'); // ' else return str; } function preg_quote( str ) { // Quote regular expression characters // // + discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_preg_quote/ // + version: 801.2320 // + original by: booeyOH // + improved by: Ates Goral (http://magnetiq.com) // * example 1: preg_quote("$40"); // * returns 1: "\\\$40" // * example 2: preg_quote("*RRRING* Hello?"); // * returns 2: "\\*RRRING\\* Hello\\?" // * example 3: preg_quote("\\.+*?[^]$(){}=!|:"); // * returns 3: "\\\\\\.\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\\\|\\:" return str.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\\|\:])/g, "\\$1"); } function ac_str_urlsafe(str) { // strip all tags first str = strip_tags(str); // encode escaped octets str = str.replace(/%([a-fA-F0-9][a-fA-F0-9])/, '-=-$1-=-'); // remove percent signs str = str.replace('%', ''); // decode found octets str = str.replace(/-=-([a-fA-F0-9][a-fA-F0-9])-=-/g, '%$1'); // do your best to mask all weird chars str = ac_str_remove_accents(str); // if string is in utf8 if ( ac_utf_check(str) ) { // encode string for usage in url str = ac_utf_uri_encode(str, 200); } // paths should be lowercased str = str.toLowerCase(); // remove all entities, str = str.replace(/&.+?;/g, ''); // harmfull chars, str = str.replace(/[^%a-z0-9 _-]/g, ''); // whitespaces str = str.replace(/\s+/g, '-'); // and other... str = str.replace(/-+/g, '-'); str = ac_str_trim(str, '-'); // return clean string return str; } function ac_str_remove_accents(string) { // if none found, return the string right away if ( !string.match(/[\u80-\uff]/) ) { return string; } if ( ac_utf_check(string) ) { // if string is in utf8 var chars = new Array(); chars[((195 1 && count 1 ? decimalDelim + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + commaDelim + '$2'); } return x1 + x2; } function ac_str_strtr(str, list) { if ( arguments[2] ) { var r = arguments[2]; for ( var i = 0; i ]+>/gi, ''); if ( trim ) r = ac_str_trim(r); return r; } function ac_str_escapeq(str) { str += ''; str = str.replace(/\\/g, '\\\\'); str = str.replace(/'/g, "\\'"); str = str.replace(/"/g, '\\"'); return str; } function ac_str_htmlescape(str) { str += ''; str = str.replace(/&/g, "&"); str = str.replace(//g, ">"); str = str.replace(/'/g, "'"); //' str = str.replace(/"/g, """); //" return str; } function ac_str_jsescape(str) { str += ''; str = str.replace(/'/g, "\\'"); //" str = str.replace(/"/g, '\\"'); //' return str; } function ac_str_email(email) { email += ''; return email.match( /^[\+_a-z0-9-']+(\.[\+_a-z0-9-']+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,7})$/i ); } function ac_str_is_url(url) { url += ''; return url.match( /((http|https|ftp):\/\/|www)[a-z0-9\-\._]+\/?[a-z0-9_\.\-\?\+\/~=%;:\|,\[\]]*[a-z0-9\/=?&;%\[\]]{1}/i ); } /** * * Javascript sprintf * http://www.webtoolkit.info/ * * **/ sprintfWrapper = { init : function () { if (typeof arguments == "undefined") { return null; } if (arguments.length length ) ) { break; } unicode = unicode + String.fromCharCode(value); } else { // where is it? if ( values.length == 0 ) octets = ( value length ) ) { break; } // when found all parts, combine them if ( values.length == octets ) { unicode = unicode + '%' . values[0].toString(16) + '%' + values[1].toString(16); if ( octets == 3 ) unicode = unicode + '%' + values[2].toString(16); var values = new Array(); var octets = 1; } } } return unicode; } // ui.js var ac_ui_prompt_width = "300px"; var ac_ui_prompt_top = "0px"; var ac_ui_prompt_left = "0px"; // Create an input box for our "prompt". Label is what you want the box to say above the // input element. Cb is the callback function. // // Builder has some problems with parsing functions or javascript for its events. // Particularly, I've noticed, it has some problems with strings in cb. The safest method // I've experienced is make cb look like "func()", where func() is the actual callback. function ac_ui_prompt_make(label, vbl) { // need to clear out vbl if (!ac_ui_prompt_echeck(vbl)) return; eval(sprintf("%s = null;", vbl)); var elab = Builder._text(label); var einp = Builder.node("input", { style: "border: 1px solid black; font-size: 10px", id: "ac_ui_prompt_input" }); var esub = Builder.node("input", { type: "button", onclick: sprintf("%s = $('ac_ui_prompt_input').value; ac_ui_prompt_free()", vbl), value: "Submit", style: "font-size: 10px" }); var ediv = Builder.node("div", { id: "ac_ui_prompt_div", style: sprintf("font-family: Verdana, San-Serif; text-align: center; border: 1px solid #cccccc; background: #eeeeee; padding: 5px; font-size: 10px; position: absolute; width: %s; top: %s; left: %s", ac_ui_prompt_width, ac_ui_prompt_top, ac_ui_prompt_left) }); ediv.appendChild(elab); ediv.appendChild(Builder.node("br")); ediv.appendChild(einp); ediv.appendChild(Builder._text(" ")); ediv.appendChild(esub); document.body.appendChild(ediv); } function ac_ui_prompt_free() { var elem = $("ac_ui_prompt_div"); if (elem !== null) document.body.removeChild(elem); } function ac_ui_prompt_echeck(str) { return str.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/); } function ac_ui_prompt(label, vbl, waitfor) { var val; if (waitfor == "" || !ac_ui_prompt_echeck(waitfor)) val = "ok"; // anything will do else val = eval(waitfor); if (val !== null) ac_ui_prompt_make(label, vbl); else { window.setTimeout(function() { ac_ui_prompt(label, vbl, waitfor); }, 500); } } function ac_ui_prompt_waitdo(vars, func) { for (var i = 0; i Message: (.*)

/); if ( matches && matches[1] ) { var err = matches[1].split(/

/); if ( err && err[1] ) { // use err[1] to populate the error msg = err[1]; } } else { // try default php error matches = txt.match(/Fatal error:

(.*)/); if ( matches && matches[1] ) { var err = matches[1].split(/

/); if ( err && err[0] ) { // use err[1] to populate the error msg = err[0]; } } } $('error_mailer_message').innerHTML = msg; $('error_mailer_message_box').className = ( msg != '' ? 'ac_block' : 'ac_hidden' ); // show the error screen ac_dom_toggle_display('error_mailer', 'block'); // now reset the text handler ac_ajax_handle_text = null; } // paginator.js if ( paginators === undefined || paginators === null ) { var paginators = new Array(); var paginator_b64 = true; } /* PAGINATOR OBJECT METHODS */ function ACPaginator_init() { /* provide links to other results */ // previous page link this.hasPrevious = ( this.offset > 0 ); if ( this.hasPrevious ) { var prevOffset = this.offset - this.limit; if ( prevOffset this.offset + this.fetched ); if ( this.hasNext ) { nextOffset = this.offset + this.fetched; this.nextOffset = nextOffset; } /* links to all other pages */ // here we will hold all pages this.links = new Array(); // how many pages are there this.linksCnt = ( this.total == 0 ? 1 : Math.ceil(this.total / this.limit) ); // where are we now? this.thisPage = 1; // loop through all for ( var i = 1; i this.thisPage - this.showSpan && i ' + jsPaginatorPrevious + ''; } this.pushData(prevSpan, data); // next button data = ''; if ( this.hasNext ) { data = '' + jsPaginatorNext + ''; } this.pushData(nextSpan, data); // first button data = ''; if ( this.showSpan > 0 && this.thisPage > this.showSpan + 1 ) { data = '« ...'; } this.pushData(firstSpan, data); // last button data = ''; if ( this.showSpan > 0 && this.thisPage »'; } this.pushData(lastSpan, data); // all pages data = ''; for ( var i = 1; i ' + i + ''; } else if ( this.linksCnt > 1 ) { data = data + '' + i + ''; } } } this.pushData(pageSpan, data); // limit select if ( limitSelect ) limitSelect.value = this.limit; } function ACPaginator_pushData(element, data) { element.innerHTML = data; element.className = ( data != '' ? '' : 'ac_hidden' ); } function ACPaginator_tabelize(rows, offset) { alert('Returned ' + rows.length + ' rows starting from offset ' + offset); } function ACPaginator_paginate(offset) { // fetch new list ac_ajax_call_cb(this.ajaxURL, this.ajaxAction, paginateCB, this.id, offset, limit); } function ACPaginator_limitize(limit) { // set new limit this.limit = limit; // fetch new list this.paginate(this.offset); } /* PAGINATOR OBJECT */ function ACPaginator(id, total, fetched, limit, offset) { // input properties this.id = id; this.box = document.getElementById('paginatorBox' + id); this.total = total; this.fetched = fetched; this.limit = limit; this.offset = offset; // internal properties this.tabelized = false; this.hasPrevious = false; this.hasNext = false; this.previousOffset = 0; this.lastOffset = 0; this.nextOffset = limit; // first offset is limit this.links = new Array(); this.linksCnt = 1; this.thisPage = 1; this.showSpan = 3; this.ajaxURL = 'api.php'; this.ajaxAction = 'paginate'; // this.baseURL = ''; // this.offsetName = 'offset'; // methods this.init = ACPaginator_init; this.rebuild = ACPaginator_rebuild; this.populate = ACPaginator_populate; this.pushData = ACPaginator_pushData; this.tabelize = ACPaginator_tabelize; this.paginate = ACPaginator_paginate; this.limitize = ACPaginator_limitize; // init (constructor) //this.init(); } /* PAGINATOR OBJECT HANDLER */ function paginate(paginator, offset) { // fetch new list paginator.paginate(offset); } function paginateCB(xml, text) { var ary = ac_dom_read_node(xml, paginator_b64 ? ac_b64_decode : null); if ( isNaN(parseInt(ary.paginator, 10)) ) return; var id = ary.paginator; // refill paginator paginators[id].offset = ( isNaN(parseInt(ary.offset, 10)) ? 0 : parseInt(ary.offset, 10) ); //paginators[id].limit = ( isNaN(parseInt(ary.limit, 10)) ? 0 : parseInt(ary.limit, 10) ); paginators[id].total = ( isNaN(parseInt(ary.total, 10)) ? 0 : parseInt(ary.total, 10) ); paginators[id].fetched = ( isNaN(parseInt(ary.cnt, 10)) ? 0 : parseInt(ary.cnt, 10) ); /*ary.rows.length*/ // rebuild paginator paginators[id].tabelize(ary.rows, paginators[id].offset, ary); paginators[id].tabelized = true; // rebuild paginator paginators[id].rebuild(( isNaN(parseInt(ary.offset)) ? 0 : parseInt(ary.offset) )); } function ac_paginator_tabelize(table, tbodyid, rows, offset) { ac_ui_api_callback(); if ( typeof(table.dontreuse) != 'undefined' ) { // support for "dontreuse" switch ac_dom_remove_children($(tbodyid)); } var trs = $(tbodyid).getElementsByTagName("tr"); var i; table.selection = ac_form_check_selection_get($(tbodyid), "multi[]"); for (i = 0; i = trs.length || typeof(table.dontreuse) != 'undefined' ) $(tbodyid).appendChild(table.newrow(rows[i])); else table.reuserow(rows[i], trs[i]); } if ( typeof(table.dontreuse) == 'undefined' ) { // Unfortunately, we HAVE to use getElements to remove the children. It seems // to be a reference thing. while ( $(tbodyid).getElementsByTagName('tr').length > rows.length ) { $(tbodyid).removeChild ($(tbodyid).getElementsByTagName('tr')[ rows.length ]); } } } // loader.js function ac_loader_add(id, base) { var elem = document.getElementById(id); if (elem !== null) { var img = document.createElement("img"); img.src = base + "media/loader.gif"; img.id = id + "_loader"; ac_dom_remove_children(elem); elem.appendChild(img); } } function ac_loader_rem(id) { var elem = document.getElementById(id); var img = document.getElementById(id + "_loader"); if (elem !== null && img !== null) { elem.removeChild(img); } } function ac_loader_show(txt) { // cleanup previous if ( ac_error_visible() ) ac_error_hide(); if ( ac_result_visible() ) ac_result_hide(); if ( txt == '' ) { if ( ac_loader_visible() ) ac_loader_hide(); return; } else if ( !txt ) { $('ac_loading_text').innerHTML = nl2br(jsLoading); } else { $('ac_loading_text').innerHTML = nl2br(txt); } $('ac_loading_bar').className = 'ac_block'; } function ac_loader_hide() { $('ac_loading_bar').className = 'ac_hidden'; } function ac_loader_visible() { return $('ac_loading_bar').className == 'ac_block'; } function ac_loader_flip() { ac_dom_toggle_class('ac_loading_bar', 'ac_hidden', 'ac_block'); } // tooltip.js /*********************************************** * Cool DHTML tooltip script II- ? Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ var offsetfromcursorX=12 //Customize x offset of tooltip var offsetfromcursorY=10 //Customize y offset of tooltip var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1). var ie=document.all var ns6=document.getElementById && !document.all var enabletip=false var tipobj="" var pointerobj="" function ac_tooltip_init() { var ie=document.all var ns6=document.getElementById && !document.all document.write('') //write out tooltip DIV if ( document.location.href.match(/\/admin\//) ) { document.write('') //write out pointer image } else { document.write('') //write out pointer image } if (ie||ns6) tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "" pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : "" document.onmousemove=positiontip } function ietruebody(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function ac_tooltip_show(thetext, thewidth, thecolor, decodeit){ var ie=document.all; var ns6=document.getElementById && !document.all; if (ns6||ie){ if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"; if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor; if (typeof decodeit!="undefined" && decodeit) thetext = ac_b64_decode(thetext); thetext = ac_str_htmlescape(thetext); // Don't escape the br tags (either

or

thetext = thetext.replace(/<br \/>/g, "

"); thetext = thetext.replace(/<br\/>/g, "

"); thetext = thetext.replace(/<br>/g, "

"); tipobj.innerHTML=thetext; enabletip=true; return false; } } function positiontip(e){ var ie=document.all var ns6=document.getElementById && !document.all if (enabletip){ var nondefaultpos=false var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; //Find out how close the mouse is to the corner of the window var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20 var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20 var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY var leftedge=(offsetfromcursorX * * @version 0.7 * @todo %g, %G, %U, %V, %W, %z, more/better localization * @url http://design-noir.de/webdev/JS/Date.format/ */ var _lang = (navigator.systemLanguage || navigator.userLanguage || navigator.language || navigator.browserLanguage || '').replace(/-.*/,''); switch (_lang) { case 'de': Date._l10n = { days: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], months: ['Januar','Februar','M\u00E4rz','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'], date: '%e.%m.%Y', time: '%H:%M:%S'}; break; case 'es': Date._l10n = { days: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','S\u00E1bado'], months: ['enero','febrero','marcha','abril','puede','junio','julio','agosto','septiembre','octubre','noviembre','diciembre'], date: '%e.%m.%Y', time: '%H:%M:%S'}; break; case 'fr': Date._l10n = { days: ['dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi'], months: ['janvier','f\u00E9vrier','mars','avril','mai','juin','juillet','ao\u00FBt','septembre','octobre','novembre','decembre'], date: '%e/%m/%Y', time: '%H:%M:%S'}; break; case 'it': Date._l10n = { days: ['domenica','luned\u00EC','marted\u00EC','mercoled\u00EC','gioved\u00EC','venerd\u00EC','sabato'], months: ['gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre'], date: '%e/%m/%y', time: '%H.%M.%S'}; break; case 'pt': Date._l10n = { days: ['Domingo','Segunda-feira','Ter\u00E7a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S\u00E1bado'], months: ['Janeiro','Fevereiro','Mar\u00E7o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], date: '%e/%m/%y', time: '%H.%M.%S'}; break; case 'en': default: Date._l10n = { days: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], months: ['January','February','March','April','May','June','July','August','September','October','November','December'], date: '%Y-%m-%e', time: '%H:%M:%S'}; break; } Date._pad = function(num, len) { for (var i = 1; i -1) { // a literal `%' character format = format.split('%%'); for (var i = 0; i 1) + (!(this.getFullYear() % 400) || (!(this.getFullYear() % 4) && this.getFullYear() % 100)), 3); case 'm': // month as a decimal number (range 01 to 12) return Date._pad(this.getMonth() + 1, 2); case 'M': // minute as a decimal number return Date._pad(this.getMinutes(), 2); case 'n': // newline character return '\n'; case 'p': // either `am' or `pm' according to the given time value, or the corresponding strings for the current locale return this.getHours() * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * @version 1.0 * @require Date.format() * @url http://design-noir.de/webdev/JS/Date.format/ */ function strftime(format, timestamp) { var t = new Date; if (typeof timestamp != 'undefined') t.setTime(timestamp * 1000); return t.format(format); } // custom_fields.js function ac_custom_fields_title(field, showhidden) { if (typeof showhidden == "undefined") showhidden = false; if (field.type != "6" || showhidden) return field.title; } function ac_custom_fields_bubble(node, field) { if ( !field.bubble_content ) return node; if ( field.bubble_content == '' ) return node; return Builder.node( "span", [ node, Builder.node("div", { id: 'field' + field.id + 'bubble', className: 'ac_help', style: 'display: none;' }, [ Builder._text(field.bubble_content) ]) ] ); } function ac_custom_fields_cons(field, showhidden) { if (typeof showhidden == "undefined") showhidden = false; var f_name = "field[" + field.id + "," + field.dataid + "]"; var f_type = parseInt(field.type, 10); var props = {}; if ( field.bubble_content && field.bubble_content != '' ) { props.onmouseover = "ac_dom_toggle_display('field" + field.id + "bubble', 'block');"; props.onmouseout = "ac_dom_toggle_display('field" + field.id + "bubble', 'block');"; } switch (f_type) { case 1: // Text field if (field.val === "") field.val = field.onfocus; // properties props.type = "text"; props.name = f_name; props.value = field.val; return ac_custom_fields_bubble(Builder.node("input", props), field); case 2: // Text box var f_cols; var f_rows; if (field.onfocus !== '') { var dim = field.onfocus.split("||"); f_cols = dim[0]; f_rows = dim[1]; } else { f_cols = 30; f_rows = 5; } if (field.val === '') field.val = field.expl; // properties props.rows = f_rows; props.cols = f_cols; props.name = f_name; return ac_custom_fields_bubble(Builder.node("textarea", props, [ Builder._text(field.val) ]), field); case 3: // Checkbox if (field.val === '') field.val = field.onfocus; // properties props.type = "checkbox"; props.name = f_name; props.value = "checked"; if (field.val == "checked") props.checked = "true"; return Builder.node( "span", [ Builder.node("input", { type: "hidden", name: f_name, value: "unchecked" }), ac_custom_fields_bubble(Builder.node("input", props), field) ] ); case 4: // Radio button(s) if (field.val === '') field.val = field.onfocus; var f_ary = new Array(); f_ary.push(Builder.node("input", { type: "hidden", name: f_name, value: "unchecked" })); field.expl = field.expl.replace(/\r?\n/g, "||"); var list = field.expl.split("||"); for (var i = 0; i -1) { f_opt.checked = "true"; found = true; } f_ary.push(ac_custom_fields_bubble(Builder.node("label", { className: "cFieldCheckboxGroup" }), field)); f_ary.push(Builder.node("input", f_opt, [ Builder._text(list[i+0]) ])); f_ary.push(Builder._text(list[i])); } return Builder.node("div", f_ary); default: break; } return Builder._text("Sorry! Unknown field"); } var ACCustomFields = null; var ACCustomFieldsObj = null; var ACCustomFieldsResult = {}; /* CUSTOM FIELDS OBJECT */ if (typeof Class != "undefined") { ACCustomFields = Class.create(); ACCustomFields.prototype = { // Make this true if you want hidden fields to be displayed (as text fields). showhidden: false, initialize: function(props) { if ( !props ) props = { }; // if checkboxes are used, it will preserve the selection in this array this.selection = []; // this array holds the current relations list (RELIDs) this.rels = ( !props.rels ? [] : props.rels ); // this array holds all handlers for ajax response // index is updating object id, and value is the type of list we'll build there // options for type are: // display (shows fields), // list (gives a list of fields with checkboxes), // pers (builds a personalization dropdown) this.handlers = {}; // sourceType is determining what is holding the RELIDs. // can be SELECT or CHECKBOX // default: SELECT this.sourceType = ( !props.sourceType ? 'SELECT' : props.sourceType ); // which SELECT object is holding the list of RELIDs // which DIV object is holding the list of RELID checkboxes this.sourceId = ( !props.sourceId ? 'parentsList' : props.sourceId ); // what is the name of CHECKBOXES that hold RELIDs this.sourceName = ( !props.sourceName ? 'p[]' : props.sourceName ); // which API function to call this.api = ( !props.api ? 'list.list_field_update' : props.api ); // which index in API response holds fields array this.responseIndex = ( !props.responseIndex ? 'row' : props.responseIndex ); // any additional handlers (for some other data)? this.additionalHandler = ( !props.additionalHandler ? null : props.additionalHandler ); // if global custom fields should be fetched or not this.includeGlobals = ( !props.includeGlobals ? 0 : props.includeGlobals ); // if some custom param should be sent this.apiParam = ( !props.apiParam? '' : props.apiParam ); }, addHandler: function(targetId, type) { this.handlers[targetId] = type; }, addCustomHandler: function(targetId, func, responseIndex) { this.handlers[targetId] = { func: func, responseIndex: responseIndex}; }, removeHandler: function(targetId) { if (typeof this.handlers[targetId] != "undefined") delete this.handlers[targetId]; }, fetch: function(id) { // fetch relation ids if ( this.sourceType == 'SELECT' ) { this.rels = ac_form_select_extract($(this.sourceId)); } else if ( this.sourceType == 'CHECKBOX' ) { this.rels = ac_form_check_selection_get($(this.sourceId), this.sourceName); } else if ( this.sourceType != 'STATIC' ) { this.rels = []; } ACCustomFieldsObj = this; ac_ui_api_call(jsLoading); ac_ajax_call_cb('api.php', this.api, this.handle, id, this.rels.join('-'), this.includeGlobals, this.apiParam); somethingChanged = true; }, handle: function(xml) { // need to use ACCustomFieldsObj instead of this ( a copy used for callback ) var ary = ac_dom_read_node(xml); ac_ui_api_callback(); ACCustomFieldsResult = ary[ACCustomFieldsObj.responseIndex]; for ( var i in ACCustomFieldsObj.handlers ) { var type = ACCustomFieldsObj.handlers[i]; if ( typeof type != 'function' ) { var targetObj = $(i); if ( !targetObj ) targetObj = i; if ( typeof type.func == 'function' ) { if ( !type.responseIndex ) type.responseIndex = ACCustomFieldsObj.responseIndex; if ( !type.targetObj ) type.targetObj = targetObj; type.func(ary[type.responseIndex], type.targetObj); } else if ( type == 'list' ) { ACCustomFieldsObj.handleList(ACCustomFieldsResult, targetObj); } else if ( type == 'pers' ) { ACCustomFieldsObj.handlePersonalization(ACCustomFieldsResult, targetObj, 'tag'); } else if ( type == 'pers-with-id-values' ) { ACCustomFieldsObj.handlePersonalization(ACCustomFieldsResult, targetObj, 'id'); } else if ( type == 'display' ) { ACCustomFieldsObj.handleDisplay(ACCustomFieldsResult, targetObj); } else if ( typeof(type) == 'function' ) { type(ACCustomFieldsResult, targetObj); } } } if ( typeof(ACCustomFieldsObj.additionalHandler) == 'function') { ACCustomFieldsObj.additionalHandler(ary); } }, /* HANDLERS */ handleList: function(ary, rel) { ac_dom_remove_children(rel); var total = 0; if ( ary ) { for ( var i = 0; i 0 ) { rel.appendChild(Builder.node('optgroup', { label: strPersListFields }, nodesin)); } rel.selectedIndex = 0; //alert('handle personalization now!' + nodesin.length + rel.id); }, handleDisplay: function(ary, targetId) { var rel = $(targetId); ac_dom_remove_children(rel); var total = 0; var visible = 0; if ( ary ) { for ( var i = 0; i frameHeight-20 ) { frame.style.height = (docHeight+20) + "px"; } //MAKE SMALLER else if ( docHeight stop if ( ac_editor_mime_state[prfx] == 'text' && $(prfx + 'textField').value == '' ) { ac_editor_mime_switch(prfx, val); return false; } // it was html, and had no text -> stop if ( ac_editor_mime_state[prfx] == 'html' && ac_str_trim(strip_tags(ac_form_value_get($(prfx + 'Editor')))) == '' ) { ac_editor_mime_switch(prfx, val); return false; } // ask to confirm change if ( confirm(editorConfirmSwitch) ) { if ( ac_editor_mime_state[prfx] == 'text' ) { // it was text, copy it into HTML, add BRs ac_form_value_set($(prfx + 'Editor'), nl2br($(prfx + 'textField').value)); } else if ( ac_editor_mime_state[prfx] == 'html' ) { // it was HTML, copy it as text, strip tags var html = ac_form_value_get($(prfx + 'Editor')); html = html.replace(/[^/, ""); $(prfx + 'textField').value = ac_str_trim(strip_tags(html)); } else if ( ac_editor_mime_state[prfx] == 'mime' ) { // nothing here? } } else { return false; } // remove "convert html" from text box if text-only var rel = $(prfx + '_conv_html2text'); if ( rel ) { rel.className = ( val == 'text' ? 'ac_hidden' : 'ac_inline' ); } // do the actual change of editors now ac_editor_mime_switch(prfx, val); } return false; } function ac_editor_mime_switch(prfx, val) { $(prfx + 'text').className = ( !val || val == 'html' ? 'ac_hidden' : 'ac_block' ); $(prfx + 'html').className = ( !val || val == 'text' ? 'ac_hidden' : 'ac_block' ); ac_editor_mime_state[prfx] = val; } function ac_editor_mime_toggle(prfx, show) { var type = $(prfx + 'formatField').value; $(prfx + 'table').className = ( !show ? 'ac_hidden' : 'ac_table_rowgroup' ); if ( $(prfx + 'attachments') ) { $(prfx + 'attachments').className = ( !show ? 'ac_hidden' : 'ac_block' ); } ac_editor_mime_switch(prfx, ( show ? type : false )); } // uses variable ACCustomFieldsResult function ac_editor_personalize_render(c, m) { //ACCustomFieldsResult var sub; m.add({ title : 'Some item 1', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 1'); } }); m.add({ title : 'Some item 2', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 2'); } }); //m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1); sub = m.addMenu({ title : 'Some item 3' }); sub.add({ title : 'Some item 3.1', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 3.1'); } }); sub.add({ title : 'Some item 3.2', onclick : function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, 'Some item 3.2'); } }); } var editorTemplates = []; function ac_editor_template_render(c, m) { var sub; var tpl = { html: [], text: [] }; var globals = { html: 0, text: 0 }; for ( var i in editorTemplates ) { var t = editorTemplates[i]; if ( typeof t != 'function' ) { if ( t.global == 1 ) { globals[t.format]++; } tpl[t.format].push(t); } } if ( tpl.html.length > 0 ) { //m.add({title : strPersSubscriberTags, 'class' : 'mceMenuItemTitle'}).setDisabled(1); if ( globals.html > 0 ) sub1 = m.addMenu({ title : strPersGlobalTemplates }); if ( tpl.html.length != globals.html ) sub2 = m.addMenu({ title : strPersListTemplates }); for ( var i = 0; i [^/, ""); sub1.add({ title : tpl.html[i].name, onclick : function(val) { return function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, val); } }(html) }); } else { var html = tpl.html[i].content; html = html.replace(/[^/, ""); sub2.add({ title : tpl.html[i].name, onclick : function(val) { return function() { tinyMCE.activeEditor.execCommand('mceInsertContent', false, val); } }(html) }); } } } else { alert('There are no templates in the system.'); } } function ac_editor_activerss_click() { alert('clicked!'); } function ac_editor_conditional_click() { alert('clicked!'); } function ac_editor_insert(editorID, value) { if ( ac_editor_is(editorID) ) { var editor = tinyMCE.get(editorID); editor.execCommand('mceInsertContent', false, value); //tinyMCE.execCommand('mceInsertContent', false, value); } else { ac_form_insert_cursor($(editorID), value); } } // form.js // u push an id of a holder object (doesn't have to be a form), and it returns an object with all form elements function ac_form_post(id) { var ary = { }; var form = $(id); /* INPUTS */ var elements = form.getElementsByTagName('input'); for ( var i = 0; i 0 && name.indexOf(']') > 0 && name.indexOf('[') 0; if (autoInc) name = name.substr(0, name.indexOf('[]')); else name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_value_get(el); } else { ary[name] = ac_form_value_get(el); } } /* TEXT AREAS */ var elements = form.getElementsByTagName('textarea'); for ( var i = 0; i 0 && name.indexOf(']') > 0 && name.indexOf('[') 0; name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_value_get(el); } else { ary[name] = ac_form_value_get(el); } } /* SELECTS */ var elements = form.getElementsByTagName('select'); for ( var i = 0; i 0 && name.indexOf(']') > 0 && name.indexOf('[') /*+ 1*/ 0; name = name.substr(0, name.indexOf('[')); if ( typeof(ary[name]) == 'undefined' ) { ary[name] = ( autoInc ? [ ] : { } ); } var aryIndex = ( autoInc ? ary[name].length : el.name.match(/\[(.*)\]/)[1] ); ary[name][aryIndex] = ac_form_select_extract(el); } else { ary[name] = ac_form_select_extract(el); } } // that's all form elements return ary; } // if 'input' tag would be posted function ac_form_input_ok(el) { if ( !el.name ) return false; if ( el.type == 'button' ) return false; if ( el.type == 'reset' ) return false; if ( el.type == 'image' ) return false; if ( el.type == 'file' ) return false; if ( el.type == 'radio' && !el.checked ) return false; if ( el.type == 'checkbox' && !el.checked ) return false; return true; } // extract a value of 'select' tag // multiple returns array, regular just a string value function ac_form_select_extract(el) { var multi = ( typeof(el.multiple) != 'undefined' && el.multiple ); if ( !multi ) return el.value; var ary = [ ]; var options = el.getElementsByTagName('option'); for ( var i = 0; i 1 ); // now start switching xPageHolder.className = ( xpage ? 'ac_inline' : 'ac_hidden' ); if ( !allChecker.checked || paginators[1].linksCnt == 1 ) selectAllSwitch = false; /*selectXPageAllAll*/ spans[0].className = ( selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllPage*/ spans[1].className = ( !selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllLink*/ hrefs[0].className = ( !selectAllSwitch ? 'ac_inline' : 'ac_hidden' ); /*selectXPageAllCount*/ spans[2].innerHTML = paginators[1].total; } // this function sets "select all cross-page" flag function ac_form_check_selection_xpage(xPageHolder) { selectAllSwitch = true; // get sub-element references var spans = xPageHolder.getElementsByTagName('span'); var hrefs = xPageHolder.getElementsByTagName('a'); if ( spans.length != 3 || hrefs.length != 1 ) return; spans[0].className = 'ac_inline'; spans[1].className = 'ac_hidden'; hrefs[0].className = 'ac_hidden'; return false; } // check if anything is selected // used on LIST form submission checks // screams if button is pressed and no items are listed or if nothing is selected // has option to let thru (to act as SELECT ALL!!!) if last param is string message and not null function ac_form_check_selection_check(daddy, fieldName, jsNothingSelected, jsNothingFound, jsNothingSelectedButContinue) { // check if anything is selected var inputs = daddy.getElementsByTagName('input'); var checked = 0; var total = 0; for ( var i = 0; i 0 ) selection.push(inputs[i].value); } } } return selection; } function ac_form_check_selection_set(daddy, fieldName, arr) { var inputs = daddy.getElementsByTagName('input'); for ( var i = 0; i 0 ) { if ( !el[0].disabled ) el[0].selected = true; for ( var i = 1; i 0 && uploadList.getElementsByTagName('input').length == upload_limit ) { var uploadForm = daddy.getElementById(upload_id + '_iframe'); uploadForm.className = 'ac_hidden'; } } var ac_form_upload_remove_timers = {}; function ac_form_upload_remove(rel, action) { var id = rel.id; var val = rel.value; // just set a timer for 5 seconds. then we will remove it if still unchecked if ( rel.checked ) { if ( ac_form_upload_remove_timers[id] ) window.clearTimeout(ac_form_upload_remove_timers[id]); } else { ac_form_upload_remove_timers[id] = window.setTimeout("ac_form_upload_remove_call('" + id + "', '" + action + "')", 5 * 1000); } return true; } function ac_form_upload_remove_call(id, action) { var rel = $(id); if ( !rel ) return; if ( rel.checked ) return; // stop if he checked it again var val = rel.value; // clear timer if still on if ( ac_form_upload_remove_timers[id] ) window.clearTimeout(ac_form_upload_remove_timers[id]); // do a call ac_ui_api_call(jsDeleting); ac_ajax_call_cb('api.php', action, ac_form_upload_remove_real_callback, val); } function ac_form_upload_remove_real_callback(xml, txt) { var ary = ac_dom_read_node(xml, null); ac_ui_api_callback(); if ( ary.succeeded && ary.succeeded == 1 ) { // if checkbox found, remove it var rel = $('upload_check_holder_' + ary.id); if ( rel ) { var reldaddy = rel.parentNode; reldaddy.removeChild(rel); // re-show the form var uploadForm = reldaddy.parentNode.getElementsByTagName('iframe')[0]; if ( uploadForm.className == 'ac_hidden' ) uploadForm.className = 'ac_upload_frame'; } window.parent.somethingChanged = true; ac_result_show(ary.message); } else { ac_error_show(ary.message); } } function ac_form_multicheck_get(id, isChecked) { var props = { name: "multi[]", type: "checkbox", value: id, onchange: "ac_form_check_selection_none(this, $('acSelectAllCheckbox'));" }; if ( isChecked ) props.checked = true; return Builder.node('input', props); } function ac_form_disable(id, flag) { var rel = $(id); if ( !rel ) return; // inputs var fields = rel.getElementsByTagName('input'); for ( var i = 0; i 0 ? parseInt(obj.cols, 10) : 70 ); // how many lines in this text var lines = obj.value.split("\n"); // that is our basic count var count = lines.length; // if wrapping is off if ( !obj.wrap || obj.wrap != 'off' ) { // break lines by columns and add the number of wrapped ones for ( var i = 0; i rows ) { // if more lines in text than lines per increment var height = Math.ceil(count / rows) * incrementValue; if ( maxHeight != 0 && height > maxHeight ) height = maxHeight; obj.style.height = height + 'px'; } else { // if less lines in text than lines per increment // set minimal (1 incrementValue) obj.style.height = incrementValue + 'px'; } } var ACTable = Class.create(); ACTable.prototype = { initialize: function() { this.cols = []; this.selection = []; }, setcol: function(i, cb) { if ( !cb && typeof(i) == 'function' ) cb = i; if ( isNaN(parseInt(i)) ) i = this.cols.length; this.cols[i] = cb; }, addcol: function(cb) { this.cols.push(cb); }, // Unset column index. Use this function if there is a case that you would // want to omit a certain column from being displayed. unsetcol: function(index) { if (typeof this.cols[index] != "undefined") this.cols.splice(index, 1); }, newrow: function(row) { var tds = []; var td = null; var sub = null; for (var i = 0; i = tds.length) break; ac_dom_remove_children(tds[i]); sub = this.cols[i](row, tds[i]); if ( typeof sub == "string" || typeof sub == "number" ) sub = Builder._text(sub); tds[i].appendChild(sub); } // Just to be safe, make sure the row is visible row.className = "ac_table_row"; } }; // ihook.js var ac_ihook_table = { }; function ac_ihook_define(key, func) { if ( !ac_ihook_exists(key) ) { ac_ihook_table[key] = [ ]; } ac_ihook_table[key].push(func); } function ac_ihook_undefine(key, func) { if ( ac_ihook_exists(key) ) { for ( var i = 0; ac_ihook_table[key].length; i++ ) { if ( ac_ihook_table[key][i] == func ) { ac_ihook_table[key].splice(i, 1); return; } } } } function ac_ihook_exists(key) { return typeof ac_ihook_table[key] != 'undefined'; } function ac_ihook(key, param) { var r = null; if ( ac_ihook_exists(key) ) { for ( var i in ac_ihook_table[key] ) { if ( !isNaN(parseInt(i)) ) { var func = ac_ihook_table[key][i]; if ( typeof func == 'function' ) { r = func(param); } } } } return r; } // progressbar.js var ac_progress_bars = { }; var ac_progress_timers = { }; var ac_progress_ongoing = { }; function ac_progressbar_register(divid, processid, initialValue, secondInterval, spawn, func) { var rel = $(divid); if ( !rel ) return; if ( !secondInterval || isNaN(secondInterval) ) { secondInterval = 0; } spawn = ( spawn ? 1 : 0 ); // save this process to this div bar ac_progressbar_init(divid, initialValue); ac_progress_bars[divid] = processid; if ( secondInterval > 0 ) { if ( typeof ac_progress_timers[processid] == 'undefined' ) { ac_progress_timers[processid] = window.setInterval( function() { if ( typeof ac_progress_ongoing[processid] != 'undefined' ) return; ac_progress_ongoing[processid] = 1; // make an ajax call that should set all divs with new value for this process ac_ajax_call_cb( apipath, "process!ac_progressbar_update", function(xml) { var ary = ac_dom_read_node(xml); if ( !ary.id /*|| !ary.percentage*/ ) { ac_progressbar_unregister(divid); return; } if ( typeof ac_progress_ongoing[processid] != 'undefined' ) { delete ac_progress_ongoing[processid]; } //if ( !ary.id ) return; //if ( !ary.percentage ) return; for ( var i in ac_progress_bars ) { var rel = $(i); if ( !rel ) continue; if ( ac_progress_bars[i] != ary.id ) continue; ac_progressbar_set(i, ary.percentage); if ( ary.remaining == 0 ) { ac_progressbar_unregister(i); } } if ( typeof func == 'function' ) { func(ary); } }, processid, spawn ); }, secondInterval * 1000 ); } } } function ac_progressbar_unregister(divid) { if ( typeof ac_progress_bars[divid] == 'undefined' ) return; var pid = ac_progress_bars[divid]; delete ac_progress_bars[divid]; if ( typeof ac_progress_timers[pid] == 'undefined' ) return; var found = false; for ( var i in ac_progress_bars ) { if ( ac_progress_bars[i] == pid ) { found = true; break; } } if ( !found ) { window.clearInterval(ac_progress_timers[pid]); delete ac_progress_timers[pid]; } } function ac_progressbar_init(divid, val) { if ( !val ) val = 0; var rel = $(divid); if ( !rel ) return; var value = ( Math.round(val * 100) / 100 ) + '%'; ac_dom_remove_children(rel); // add progress label rel.appendChild( Builder.node( 'div', { className: 'ac_progress_label', title: value }, [ Builder._text(value) ] ) ); // add progress bar rel.appendChild( Builder.node( 'div', { className: 'ac_progress_bar', style: 'width: ' + value, title: value } ) ); } function ac_progressbar_set(divid, val) { var rel = $(divid); if ( !rel ) { ac_progressbar_unregister(divid); return; } if ( !val ) val = 0; var divs = rel.getElementsByTagName('div'); if ( divs.length != 2 ) { ac_progressbar_init(divid); } // set label var lbl = divs[0]; lbl.title = ( Math.round(val * 100) / 100 ) + '%'; lbl.innerHTML = ( Math.round(val * 100) / 100 ) + '%'; // set bar var bar = divs[1]; bar.title = ( Math.round(val * 100) / 100 ) + '%'; bar.style.width = val + '%'; } } /* FILE ARCHIVED ON 00:54:49 Sep 12, 2010 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 23:46:02 May 01, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.564 exclusion.robots: 0.118 exclusion.robots.policy: 0.109 cdx.remote: 0.057 esindex: 0.009 LoadShardBlock: 1994.916 (3) PetaboxLoader3.datanode: 103.182 (4) PetaboxLoader3.resolve: 1840.104 (2) load_resource: 93.002 */



Images:

The images are downsized due to limited space here. The original dimensions may differ.
Click on the image to open it on a new tab.



Please close this window manually.