/* Ajax v1.6 */ Ajax = {}; Ajax.createRequest = function(method, url, async, callback) { this.request = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP"); if (async) { this.request.onreadystatechange = callback; } this.request.open(method, url, async); this.request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=ISO-8859-2'); this.request.send(url); } Ajax.checkReadyState = function(boxId) { var box; var text = (window.form && form.LANG_FILES_PROGRESS) ? form.LANG_FILES_PROGRESS.value : 'Töltés'; switch (this.request.readyState) { case 1: text += '.'; break; case 2: text += '..'; break; case 3: text += '...'; break; case 4: // (boxId == null || boxId == undefined || boxId == '') ? window.status = '' : document.getElementById(boxId).innerHTML = ''; (box = document.getElementById(boxId)) ? box.innerHTML = '' : window.status = ''; AjaxUpdater.isUpdating = false; return this.request.status; break; default: text = 'An unexpected error has occured!'; } (box = document.getElementById(boxId)) ? box.innerHTML = text : window.status = text; return 0; } Ajax.getResponse = function() { if (this.request.getResponseHeader('Content-Type').indexOf('xml') != -1) { return this.request.responseXML.documentElement; } else { return this.request.responseText; } } /* Ajax Updater */ AjaxUpdater = {}; AjaxUpdater.init = function() { this.isUpdating = false; } AjaxUpdater.update = function(method, url, async, callback) { if (callback == undefined || callback == '') { callback = this.onResponse; } Ajax.createRequest(method, url, async, callback); this.isUpdating = true; } AjaxUpdater.onResponse = function() { var s = Ajax.checkReadyState('requestStatus'); if (s == 200) { var r = Ajax.getResponse(); if (r != '') { alert(r); } } else if (s > 0) { alert(HTTP.status(s)); } } AjaxUpdater.init(); /* DOMEditor v2.1 */ DOMEditor = {}; DOMEditor.createElement = function(tag, obj) { var property; var element = document.createElement(tag); if (obj != undefined && obj != '') { /*@cc_on @if (@_jscript) // IE BUG if (obj['name'] || obj['type']) { var html = '<' + tag; var attr = ['name', 'type']; for(var i=0; i'; } element = document.createElement(html); } /*@end @*/ for (property in obj) { try { element[property] = obj[property]; } catch(e) { //alert("DOMEditor.createElement : objektum tulajdonság megadása nem megengedett!\n" + element.tagName + '.' + property); element.setAttribute(property, obj[property]); } } } return element; } DOMEditor.checkNode = function(value) { if (typeof value == "string") { return document.getElementById(value); } return value; } DOMEditor.append = function(target) { if (arguments.length > 1) { target = this.checkNode(target); if (target == null) { return null; } for (var i=1; i 0) { alert(HTTP.status(s)); } } */ function errorHandler(text, url, lineNr) { var txt = 'Hiba: ' + text + "\n Sor: " + lineNr + "\n"; txt += "\n" + url; var E = new MyError(txt); if (document.forms[0].DEBUGGING) { E.alert(); } else { if (url && url.indexOf('inc/js/') >= 0) { E.errorFeedback(); } } return true; } window.onerror = errorHandler; function MyError(message){ this.message = (message) ? message : ''; this.sysAlert = (!window.ModalWindow); if (!(this.sysAlert || Error.prototype.EWin)) { Error.prototype.EWin = new ModalWindow('_ErrorWindow'); } } MyError.prototype = new Error(); Error.prototype.isError = false; Error.prototype.errList = []; Error.prototype.EWin = false; Error.prototype.errorFeedback = function() { if (window.AjaxUpdater) { AjaxUpdater.update('POST', '_error/feedback.php?msg=' + escape(this.message.replace(/\n/gm, '
')), true); } } Error.prototype.add = function(txt, input) { this.errList.push([txt, input]); this.isError = true; } Error.prototype.show = function() { if (this.errList.length > 0) { var err; for(var i=0; i'), 'Hiba!', 0, 0); Error.prototype.EWin.show(); } } Error.prototype.clear = function() { var err; for(var i=0; i<\/scr"+"ipt>"); script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") init(); // call the onload handler }; /*@end @*/ // for Safari if (/WebKit/i.test(navigator.userAgent)) { // sniff load_timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)) init(); // call the onload handler }, 10); } // for other browsers set the window.onload, but also execute the old window.onload old_onload = window.onload; window.onload = function() { init(); if (old_onload) old_onload(); }; } load_events.push(func); } })(); function _globalOnLoad() { E = new MyError(); form = document.forms[0]; var obj, i; if (obj = document.getElementById('spamdetect')) { form.robot_email.value = 'yes'; obj.style.display = 'none'; } obj = document.getElementsByTagName('a'); for (i=0; i