PageSourceSearch

https://u-szeged.hu/js/webra3.js?ts=1549457782

js u-szeged.hu collected 2026-09-24 08:36:32 UTC 69,964 bytes, 1,838 lines download raw bytes

1if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
2	window.attachEvent("onload", alphaBackgrounds);
3	window.attachEvent("onload", antiFlickeringOn);
4	window.attachEvent("onunload", antiFlickeringOut);
5}
6
7// XMLHTTP IMPLEMENTATION ---------------------------------------------------------------------------------------------------
8// used to find the Automation server name
9function getDomDocumentPrefix() {
10	if (getDomDocumentPrefix.prefix)
11		return getDomDocumentPrefix.prefix;
12	
13	var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
14	var o;
15	for (var i = 0; i < prefixes.length; i++) {
16		try {
17			// try to create the objects
18	
19			o = new ActiveXObject(prefixes[i] + ".DomDocument");
20			return getDomDocumentPrefix.prefix = prefixes[i];
21		}
22		catch (ex) {};
23	}
24	
25	throw new Error("Could not find an installed XML parser");
26}
27
28function getXmlHttpPrefix() {
29	if (getXmlHttpPrefix.prefix)
30		return getXmlHttpPrefix.prefix;
31	
32	var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
33	var o;
34	for (var i = 0; i < prefixes.length; i++) {
35		try {
36			// try to create the objects
37			o = new ActiveXObject(prefixes[i] + ".XmlHttp");
38			return getXmlHttpPrefix.prefix = prefixes[i];
39		}
40		catch (ex) {};
41	}
42	
43	throw new Error("Could not find an installed XML parser");
44}
45
46//////////////////////////
47// Start the Real stuff //
48//////////////////////////
49
50// XmlHttp factory
51function XmlHttp() {}
52
53XmlHttp.create = function () {
54	try {
55		if (window.XMLHttpRequest) {
56			var req = new XMLHttpRequest();
57			
58			// some versions of Moz do not support the readyState property
59			// and the onreadystate event so we patch it!
60			if (req.readyState == null) {
61				req.readyState = 1;
62				req.addEventListener("load", function () {
63					req.readyState = 4;
64					if (typeof req.onreadystatechange == "function")
65						req.onreadystatechange();
66				}, false);
67			}
68			
69			return req;
70		}
71		if (window.ActiveXObject) {
72			return new ActiveXObject(getXmlHttpPrefix() + ".XmlHttp");
73		}
74	}
75	catch (ex) {}
76	// fell through
77	throw new Error("Your browser does not support XmlHttp objects");
78};
79
80// XmlDocument factory
81function XmlDocument() {}
82
83XmlDocument.create = function () {
84	try {
85		// DOM2
86		if (document.implementation && document.implementation.createDocument) {
87			var doc = document.implementation.createDocument("", "", null);
88			
89			// some versions of Moz do not support the readyState property
90			// and the onreadystate event so we patch it!
91			if (doc.readyState == null) {
92				doc.readyState = 1;
93				doc.addEventListener("load", function () {
94					doc.readyState = 4;
95					if (typeof doc.onreadystatechange == "function")
96						doc.onreadystatechange();
97				}, false);
98			}
99			return doc;
100		}
101		if (window.ActiveXObject)
102			return new ActiveXObject(getDomDocumentPrefix() + ".DomDocument");
103	}
104	catch (ex) {}
105	throw new Error("Your browser does not support XmlDocument objects");
106};
107
108// Create the loadXML method and xml getter for Mozilla
109if (window.DOMParser && window.XMLSerializer && window.Node && Node.prototype && Node.prototype.__defineGetter__) {
110
111	// XMLDocument did not extend the Document interface in some versions
112	// of Mozilla. Extend both!
113	XMLDocument.prototype.loadXML = Document.prototype.loadXML = function (s) {
114		
115		// parse the string to a new doc	
116		var doc2 = (new DOMParser()).parseFromString(s, "text/xml");
117		
118		// remove all initial children
119		while (this.hasChildNodes()) {
120			this.removeChild(this.lastChild);
121		}
122			
123		// insert and import nodes
124		for (var i = 0; i < doc2.childNodes.length; i++) {
125			this.appendChild(this.importNode(doc2.childNodes[i], true));
126		}
127	};
128	
129	
130	//
131	// xml getter
132	//
133	// This serializes the DOM tree to an XML String
134	//
135	// Usage: var sXml = oNode.xml
136	//
137	// XMLDocument did not extend the Document interface in some versions
138	// of Mozilla. Extend both!
139	XMLDocument.prototype.__defineGetter__("xml", function () {
140		return (new XMLSerializer()).serializeToString(this);
141	});
142	Document.prototype.__defineGetter__("xml", function () {
143		return (new XMLSerializer()).serializeToString(this);
144	});
145}
146
147// ^^^^^ XMLHTTP IMPLEMENTATION ---------------------------------------------------------------------------------------------------
148
149// XMLHTTP REQUEST MANAGEMENT -----------------------------------------------------------------------------------------------------
150
151var requestPool = Array();
152
153function isArray(obj) {
154	if (obj.constructor.toString().indexOf("Array") == -1)
155		return false;
156	else
157		return true;
158}
159
160/**/
161function addRequest(requestURL, callBack, postParams, callbackParams, name) {
162	Aitia.Ajax.addRequest({
163		requestURL: requestURL, 
164		callBack: callBack, 
165		postParams: postParams, 
166		callbackParams:callbackParams, 
167		name:name});
168}
169/**/
170
171// xmlhttp kérést ad a sorba
172// param: URL, ?a visszah?nd??ggv? neve, aminek egy argumentumja a visszat?si ??(string) legyen
173function addRequest0(requestURL, callBack, postParams, callbackParams, name) {
174
175//debugWriteLn(requestURL+' '+callBack);
176	if (!postParams) {
177		postParams = Array();
178	}
179	if (!callbackParams) {
180		callbackParams = Array();
181	}
182	if (name) {
183		for (var i = 0; i < requestPool.length; i++) {
184			if(requestPool[i][4] == name) {
185				requestPool[i][4] = "webra_deactivated";
186			}
187		}
188	}
189	else {
190		name = '';
191	}
192	requestPool.push(Array(requestURL, callBack, postParams, callbackParams, name));
193	if (requestPool.length == 1) {
194		processRequest();
195	}
196}
197
198/**
199 * Elmenti a legutóbb használt objetumok közé a megadott objektumot.
200 * 
201 * @author Kocsis Róbert
202 * 
203 * ChangeLog:
204 * - 2007.09.10, Szabó Csaba
205 * Ellenőrzi, hogy létezik e a callback függvény és csak akkor hívja meg.
206 */
207function processRequest() {
208	var xmlHttp2 = XmlHttp.create();
209	if (requestPool.length > 0 && requestPool[0][4] != "webra_deactivated") {
210		if (!requestPool[0][0]) {
211			requestPool.shift();
212			processRequest();
213			return;
214		}
215		xmlHttp2.open("POST", requestPool[0][0], true);
216		xmlHttp2.onreadystatechange = function () {
217			if (xmlHttp2.readyState == 4) {
218				var request = requestPool[0];
219				if (request[1] && request[1].length>0) {
220					var callbackParams = request[3];
221					
222					//Ellenőrzi, hogy létezik e a callBack függvény
223					var callbackExists = false;
224					if (request[1] && request[1] != "" && request[4]!="webra_deactivated") {
225						eval("callbackExists = (window." + request[1] + ");");
226					}
227					
228					// Ha létezik a callback fv
229					if (callbackExists && request[4]!="webra_deactivated") {
230						var s = request[1] + "('" + escape(xmlHttp2.responseText) + "', callbackParams);";
231						eval(s);
232					}
233				}
234				
235				loadingIndicator(0);
236				xmlHttp2.abort();
237				requestPool.shift();
238				processRequest();
239			}
240		}
241		var postData = '&webraRequestType=xmlhttp';
242		for (var i = 0; i < requestPool[0][2].length; i++) {
243			if (requestPool[0][2][i][0]) {
244				postData += '&' + requestPool[0][2][i][0] + '=' + encodeURIComponent(requestPool[0][2][i][1]);
245			}
246		}
247		var contentlength = postData.length - 1;
248		if (contentlength < 0) {
249			contentlength = 0;
250		}
251		postData = postData.replace(/^&/, '?&');
252		_postData = postData
253		xmlHttp2.setRequestHeader("Accept", "text/html");
254		xmlHttp2.setRequestHeader("Accept-charset", "utf-8");
255		xmlHttp2.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
256		xmlHttp2.setRequestHeader("Content-Length",contentlength);
257		xmlHttp2.setRequestHeader("Content-Disposition","form-data; name=W3");
258		xmlHttp2.setRequestHeader("Connection","close");
259		//alert(requestPool[0][0] + " - " + postData + " - " + requestPool[0][1]);
260		
261		loadingIndicator(1);
262		xmlHttp2.send(postData);
263	}
264	else if (requestPool.length > 0) {
265		requestPool.shift();
266		processRequest();
267	}
268} //processRequest
269
270
271/**
272 * Direkt xmlHttp kérés (a W3 kjút megkerülve)
273 * 
274 * @author Szabó Csaba
275 * @date 2007.12.13
276 */
277function processXmlHttpRequest(requestUrl, callBack, postParams, callbackParams, async) {
278	var async = 1; // a szinkron művelet nem támogatott
279
280	var xmlHttp2 = XmlHttp.create();
281	xmlHttp2.open("POST", requestUrl, async == 1 ? true : false);
282	
283	xmlHttp2.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
284	xmlHttp2.setRequestHeader("Accept", "text/html");
285	xmlHttp2.setRequestHeader("Accept-charset", "utf-8");
286	
287	if (async == 1) {
288		xmlHttp2.onreadystatechange = function () {
289			if (xmlHttp2.readyState == 4) {
290				//Ellenőrzi, hogy létezik e a callBack függvény
291				var callbackExists = false;
292				if (callBack && callBack != "") {
293					eval("callbackExists = (window." + callBack + ");");
294				}
295
296				// Ha létezik a callback fv
297				if (callbackExists) {
298					var s = request[1]+"('"+escape(xmlHttp2.responseText)+"', callbackParams);";
299					eval(s);
300				}
301			}
302			xmlHttp2.abort();
303		}
304	}
305	
306	var postData = '&webraRequestType=xmlhttp';
307	for (var i = 0; i < postParams.length; i++) {
308		if (postParams[i][0]) {
309			postData += '&' + postParams[i][0] + '=' + encodeURIComponent(postParams[i][1]);
310		}
311	}
312	xmlHttp2.send(postData);
313	
314	if (!async) {
315		return xmlHttp2.responseText;
316	}
317} // end processXmlHttpRequest
318
319
320// ^^^^^ XMLHTTP REQUEST MANAGEMENT -----------------------------------------------------------------------------------------------
321
322var divTimer = null;
323var divTimer2 = null;
324var openDiv = '';
325var openDiv2 = '';
326var messageTimer = null;
327var lastSearchString = '';
328var lastSendSearchString = '';
329var searchTimer = null;
330
331function showDiv(divId, subdiv) {
332	if (subdiv == 1) {
333		clearDivCloseTimer();
334		if (document.getElementById(divId)) {
335			hideDiv(openDiv2,1)
336			document.getElementById(divId).style.display = 'block';
337			openDiv2 = divId;
338		}
339	}
340	else {
341		clearDivCloseTimer();
342		hideDiv(openDiv);
343		if (document.getElementById(divId)) {
344			document.getElementById(divId).style.display = 'block';
345			openDiv = divId;
346		}
347	}
348}
349
350function hideDiv(divId,subdiv) {
351	if (!divId) {
352		return null;
353	}
354	
355	if (subdiv == 1) {
356		if (document.getElementById(divId)) {
357			document.getElementById(divId).style.display = 'none';
358			openDiv2 = '';
359		}
360	}
361	else {
362		if (document.getElementById(divId)) {
363			document.getElementById(divId).style.display = 'none';
364			openDiv = '';
365		}
366	}
367}
368
369function setDivCloseTimer(divId, subdiv) {
370	clearDivCloseTimer(subdiv);
371	if (subdiv) {
372		divTimer2 = setTimeout("hideDiv('" + divId + "')", 1000);
373	}
374	else {
375		divTimer = setTimeout("hideDiv('" + divId + "')", 1000);
376	}
377}
378
379function setDivCloseTimerLong(divId) {
380	clearDivCloseTimer();
381	divTimer = setTimeout("hideDiv('" + divId + "')", 3000);
382}
383
384function clearDivCloseTimer(subdiv) {
385	if (subdiv == 1) {
386		if (divTimer2) {
387			clearTimeout(divTimer2);
388		}
389	}
390	else {
391		if (divTimer) {
392			clearTimeout(divTimer);
393		}
394	}
395}
396
397// Elemelrejtő és láthatóvá tevő függvények --------------------------
398// a fentiek globális változóit használják, de nincs subdiv, és display helyett visibility-vel manipulál
399function showElement(divId) {
400	clearHideElementTimer();
401	hideElement(openDiv);
402	if (document.getElementById(divId)) {
403		document.getElementById(divId).style.visibility = 'visible';
404		openDiv = divId;
405	}
406}
407
408function hideElement(divId) {
409	var collapse = 0;
410	var argv = hideElement.arguments;
411	if (argv) {
412		var argc = argv.length;
413		if (1 <= argc) {
414			collapse = argv[1];
415		}
416	}
417	
418	if (document.getElementById(divId)) {
419		if (collapse) {
420			document.getElementById(divId).style.display = 'none';
421		}
422		document.getElementById(divId).style.visibility = 'hidden';
423		openDiv = '';
424	}
425}
426
427function hideElementTimer(divId) {
428	var delay = 1000;
429	var collapse = 0;
430	var argv = hideElementTimer.arguments;
431	if (argv) {
432		var argc = argv.length;
433		if (1 <= argc) {
434			delay = argv[1];
435		}
436
437		var argc = argv.length;
438		if (2 <= argc) {
439			collapse = argv[2];
440		}
441	}
442
443	divTimer = setTimeout("hideElement('" + divId + "', '" + collapse + "')", delay);
444}
445
446function clearMakeHiddenTimer() {
447	if (divTimer) {
448		clearTimeout(divTimer);
449	}
450}
451
452// Elemelrejtő és láthatóvá tevő függvények vége ---------------------
453
454function refreshMessages(answerXML) {
455	var answer = unescape(answerXML);
456	if (document.getElementById('messageBoxContainer')) {
457		document.getElementById('messageBoxContainer').innerHTML = answer;
458		evalJS(answer);
459	}
460	initMessageTimer();
461}
462
463function evalGlobal(str) {
464	if ( window.execScript ) {
465		window.execScript(str);
466	}
467	else {
468		window.eval( str );
469		//eval.call( window, str );
470	}
471}
472
473function evalJS(responsetext, global, encode) {
474	if (!global) {
475		global = false;
476	}
477	if (!encode) {
478		encode = false;
479	}
480	var evalJSresult = false;
481	
482	// tartalomban levő js scriptek kivágása
483	// 0. lépés: mivel js-ben nincs 's' modifier (amitől a '.' illeszkedik a newline-ra), ezért a sortöréseket elimináljuk temporálisan
484	//responsetext=responsetext.replace(/[\r\n]/gi,'WeBrAnEwLiNeToKeN');
485	// 1. lépés: textarea-ban levő scriptek (pl cikk attribpanel szerkerszthető módban) /g nem volt jó (mert először a legnagyobb előfordulást cserélte) úgyhogy 5x cserélünk
486	responsetext = responsetext.replace(/<textarea[^>]*>[\s\S]*?<\/textarea>/ig, '');
487	// 3. lépés: sortörés vissza, hogy a js commentek ne öljék meg a kódokat
488	//responsetext=responsetext.replace(/WeBrAnEwLiNeToKeN/g,'\n');
489
490	//re = "/<script[^>]*>/i";
491	//re = eval(re);
492	var re = new RegExp("<script[^>]*>", "i")
493	//rre = "/<.script>/i";
494	//rre = eval(rre);
495	var rre = new RegExp("<.script[^>]*>", "i")
496	var a = responsetext.search(re);
497	while (a > -1) {
498		var b = responsetext.search(rre);
499		var js = responsetext.substring(a, b + 9);
500		var c = js.indexOf('>');
501		js = js.substring(c + 1, js.length - 9);
502		
503		if (encode) {
504			js = htmlSpecialCharsDecode(js);
505		}
506		
507		if (global) {
508			evalGlobal(js);
509		}
510		else {
511			eval(js);
512		}
513		responsetext = responsetext.substring(0, a) + responsetext.substring(b + 9);
514		a = responsetext.search(re);
515
516		evalJSresult = true;
517	}
518
519	//ha futtatott JS-t, akkor true, egyébként false
520	return evalJSresult;
521}
522
523function fastSearchManage() {
524	if (window.event && window.event.keyCode == 13) {
525		if (searchTimer) {
526			clearTimeout(searchTimer);
527			searchTimer = null;
528		}
529		if (document.getElementById('searchtext')) {
530			lastSendSearchString = document.getElementById('searchtext').value;
531		}
532		sendSearchRequest();
533	}
534	else {
535		if (document.getElementById('searchtext') && document.getElementById('searchtext').value.length > 1 && lastSearchString != document.getElementById('searchtext').value) {
536			if (searchTimer) {
537				clearTimeout(searchTimer);
538			}
539			searchTimer = setTimeout("fastSearchManageSend()", 1000);
540		}
541	}
542	if (document.getElementById('searchtext')) {
543		lastSearchString = document.getElementById('searchtext').value;
544	}
545}
546
547function fastSearchManageSend() {
548	if (document.getElementById('searchtext') && document.getElementById('searchtext').value.length > 1 && lastSearchString == document.getElementById('searchtext').value) {
549		lastSendSearchString = document.getElementById('searchtext').value;
550		sendSearchRequest();
551		fastSearchManage();
552	}
553}
554
555function refreshSearchResult(answerXML) {
556	var answer = unescape(answerXML);
557	if (document.getElementById('searchtext') && lastSendSearchString == document.getElementById('searchtext').value && document.getElementById('searchresult')) {
558		document.getElementById('searchresult').innerHTML = answer;
559		alphaBackgrounds();
560	}
561}
562
563function antiFlickeringOn() {
564	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
565	var itsAllGood = (rslt != null && Number(rslt[1]) >= 4);
566	
567	if (navigator.appName == "Microsoft Internet Explorer" && itsAllGood) {
568		//Csak akkor kell alkalmazni, ha IE4 vagy újabb
569		try {
570			document.execCommand('BackgroundImageCache', false, true);
571		} catch(e) {}
572	}
573}
574
575function antiFlickeringOut() {
576	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
577	var itsAllGood = (rslt != null && Number(rslt[1]) >= 4);
578	
579	if (navigator.appName == "Microsoft Internet Explorer" && itsAllGood ) {
580		//Csak akkor kell alkalmazni, ha IE4 vagy újabb
581		try {
582			document.execCommand('BackgroundImageCache', false, false);
583		} catch(e) {}
584	}
585}
586
587function alphaBackgrounds() {
588	/*
589	var ie5 = (navigator.userAgent.indexOf('MSIE 5') > 0) ? true : false;
590	var ie6 = (navigator.userAgent.indexOf('MSIE 6') > 0) ? true : false;
591	
592	if ( ie5 || ie6 ) {
593	*/
594	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
595	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
596	
597	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && itsAllGood ) {
598	//Csak akkor kell alkalmazni, ha IE5.5 vagy ujabb. Mozillán nem kell, mert alapbol tudja.
599
600		var argv = alphaBackgrounds.arguments;
601		if (argv) {
602			var argc = argv.length;
603			var elements = new Array('td', 'div');
604	
605			var root;
606			if (1<=argc && argv[0].nodeName ) {
607				root = argv[0];
608			}
609			else {
610				root = document;
611			}
612			
613			for (var x in elements) {
614				var tdList = root.getElementsByTagName(elements[x]);
615				//var regE = /\.png/i;
616				var regE = /img\/shadow\/[^\"\']*\.png/i;
617				for (var i = 0; i < tdList.length && i < 5000; i++) {
618					var bg = tdList[i].currentStyle.backgroundImage;
619					if (bg) {
620						//if ( bg.indexOf('.png') != -1 ) {
621						if (bg.search(regE) != -1) {
622							var pngbg = bg.substring(5, bg.length - 2);
623							//if (tdList[i].hasChildNodes() == false || (tdList[i].childNodes.length == 1 && tdList[i].firstChild.nodeType == 3)) {
624							if (tdList[i].className.indexOf("shadow") != -1) {
625								tdList[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+pngbg+"', sizingMethod='scale')";
626								tdList[i].style.backgroundImage = "url('')";
627							}
628						}
629					}
630				}
631			}
632		}
633	}
634}
635
636/**
637 * Eseménykezelők
638 */
639var webra_eventlisteners = new Array();
640 
641var WebraEventListener = {};
642
643WebraEventListener.add = function(eventType, handler) {
644	webra_eventlisteners.push({'eventType':eventType, 'handler':handler});
645}
646
647/**
648 * Üzenet kezelés a komponensek közt
649 */
650
651//komponensek nyilvántartása
652var webra_components = new Object();
653
654function msg_addComponent(compName, callbackFunction, callbackParams) {
655	if (compName) {
656		webra_components[compName] = new Object();
657		webra_components[compName]['compName'] = compName;
658		webra_components[compName]['callbackFunction'] = callbackFunction;
659		webra_components[compName]['callbackParams'] = callbackParams;
660	}
661}
662
663function msg_removeComponent(compName) {
664	webra_components[compName] = null;
665}
666
667function msg_send(msgSender, msgParams) {
668	// a toolbart futtatjuk utoljára, ezért kétszer fut a ciklus
669	for (i in webra_components) {
670		if (webra_components[i]['callbackParams'] && (webra_components[i]['callbackFunction'] != 'msgCallback_toolbar')) {
671			var c = "var r = " + webra_components[i]['callbackFunction'] + "(msgSender, msgParams, webra_components['" + i + "']['callbackParams']);";
672			eval(c);
673		}
674	}
675	for (i in webra_components) {
676		if (webra_components[i]['callbackParams'] && (webra_components[i]['callbackFunction'] == 'msgCallback_toolbar')) {
677			var c = "var r = " + webra_components[i]['callbackFunction'] + "(msgSender, msgParams, webra_components['" + i + "']['callbackParams']);";
678			eval(c);
679		}
680	}
681}
682
683//-----toolbar komponent--------
684function msgCallback_toolbar(msgSender, msgParams, callbackParams) {
685	if (typeof msgSender == "object") {
686		// ST-ben elem kijelölés esemény történt
687		if (msgSender.type == "sorttable" && (msgSender.event=="selectItem" || msgSender.event=="loadEmptyTable")) {
688			// Üzenet paraméterek
689			var i = callbackParams.length;
690			for (var j=0; j<msgParams.length; j++) {
691				callbackParams[i+j] = msgParams[j];
692			}
693			
694			//@todo: Ez a kódrész többes kijelölés esetén elküldi a toolbarnak az összes kijelölt elem adatait. Amíg ezt a szerver oldalon nem használjuk, addig felesleges, ezért kommenteztem.
695			/*
696			// Ha van több kijelölt elem, akkor összepakolva is át kell küldeni
697			var postParams = Array();
698			var stUniqueName = getParamValue(msgParams, "stParam_uniqueName");
699			var stObject = SortableTable.ST_getSorttableByName(stUniqueName);
700			if (stObject) {
701				var selectedData = stObject.ST_getMultiSelectedData();
702				if (selectedData && selectedData.length) {
703					postParams = SortableTable._packMultiSelectedData(selectedData);
704					postParams = setParamValue(postParams, "stParam_uniqueName", stUniqueName);
705				}
706			}
707
708			// Ha van többes kijelölés, akkor azokat az adatokat is átküldjük
709			var i = callbackParams.length;
710			for (var j=0; j<postParams.length; j++) {
711				callbackParams[i+j] = postParams[j];
712			}
713			*/
714
715			// Elküldi a kérést a szervernek
716			addRequest(webraMainURL, "toolbar_callback", callbackParams, callbackParams, "toolbar_reload");
717		}
718	}
719}
720
721function toolbar_callback(xmlHttpResponse, callbackParams) {
722	response = unescape(xmlHttpResponse);
723
724	if (document.getElementById("header_secondrow_left")) {
725		document.getElementById("header_secondrow_left").innerHTML = response;
726		evalJS(response);
727	}
728}
729//-----------------------------------
730
731
732/**
733 * Admin, attribútumpanel visszahívó függvénye
734 */
735function msgCallback_attributePanel(msgSender, msgParams, callbackParams) {
736	if (typeof msgSender == "object") {
737		// ST elem kijelölés
738		if (msgSender.type == "sorttable" && (msgSender.event=="selectItem" || msgSender.event=="loadEmptyTable")) {
739			// Üzenet paraméterek
740			var i = callbackParams.length;
741			for (var j = 0; j < msgParams.length; j++) {
742				callbackParams[i+j] = msgParams[j];
743			}
744			// Ha van több kijelölt elem, akkor összepakolva is át kell küldeni
745			var postParams = Array();
746			var stUniqueName = getParamValue(msgParams, "stParam_uniqueName");
747			var stObject = SortableTable.ST_getSorttableByName(stUniqueName);
748			if (stObject) {
749				var selectedData = stObject.ST_getMultiSelectedData();
750				if (selectedData && selectedData.length) {
751					postParams = SortableTable._packMultiSelectedData(selectedData);
752					postParams = setParamValue(postParams, "stParam_uniqueName", stUniqueName);
753				}
754			}
755			// Ha van többes kijelölés, akkor azokat az adatokat is átküldjük
756			var i = callbackParams.length;
757			for (var j = 0; j < postParams.length; j++) {
758				callbackParams[i + j] = postParams[j];
759			}
760			var run = true;
761			//ellenőrizzük a profilt, hogy kell-e újratölteni a panelt
762			if(typeof Aitia != "undefined" && typeof Aitia.User != "undefined") {
763				if(0 == Aitia.User.getPanel('right')) {
764					run = false;
765				}
766			}
767			
768			if(run) {
769				// Elküldi a kérést a szervernek
770				$$('#right_block form').each(function(f){
771					f.getElements().each(function(s){
772						s.disable();
773					});
774				});
775				Aitia.Ajax.addRequest({
776					requestURL:webraMainURL, 
777					callBack:'attributePanel_callback', 
778					postParams:callbackParams, 
779					callbackParams:callbackParams,
780					name: 'attributePanel_reload',
781					cache:true
782				});
783			}
784		}
785	}
786}
787
788function attributePanel_callback(xmlHttpResponse, callbackParams) {
789	response = unescape(xmlHttpResponse);
790	if (document.getElementById("right_block")) {
791		document.getElementById("right_block").innerHTML = response;
792		
793		// Kinyitja a jobb oldali panelt.
794		// KR: ne nyissa ki a csak a helpet tartalmazó fület, elég nagy heggesztés...
795		var openit = true;
796		if (document.getElementById('helplinkid')) {
797			openit = false;
798		}
799		if(openit) {
800			toggle_w3('center_right');
801		}
802		
803		//a méretet újra be kell állítani
804		resize_middle_div_heights();
805		evalJS(response);
806		Aitia.User.loadPanelBoxes();
807	}
808}
809
810function getParamValue(paramsArray, paramName) {
811	var paramValue = null;
812	
813	if (typeof paramsArray == "array" || typeof paramsArray == "object") {
814		for (var i = 0; i < paramsArray.length; i++) {
815			if (paramsArray[i][0] == paramName) {
816				paramValue = paramsArray[i][1];
817			}
818		}
819	}
820	return paramValue;
821}
822
823function setParamValue(paramsArray, paramName, paramValue) {
824	if (typeof paramsArray == "array" || typeof paramsArray == "object") {
825		var isSet = 0;
826		for (var i = 0; i < paramsArray.length; i++) {
827			if (paramsArray[i][0] == paramName) {
828				paramsArray[i][1] = paramValue;
829				isSet = 1;
830				break;
831			}
832		}
833		if (isSet != 1) {
834			paramsArray[paramsArray.length] = Array(paramName, paramValue);
835		}
836	}
837	else {
838		paramsArray	= new Array(Array(paramName, paramValue));
839	}
840
841	return paramsArray;
842}
843
844function removeParamValue(paramsArray, paramName) {
845	var paramIndex = -1;
846	
847	if (typeof paramsArray == "array" || typeof paramsArray == "object") {
848		for (var i = 0; i < paramsArray.length; i++) {
849			if (paramsArray[i][0] == paramName) {
850				paramIndex = i;
851			}
852		}
853	}
854
855	if ( paramIndex==-1 ) {
856		return paramsArray;
857	} else {
858		paramsArray.splice(paramIndex,1)
859		return paramsArray;
860	}
861}
862
863function addURLParam(url, param, value) {
864	var newurl = "";
865
866	url2 = new String(url);
867	arr = url2.split("#");
868
869	newurl = arr[0];
870
871	if (arr[0].indexOf("?") != -1) {
872		newurl += "&";
873	}
874	else {
875		newurl += "?";
876	}
877
878	newurl += encodeURIComponent(param) + "=" + encodeURIComponent(value);
879
880	if(arr[1]) {
881		newurl += "#" + arr[1];
882	}
883
884	return newurl;
885}
886
887
888
889/*
890function getElementsByClassName(cl, node) {
891	var retnode = [];
892	var myclass = new RegExp('\\b'+cl+'\\b');
893	var elem = node.getElementsByTagName('*');
894	for (var i = 0; i < elem.length; i++) {
895		var classes = elem[i].className;
896		if (myclass.test(classes)) retnode.push(elem[i]);
897	}
898	return retnode;
899}
900*/
901
902function createCookie(name, value, days) {
903	if (days) {
904		var date = new Date();
905		date.setTime(date.getTime() + (days*24*60*60*1000));
906		var expires = "; expires=" + date.toGMTString();
907	}
908	else {
909		expires = "";
910	}
911	document.cookie = name + "=" + value + expires + "; path=/";
912}
913
914function checkLoginUser() {
915	u = Aitia.Cookie.getCookie('lastuser');
916	if(u && '' != u) {
917		document.s.vch_login_username.value = u;
918		document.s.vch_login_password.focus();
919	}
920}
921
922function adminhelp_search(webraInstance, adminhelp_term) {
923	
924	if (document.getElementById('adminhelp_term').value && (document.getElementById('adminhelp_term').value) != '')	{
925		addRequest(webraMainURL + "?webraInstance="+webraInstance, 'adminhelp_callback', Array(Array("adminhelp_term", document.getElementById('adminhelp_term').value)));
926	}
927	else if ((adminhelp_term != 0) && adminhelp_term)	{
928		addRequest(webraMainURL + "?webraInstance="+webraInstance, 'adminhelp_callback', Array(Array("adminhelp_term", adminhelp_term)));
929	}
930	return false;
931}
932
933function adminhelp_search_details(webraInstance,article_id, article_title, adminhelp_term) {
934		addRequest(webraMainURL + "?webraInstance=" + webraInstance, 'adminhelp_callback', Array(Array("i_object_id", article_id), Array("title", article_title), Array("adminhelp_term", adminhelp_term)));
935		return false;
936}
937
938function adminhelp_callback(xmlHttpResponse) {		
939	response = unescape(xmlHttpResponse);
940	if (document.getElementById("adminhelp_container")) {
941		document.getElementById("adminhelp_container").innerHTML = response;
942		evalJS(response);
943	}		
944}
945
946function tidyFileName(fileName) {
947	fileName = fileName.substring(fileName.lastIndexOf('\\')+1);
948	
949	fileName = fileName.replace(/á/g, 'a');
950	fileName = fileName.replace(/é/g, 'e');
951	fileName = fileName.replace(/í/g, 'i');
952	fileName = fileName.replace(/ó/g, 'o');
953	fileName = fileName.replace(/ú/g, 'u');
954	fileName = fileName.replace(/ü/g, 'u');
955	fileName = fileName.replace(/ű/g, 'u');
956	fileName = fileName.replace(/ö/g, 'o');
957	fileName = fileName.replace(/ő/g, 'o');
958	fileName = fileName.replace(/Á/g, 'A');
959	fileName = fileName.replace(/É/g, 'E');
960	fileName = fileName.replace(/Í/g, 'I');
961	fileName = fileName.replace(/Ó/g, 'O');
962	fileName = fileName.replace(/Ú/g, 'U');
963	fileName = fileName.replace(/Ü/g, 'U');
964	fileName = fileName.replace(/Ű/g, 'U');
965	fileName = fileName.replace(/Ö/g, 'O');
966	fileName = fileName.replace(/Ő/g, 'O');
967	
968	fileName = fileName.replace(/ /g,'_');
969	
970	fileName = fileName.replace(/[^0-9a-zA-Z_\-\.]/g,'');
971	
972	fileName = trim(fileName.substring(0, 250));
973	
974	return fileName;
975}
976
977function checkFileName(filename,targetControl,titleControl) {
978	var newname = tidyFileName(filename);
979	
980	if (document.getElementById(targetControl)) {
981		document.getElementById(targetControl).value = newname;
982	}
983	
984	if (document.getElementById(titleControl) && document.getElementById(titleControl).value=='') {
985		newname = filename.substring(filename.lastIndexOf('\\')+1);
986		newname = newname.replace(/\.\w{1,6}$/gi,'');
987		newname = newname.replace(/^[\/\\]+/gi,'');
988		newname = newname.replace(/[\/\\]+$/gi,'');
989		
990		document.getElementById(titleControl).value = newname;
991		document.getElementById(titleControl).onblur();
992	}
993}
994
995function changeUploadFolder(param)
996{
997	var idx = param.id.replace("i_parentfolder_id", "").replace("_123456", "");
998
999	generateSmartURL_base(document.getElementById('i_parentfolder_id' + idx).value, document.getElementById('document_title' + idx).value, 'insert_vch_smarturl' + idx);
1000}
1001
1002SmartUrl_ReplaceCharsFrom = new Array('á', 'é', 'í', 'ó', 'ö', 'ő', 'ú', 'ü', 'ű', 'Á', 'É', 'Í', 'Ó', 'Ö', 'Ő', 'Ú', 'Ü', 'Ű');
1003
1004SmartUrl_ReplaceCharsTo = new Array('a', 'e', 'i', 'o', 'o', 'o', 'u', 'u', 'u', 'a', 'e', 'i', 'o', 'o', 'o', 'u', 'u', 'u');
1005
1006SmartUrl_DeniedWords = new Array('a', 'az', 'es', 'vagy', 'meg', 'tajekoztato', 'kozlemeny', 'palyazati', 'felhivas', 'eredmeny');
1007
1008SmartUrl_ReplaceUnicodeToEmptyFrom = new Array('%u2010', '%u2011', '%u2012', '%u2013', '%u2014', '%u2015', '%u2016', '%u2017', '%u2018', '%u2019', '%u201A', '%u201B', '%u201C', '%u201D', '%u201E', '%u201F', '%u2032', '%u2033', '%u2034', '%u2035', '%u2036', '%u2037', '%uFE50', '%uFE51', '%uFE59', '%uFE5A', '%uFE5B', '%uFE5C', '%uFE5D', '%uFE5E');
1009
1010SmartUrl_ReplaceUnicodeToEmptyTo = new Array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
1011
1012SmartUrl_ReplaceASCIIToASCIIFrom = new Array('%C0', '%C1', '%C2', '%C3', '%C4', '%C5', '%E0', '%E1', '%E2', '%E3', '%E4', '%E5', '%C7', '%E7', '%D0', '%F0', '%C8', '%C9', '%CA', '%CB', '%E8', '%E9', '%EA', '%EB', '%CC', '%CD', '%CE', '%CF', '%EC', '%ED', '%EE', '%EF', '%D1', '%F1', '%D2', '%D3', '%D4', '%D5', '%D6', '%D8', '%F2', '%F3', '%F4', '%F5', '%F6', '%F8', '%DF', '%D9', '%DA', '%DB', '%DC', '%F9', '%FA', '%FB', '%FC', '%DD', '%FD', '%FF', '%C6', '%E6');
1013
1014SmartUrl_ReplaceASCIIToASCIITo = new Array('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'c', 'd', 'd', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'n', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 's', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'y', 'y', 'y', 'ae', 'ae');
1015
1016SmartUrl_ReplaceUnicodeToASCIIFrom = new Array('%u00C0', '%u00C1', '%u00C2', '%u00C3', '%u00C4', '%u00C5', '%u00E0', '%u00E1', '%u00E2', '%u00E3', '%u00E4', '%u00E5', '%u0100', '%u0101', '%u0102', '%u0103', '%u0104', '%u0105', '%u01CD', '%u01CE', '%u01DE', '%u01DF', '%u01E0', '%u01E1', '%u01FA', '%u01FB', '%u0200', '%u0201', '%u0202', '%u0203', '%u0226', '%u0227', '%u023A', '%u0250', '%u04D0', '%u04D1', '%u1D2C', '%u1D43', '%u1D44', '%u1D8F', '%u1E00', '%u1E01', '%u1E9A', '%u1EA0', '%u1EA1', '%u1EA2', '%u1EA3', '%u1EA4', '%u1EA5', '%u1EA6', '%u1EA7', '%u1EA8', '%u1EA9', '%u1EAA', '%u1EAB', '%u1EAC', '%u1EAD', '%u1EAE', '%u1EAF', '%u1EB0', '%u1EB1', '%u1EB2', '%u1EB3', '%u1EB4', '%u1EB5', '%u1EB6', '%u1EB7', '%u2090', '%u2C65', '%u0180', '%u0181', '%u0182', '%u0183', '%u0243', '%u0253', '%u0299', '%u16D2', '%u1D03', '%u1D2E', '%u1D2F', '%u1D47', '%u1D6C', '%u1D80', '%u1E02', '%u1E03', '%u1E04', '%u1E05', '%u1E06', '%u1E07', '%u00C7', '%u00E7', '%u0106', '%u0107', '%u0108', '%u0109', '%u010A', '%u010B', '%u010C', '%u010D', '%u0187', '%u0188', '%u023B', '%u023C', '%u0255', '%u0297', '%u1D9C', '%u1D9D', '%u1E08', '%u1E09', '%u212D', '%u2184', '%u00D0', '%u00F0', '%u010E', '%u010F', '%u0110', '%u0111', '%u0189', '%u018A', '%u018B', '%u018C', '%u01C5', '%u01F2', '%u0221', '%u0256', '%u0257', '%u1D05', '%u1D30', '%u1D48', '%u1D6D', '%u1D81', '%u1D91', '%u1E0A', '%u1E0B', '%u1E0C', '%u1E0D', '%u1E0E', '%u1E0F', '%u1E10', '%u1E11', '%u1E12', '%u1E13', '%u00C8', '%u00C9', '%u00CA', '%u00CB', '%u00E8', '%u00E9', '%u00EA', '%u00EB', '%u0112', '%u0113', '%u0114', '%u0115', '%u0116', '%u0117', '%u0118', '%u0119', '%u011A', '%u011B', '%u018E', '%u0190', '%u01DD', '%u0204', '%u0205', '%u0206', '%u0207', '%u0228', '%u0229', '%u0246', '%u0247', '%u0258', '%u025B', '%u025C', '%u025D', '%u025E', '%u029A', '%u1D07', '%u1D08', '%u1D31', '%u1D32', '%u1D49', '%u1D4B', '%u1D4C', '%u1D92', '%u1D93', '%u1D94', '%u1D9F', '%u1E14', '%u1E15', '%u1E16', '%u1E17', '%u1E18', '%u1E19', '%u1E1A', '%u1E1B', '%u1E1C', '%u1E1D', '%u1EB8', '%u1EB9', '%u1EBA', '%u1EBB', '%u1EBC', '%u1EBD', '%u1EBE', '%u1EBF', '%u1EC0', '%u1EC1', '%u1EC2', '%u1EC3', '%u1EC4', '%u1EC5', '%u1EC6', '%u1EC7', '%u2091', '%u0191', '%u0192', '%u1D6E', '%u1D82', '%u1DA0', '%u1E1E', '%u1E1
1016F', '%u011C', '%u011D', '%u011E', '%u011F', '%u0120', '%u0121', '%u0122', '%u0123', '%u0193', '%u01E4', '%u01E5', '%u01E6', '%u01E7', '%u01F4', '%u01F5', '%u0260', '%u0261', '%u0262', '%u029B', '%u1D33', '%u1D4D', '%u1D77', '%u1D79', '%u1D83', '%u1DA2', '%u1E20', '%u1E21', '%u0124', '%u0125', '%u0126', '%u0127', '%u021E', '%u021F', '%u0265', '%u0266', '%u029C', '%u02AE', '%u02AF', '%u02B0', '%u02B1', '%u1D34', '%u1DA3', '%u1E22', '%u1E23', '%u1E24', '%u1E25', '%u1E26', '%u1E27', '%u1E28', '%u1E29', '%u1E2A', '%u1E2B', '%u1E96', '%u210C', '%u2C67', '%u2C68', '%u2C75', '%u2C76', '%u00CC', '%u00CD', '%u00CE', '%u00CF', '%u00EC', '%u00ED', '%u00EE', '%u00EF', '%u0128', '%u0129', '%u012A', '%u012B', '%u012C', '%u012D', '%u012E', '%u012F', '%u0130', '%u0131', '%u0197', '%u01CF', '%u01D0', '%u0208', '%u0209', '%u020A', '%u020B', '%u0268', '%u026A', '%u040D', '%u0418', '%u0419', '%u0438', '%u0439', '%u0456', '%u1D09', '%u1D35', '%u1D4E', '%u1D62', '%u1D7B', '%u1D96', '%u1DA4', '%u1DA6', '%u1DA7', '%u1E2C', '%u1E2D', '%u1E2E', '%u1E2F', '%u1EC8', '%u1EC9', '%u1ECA', '%u1ECB', '%u2071', '%u2111', '%u0134', '%u0135', '%u01C8', '%u01CB', '%u01F0', '%u0237', '%u0248', '%u0249', '%u025F', '%u0284', '%u029D', '%u02B2', '%u1D0A', '%u1D36', '%u1DA1', '%u1DA8', '%u0136', '%u0137', '%u0198', '%u0199', '%u01E8', '%u01E9', '%u029E', '%u1D0B', '%u1D37', '%u1D4F', '%u1D84', '%u1E30', '%u1E31', '%u1E32', '%u1E33', '%u1E34', '%u1E35', '%u2C69', '%u2C6A', '%u0139', '%u013A', '%u013B', '%u013C', '%u013D', '%u013E', '%u013F', '%u0140', '%u0141', '%u0142', '%u019A', '%u01C8', '%u0234', '%u023D', '%u026B', '%u026C', '%u026D', '%u029F', '%u02E1', '%u1D0C', '%u1D38', '%u1D85', '%u1DA9', '%u1DAA', '%u1DAB', '%u1E36', '%u1E37', '%u1E38', '%u1E39', '%u1E3A', '%u1E3B', '%u1E3C', '%u1E3D', '%u2C60', '%u2C61', '%u2C62', '%u019C', '%u026F', '%u0270', '%u0271', '%u1D0D', '%u1D1F', '%u1D39', '%u1D50', '%u1D5A', '%u1D6F', '%u1D86', '%u1DAC', '%u1DAD', '%u1E3E', '%u1E3F', '%u1E40', '%u1E41', '%u1E42', '%u1E43', '%u00D1', '%u00F1', '%u0143', '%u0144', '%u0145', '%u0146', '%u0147', '%u0148', '%u0149', '%u019D', '%u019E', '%u01CB', '%u01F8', '%u01F9', '%u0220', '%u0235', '%u0272', '%u0273', '%u0274', '%u1D0E', '%u1D3A', '%u1D3B', '%u1D70', '%u1D87', '%u1DAE', '%u1DAF', '%u1DB0', '%u1E44', '%u1E45', '%u1E46', '%u1E47', '%u1E48', '%u1E49', '%u1E4A', '%u1E4B', '%u207F', '%u00D2', '%u00D3', '%u00D4', '%u00D5', '%u00D6', '%u00D8', '%u00F2', '%u00F3', '%u00F4', '%u00F5', '%u00F6', '%u00F8', '%u014C', '%u014D', '%u014E', '%u014F', '%u0150', '%u0151', '%u0186', '%u019F', '%u01A0', '%u01A1', '%u01D1', '%u01D2', '%u01EA', '%u01EB', '%u01EC', '%u01ED', '%u01FE', '%u01FF', '%u020C', '%u020D', '%u020E', '%u020F', '%u022A', '%u022B', '%u022C', '%u022D', '%u022E', '%u022F', '%u0230', '%u0231', '%u0254', '%u0275', '%u043E', '%u04E6', '%u04E7', '%u04E8', '%u04E9', '%u04EA', '%u04EB', '%u1D0F', '%u1D10', '%u1D11', '%u1D12', '%u1D13', '%u1D16', '%u1D17', '%u1D3C', '%u1D52', '%u1D53', '%u1D54', '%u1D55', '%u1D97', '%u1DB1', '%u1E4C', '%u1E4D', '%u1E4E', '%u1E4F', '%u1E50', '%u1E51', '%u1E52', '%u1E53', '%u1ECC', '%u1ECD', '%u1ECE', '%u1ECF', '%u1ED0', '%u1ED1', '%u1ED2', '%u1ED3', '%u1ED4', '%u1ED5', '%u1ED6', '%u1ED7', '%u1ED8', '%u1ED9', '%u1EDA', '%u1EDB', '%u1EDC', '%u1EDD', '%u1EDE', '%u1EDF', '%u1EE0', '%u1EE1', '%u1EE2', '%u1EE3', '%u2092', '%u2C9E', '%u2C9F', '%u01A4', '%u01A5', '%u1D18', '%u1D3E', '%u1D56', '%u1D71', '%u1D7D', '%u1D88', '%u1E54', '%u1E55', '%u1E56', '%u1E57', '%u2C63', '%u024A', '%u024B', '%u02A0', '%u0154', '%u0155', '%u0156', '%u0157', '%u0158', '%u0159', '%u0210', '%u0211', '%u0212', '%u0213', '%u024C', '%u024D', '%u0279', '%u027A', '%u027B', '%u027C', '%u027D', '%u027E', '%u027F', '%u0280', '%u0281', '%u02B3', '%u02B4', '%u02B5', '%u02B6', '%u1D19', '%u1D1A', '%u1D3F', '%u1D63', '%u1D72', '%u1D73', '%u1D89', '%u1DCA', '%u1E58', '%u1E59', '%u1E5A', '%u1E5B', '%u1E5C', '%u1E5D', '%u1E5E', '%u1E5F', '%u211C', '%u2C64', '%u00DF', '%u015A', '%u015B', '%u015C', '%u015D', '%u015E', '%u015F', '%u0160', '%u0161', '%u017F', '%u0218', '%u0219', '%u023F', '%u0282', '%u02E2', '%u1D74', '%u1D8A', '%u1DB3', '%u1E60', '%u1E61', '%u1E62', '%u1E63', '%u1E64', '%u1E65', '%u1E66', '%u1E67', '%u1E68', '%u1E69', '%u1E9B', '%u0162', '%u0163', '%u0164', '%u0165', '%u0166', '%u0167', '%u01AB', '%u01AC', '%u01AD', '%u01AE', '%u021A', '%u021B', '%u0236', '%u023E', '%u0287', '%u0288', '%u1D1B', '%u1D40', '%u1D57', '%u1D75', '%u1DB5', '%u1E6A', '%u1E6B', '%u1E6C', '%u1E6D', '%u1E6E', '%u1E6F', '%u1E70', '%u1E71', '%u1E97', '%u2C66', '%u00D9', '%u00DA', '%u00DB', '%u00DC', '%u00F9', '%u00FA', '%u00FB', '%u00FC', '%u0168', '%u0169', '%u016A', '%u016B', '%u016C', '%u016D', '%u016E', '%u016F', '%u0170', '%u0171', '%u0172', '%u0173', '%u01AF', '%u01B0', '%u01D3', '%u01D4', '%u01D5', '%u01D6', '%u01D7', '%u01D8', '%u01D9', '%u01DA', '%u01DB', '%u01DC', '%u0214', '%u0215', '%u0216', '%u0217', '%u0244', '%u0289', '%u1D1C', '%u1D1D', '%u1D1E', '%u1D41', '%u1D58', '%u1D59', '%u1D64', '%u1D7E', '%u1D99', '%u1DB6', '%u1DB8', '%u1E72', '%u1E73', '%u1E74', '%u1E75', '%u1E76', '%u1E77', '%u1E78', '%u1E79', '%u1E7A', '%u1E7B', '%u1EE4', '%u1EE5', '%u1EE6', '%u1EE7', '%u1EE8', '%u1EE9', '%u1EEA', '%u1EEB', '%u1EEC', '%u1EED', '%u1EEE', '%u1EEF', '%u1EF0', '%u1EF1', '%u01B2', '%u0245', '%u028B', '%u028C', '%u1D20', '%u1D5B', '%u1D65', '%u1D8C', '%u1DB9', '%u1DBA', '%u1E7C', '%u1E7D', '%u1E7E', '%u1E7F', '%u2C74', '%u0174', '%u0175', '%u028D', '%u02B7', '%u1D21', '%u1D42', '%u1E80', '%u1E81', '%u1E82', '%u1E83', '%u1E84', '%u1E85', '%u1E86', '%u1E87', '%u1E88', '%u1E89', '%u1E98', '%u02E3', '%u1D8D', '%u1E8A', '%u1E8B', '%u1E8C', '%u1E8D', '%u2093', '%u00DD', '%u00FD', '%u00FF', '%u0176', '%u0177', '%u0178', '%u01B3', '%u01B4', '%u0232', '%u0233', '%u024E', '%u024F', '%u028E', '%u028F', '%u02B8', '%u1E8E', '%u1E8F', '%u1E99', '%u1EF2', '%u1EF3', '%u1EF4', '%u1EF5', '%u1EF6', '%u1EF7', '%u1EF8', '%u1EF9', '%u0179', '%u017A', '%u017B', '%u017C', '%u017D', '%u017E', '%u01B5', '%u01B6', '%u0224', '%u0225', '%u0240', '%u0290', '%u0291', '%u1D22', '%u1D76', '%u1D8E', '%u1DBB', '%u1DBC', '%u1DBD', '%u1E90', '%u1E91', '%u1E92', '%u1E93', '%u1E94', '%u1E95', '%u2128', '%u2C6B', '%u2C6C', '%u00C6', '%u00E6', '%u0132', '%u0133', '%u0152', '%u0153', '%u0276', '%u1E9E', '%u1D6B');
1017
1018SmartUrl_ReplaceUnicodeToASCIITo = new Array('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'f', 'f', 'f', 'f', 'f', 'f', 'f', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'i', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'j', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'k', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'l', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'q', 'q', 'q', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 't', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'y', '
1018y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'ae', 'ae', 'ij', 'ij', 'oe', 'oe', 'oe', 'ss', 'ue');
1019
1020function SmartUrl_title_to_smarturl(str) {
1021	var i=0;
1022
1023	str = str.replace(/&[^;\/];/gi, smarturl_space_char);
1024	str = escape(str);
1025	for (i = 0; i < SmartUrl_ReplaceUnicodeToEmptyFrom.length; i++) {
1026		re = new RegExp(SmartUrl_ReplaceUnicodeToEmptyFrom[i], 'gi');
1027		str = str.replace(re, SmartUrl_ReplaceUnicodeToEmptyTo[i]);
1028	}
1029	for (i = 0; i < SmartUrl_ReplaceASCIIToASCIIFrom.length; i++) {
1030		re = new RegExp(SmartUrl_ReplaceASCIIToASCIIFrom[i], 'gi');
1031		str = str.replace(re, SmartUrl_ReplaceASCIIToASCIITo[i]);
1032	}
1033	for (i = 0; i < SmartUrl_ReplaceUnicodeToASCIIFrom.length; i++) {
1034		re = new RegExp(SmartUrl_ReplaceUnicodeToASCIIFrom[i], 'gi');
1035		str = str.replace(re, SmartUrl_ReplaceUnicodeToASCIITo[i]);
1036	}
1037	str = unescape(str);
1038	for (i = 0; i < SmartUrl_ReplaceCharsFrom.length; i++) {
1039		re = new RegExp(SmartUrl_ReplaceCharsFrom[i], 'gi');
1040		str = str.replace(re, SmartUrl_ReplaceCharsTo[i]);
1041	}
1042	str = str.toLowerCase();
1043	str = str.replace(/[^a-z0-9]/gi, smarturl_space_char);
1044	re = new RegExp(preg_smarturl_space_char, 'gi');
1045	str = str.replace(re, smarturl_space_char + smarturl_space_char);
1046	for (i = 0; i < SmartUrl_DeniedWords.length; i++) {
1047		re = new RegExp('(^|' + preg_smarturl_space_char + ')' + SmartUrl_DeniedWords[i] + '(' + preg_smarturl_space_char + '|$)', 'gi');
1048		str = str.replace(re, '$1$2');
1049	}
1050	re = new RegExp(preg_smarturl_space_char, 'gi');
1051	str = str.replace(re, smarturl_space_char + smarturl_space_char);
1052	re = new RegExp('(^|' + preg_smarturl_space_char + ')[a-z](' + preg_smarturl_space_char + '|$)', 'gi');
1053	str = str.replace(re, '$1$2');
1054	re = new RegExp(preg_smarturl_space_char + '+', 'gi');
1055	str = str.replace(re, smarturl_space_char);
1056	var sstr = str + smarturl_space_char;
1057	var sindex = sstr.lastIndexOf(smarturl_space_char, 24);
1058	if (sindex < 5) {
1059		sindex = 10;
1060	}
1061	str = str.substr(0, sindex);
1062	re = new RegExp('^' + preg_smarturl_space_char + '+', 'gi');
1063	str = str.replace(re, '');
1064	re = new RegExp(preg_smarturl_space_char + '+$', 'gi');
1065	str = str.replace(re, '');
1066
1067	return str;
1068}
1069
1070function SmartUrl_filter_smarturl(html_object_id) {
1071	var i = 0;
1072	str = document.getElementById(html_object_id).value;
1073
1074	str = str.replace(/&[^;\/];/gi, smarturl_space_char);
1075	str = escape(str);
1076	for (i=0; i<SmartUrl_ReplaceUnicodeToEmptyFrom.length; i++) {
1077		re = new RegExp(SmartUrl_ReplaceUnicodeToEmptyFrom[i], 'gi');
1078		str = str.replace(re, SmartUrl_ReplaceUnicodeToEmptyTo[i]);
1079	}
1080	for (i=0; i<SmartUrl_ReplaceASCIIToASCIIFrom.length; i++) {
1081		re = new RegExp(SmartUrl_ReplaceASCIIToASCIIFrom[i], 'gi');
1082		str = str.replace(re, SmartUrl_ReplaceASCIIToASCIITo[i]);
1083	}
1084	for (i=0; i<SmartUrl_ReplaceUnicodeToASCIIFrom.length; i++) {
1085		re = new RegExp(SmartUrl_ReplaceUnicodeToASCIIFrom[i], 'gi');
1086		str = str.replace(re, SmartUrl_ReplaceUnicodeToASCIITo[i]);
1087	}
1088	str = unescape(str);
1089	for (i=0; i<SmartUrl_ReplaceCharsFrom.length; i++) {
1090		re = new RegExp(SmartUrl_ReplaceCharsFrom[i], 'gi');
1091		str = str.replace(re, SmartUrl_ReplaceCharsTo[i]);
1092	}
1093	str = str.toLowerCase();
1094	str = str.replace(/[^a-z0-9\/]/gi, smarturl_space_char);
1095	if (document.getElementById(html_object_id).value != str) {
1096		document.getElementById(html_object_id).value = str;
1097	}
1098}
1099
1100function generateSmartURL_base(sou_folderid_value, sou_objecttitle_value, dest_html_object_id) {
1101	if (document.getElementById('panel_smarturl_parentfolder_id')) {
1102		sou_folderid_value = document.getElementById('panel_smarturl_parentfolder_id').value;
1103	}
1104	if (document.getElementById(dest_html_object_id)) {
1105		addRequest(smarturlcallbackURL+'&xmleditor_action=getSmartURLfolderpath&nodoctype=1&parentid='+sou_folderid_value, 'getSmartURLfolderpath_base', '', Array(sou_objecttitle_value, dest_html_object_id, '##/##', '/'),'request_generateSmartURL_base');
1106	}
1107}
1108
1109function getSmartURLfolderpath_base(result, params) {
1110	if (result=='undefined') {
1111		result = '';
1112	}
1113	result=unescape(result);
1114	result=result.replace(/([^\s])\s*$/gi,'$1');
1115
1116	var str = '';
1117	if (result.indexOf('##nochange##') == -1) {
1118		var str_array = new Array();
1119		str_array = result.split(params[2]);
1120		for (i = 0; i < str_array.length; i++) {
1121			str += SmartUrl_title_to_smarturl(str_array[i],'')+params[3];
1122		}
1123	}
1124	else {
1125		str += result.replace(/##nochange##$/gi, '')+params[3];
1126	}
1127	str += SmartUrl_title_to_smarturl(params[0],'');
1128	str = str.replace(/^\/+/gi, '');
1129	str = str.replace(/\/+$/gi, '');
1130
1131	document.getElementById(params[1]).value = str;
1132}
1133
1134function changeObjectPosition(metadataId, changeType, stUniqueName) {
1135	// A pozicionálást az ST objektum létrehozó modul fogja végezni. // st_adminPositionObjectBrowserST_maintable
1136	if (webra_sorttables && webra_sorttables['st_' + stUniqueName + '_maintable']) {
1137		stObject = webra_sorttables['st_' + stUniqueName + '_maintable'];
1138		// URL összeállítása
1139		var url = this.addURLParam(stObject.homeURL, "ctag", "reload");
1140		
1141		// + paraméterek a súlyozáshoz
1142		url = this.addURLParam(url, "metadataId", metadataId);
1143		url = this.addURLParam(url, "changeType", changeType);
1144
1145		// Pozicionálás és ST újratöltés egyben
1146		stObject.ST_resubmit(url, "SortableTable.ST_callback_reload");
1147	}
1148} // end function changeObjectPosition
1149
1150function changeHeadObjectPosition(headObjectID, changeType, sorttableName) {	
1151	// A pozicionálást az ST objektum létrehozó modul fogja végezni.
1152	if (webra_sorttables && webra_sorttables["st_"+sorttableName+"_maintable"]) {
1153		stObject = webra_sorttables["st_"+sorttableName+"_maintable"];
1154
1155		// URL összeállítása
1156		var url = this.addURLParam(stObject.homeURL, "ctag", "reload");
1157		
1158		// + paraméterek a súlyozáshoz
1159		url = this.addURLParam(url, "headObjectID", headObjectID);
1160		url = this.addURLParam(url, "changeType", changeType);
1161
1162		// Pozicionálás és ST újratöltés egyben
1163		stObject.ST_resubmit(url, "SortableTable.ST_callback_reload");
1164	}
1165} // end function changeHeadObjectPosition
1166
1167/**
1168 * Foglaltság jelzés az adminon (vagy a cím hátterében, vagy a kis piros div-vel)
1169 *
1170 * @date 2007.08.29
1171 * @author Szabó Csaba
1172 *
1173 * @param boolean Kikapcsolás (0) vagy bekapcsolás (1)
1174 */
1175function loadingIndicator(status) {
1176	if ( document.body ) {
1177		var iObject = document.getElementById("header_firstrow_label");
1178		if (iObject) {
1179			if (status) {
1180				iObject.className = 'header_firstrow_label_busy';
1181			}
1182			else {
1183				iObject.className = '';
1184			}
1185		}
1186		else {
1187			var divVisibilityValue = "hidden";
1188			if (status) {
1189				divVisibilityValue = "visible";
1190			}
1191			
1192			var iObject = document.getElementById("w3LoadingDiv");
1193			if (!iObject) {
1194				var loadingDiv = document.createElement("div");
1195				loadingDiv.id = "w3LoadingDiv";
1196				loadingDiv.innerHTML = LANG['LOADING'];
1197				loadingDiv.className = "loading_div";
1198				loadingDiv.style.visibility = divVisibilityValue;
1199				document.body.appendChild(loadingDiv);
1200			}
1201			else {
1202				iObject.style.visibility = divVisibilityValue;
1203			}
1204		}
1205		for (var i = 0; i<AjaxLoadingIndicator_array.length; i++) {
1206			if (status) {
1207				if ( typeof AjaxLoadingIndicator_array[i].fvonstr=='function' ) {
1208					AjaxLoadingIndicator_array[i].fvonstr();
1209				} else {
1210					window[AjaxLoadingIndicator_array[i].fvonstr]();
1211				}
1212			}
1213			else {
1214				if ( typeof AjaxLoadingIndicator_array[i].fvoffstr=='function' ) {
1215					AjaxLoadingIndicator_array[i].fvoffstr();
1216				} else {
1217					window[AjaxLoadingIndicator_array[i].fvoffstr]();
1218				}
1219			}
1220		}
1221	}
1222}
1223
1224// tartalmazza, hogy ajax kérés indítása/végezte esetén milyen js függvényeket kell meghívni
1225AjaxLoadingIndicator_array = new Array();
1226
1227/**
1228 * AjaxLoadingIndicator elem/eset betöltését végzi
1229 *
1230 * @date 2010.07.30
1231 * @author Klausz Zoltán
1232 *
1233 * @param string name
1234 * @param string bekapcsolás függvénye
1235 * @param string kikapcsolás függvénye
1236 */
1237function addAjaxLoadingIndicatorElement(namestr, fvonstr, fvoffstr) {
1238	var newitem = true;
1239	for (var i = 0; i<AjaxLoadingIndicator_array.length; i++) {
1240		if (AjaxLoadingIndicator_array[i].name == namestr) {
1241			AjaxLoadingIndicator_array[i] = {name : namestr, fvonstr : fvonstr, fvoffstr : fvoffstr};
1242			newitem = false;
1243		}
1244	}
1245	if (newitem) {
1246		AjaxLoadingIndicator_array.push({name : namestr, fvonstr : fvonstr, fvoffstr : fvoffstr});
1247	}
1248}
1249
1250/**
1251 * Elmenti a legutóbb használt objektumok közé a megadott objektumot.
1252 *
1253 * @author Szabó Csaba <[email protected]>
1254 * @date 2007.09.10
1255 *
1256 * @param integer Az objektum azonosítója
1257 * @param integer Az objektum típus azonosítója
1258 *
1259 * @todo> Átgondolni: kliens oldalról nem kell módosítani, mert csak azok az objektumok kerülhetnek be, melyeket a DB-ben módosított.
1260 */
1261function profilePushMostRecentObject(metadataID, objectID, objectTypeID) {
1262	// Vagy metadata azonosító vagy objektum és objektumtípus azonosító szükséges
1263	if (parseInt(metadataID) > 0 || (parseInt(objectID) > 0 && parseInt(objectTypeID) > 0)) {
1264		addRequest(profileURL, "", Array(Array("webra_action", "profileSetMostRecentObject"), Array("objectID", objectID), Array("objectTypeID", objectTypeID)));
1265	}
1266}
1267
1268/**
1269 * Beállítja az aktuálisan használt rovatot (linuxos hasonlattal élve pwd-t)
1270 * Ezt lehet használni új objektum létrehozáskor default rovatnak.
1271 *
1272 * @author Szabó Csaba <[email protected]>
1273 * @date 2007.09.10
1274 *
1275 * @param integer Az objektum azonosítója
1276 * @param integer Az objektum típus azonosítója
1277 */
1278function profileSetActiveFolder(objectID) {
1279	// Rovat azonosító szükséges
1280	if (parseInt(objectID) > 0) {
1281		addRequest(profileURL, "", Array(Array("webra_action", "profileSetActiveFolder"), Array("objectID", objectID)));
1282	}
1283}
1284
1285/**
1286 * Visszaad várost zip alapján.
1287 *
1288 * @author Kocsis Róbert <[email protected]>
1289 * @date 2007.11.08.
1290 *
1291 * @param integer zip
1292 * @param string célpont html control
1293 */
1294function getWebraCityByZip(zipcode,settlementControl) {
1295	if (zipcode.length == 4) {
1296		var params = setParamValue(params, "nodoctype", 1);
1297		params = setParamValue(params, "webra_action", 'getWebraCityByZip');
1298		params = setParamValue(params, "vch_zipcode", zipcode);
1299		params = setParamValue(params, "settlementControl", settlementControl);
1300		addRequest(profileURL, "getWebraCityByZip_callback", params);
1301	}
1302}
1303
1304function getWebraCityByZip_callback(result, callbackParams) {
1305	var result=unescape(result);
1306	evalJS(result);
1307}
1308
1309/**
1310 * Visszaad várost zip alapján.
1311 *
1312 * @author Kocsis Róbert <[email protected]>
1313 * @date 2007.11.08.
1314 *
1315 * @param integer zip
1316 * @param string célpont html control
1317 */
1318function getWebraCityByZip_public(zipcode,settlementControl) {
1319	if (zipcode.length == 4) {
1320		var params = setParamValue(params, "nodoctype", 1);
1321		params = setParamValue(params, "webra_action", 'getWebraCityByZip');
1322		params = setParamValue(params, "vch_zipcode", zipcode);
1323		params = setParamValue(params, "settlementControl", settlementControl);
1324		addRequest(profilePublicURL, "getWebraCityByZip_callback", params);
1325	}
1326}
1327
1328function getWebraCityByZip_public_callback(result, callbackParams) {
1329	var result=unescape(result);
1330	evalJS(result);
1331}
1332
1333/**
1334 * Általános ajax url check
1335 *
1336 * @author Kocsis Róbert <[email protected]>
1337 * @date 2007.11.26.
1338 *
1339 * @param string url
1340 */
1341function checkWebraURL(url) {
1342	if (url!='') {
1343		var params = setParamValue(params, "nodoctype", 1);
1344		params = setParamValue(params, "webra_action", 'checkURL');
1345		params = setParamValue(params, "url", url);
1346		addRequest(profileURL, "checkWebraURL_callback", params);
1347	}
1348}
1349
1350function checkWebraURL_callback(result) {
1351	var result=unescape(result);
1352	if (result==1) {
1353		alert('Az URL létezik és elérhető.');
1354	} else {
1355		alert('Az URL nem létezik, vagy nem elérhető a szerverről.');
1356	}
1357}
1358
1359var monthlengths = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
1360/* format: YYYY*MM*DD */
1361function checkDateSimple(dateobject) {
1362	if (dateobject.value.match(/^\d{4}[^0-9]\d{2}[^0-9]\d{2}$/)) {
1363		var thisyear = dateobject.value.substr(0,4);
1364		var thismonth = dateobject.value.substr(5,2);
1365		var thisday = dateobject.value.substr(8,2);
1366		if ((parseInt(thisyear) > 0) && (parseInt(thismonth) > 0) && (parseInt(thisday) > 0)) {
1367			monthlengths[1] = 28;
1368			if ((parseInt(thisyear/4) == (thisyear/4))) {
1369				monthlengths[1] = 29;
1370			}
1371			if ((parseInt(thismonth) <= 12) && (parseInt(thisday) <= monthlengths[parseInt(thismonth)-1])) {
1372				return true;
1373			}
1374		}
1375	}
1376
1377	dateobject.focus();
1378	return false;
1379}
1380
1381// --- Webra, Admin About Box ---
1382function webraAboutPopup(webraInstance) {
1383	newAdminPopup('admin_gui::webraAboutBoxPopup', Array(Array('webraInstance', webraInstance), Array('alma', 1)));
1384}
1385
1386// --- begin - eventcalendar ---------------------------
1387function event_findPosX(obj) {
1388	var curleft = 0;
1389	if (obj.offsetParent) {
1390		while (obj.offsetParent) {
1391			curleft += obj.offsetLeft;
1392			obj = obj.offsetParent;
1393		}
1394	}	else if (obj.x) {
1395		curleft += obj.x;
1396	}
1397	return curleft;
1398}
1399
1400function event_findPosY(obj) {
1401	var curtop = 0;
1402	if (obj.offsetParent) {
1403		while (obj.offsetParent) {
1404		curtop += obj.offsetTop;
1405		obj = obj.offsetParent;
1406		}
1407	} else if (obj.y) {
1408		curtop += obj.y;
1409	}
1410	return curtop;
1411}
1412function EventCalendarDay(i, type, node) {
1413	this.num = i;
1414	this.type = type;
1415	this.node = node;
1416}
1417
1418function EventCalendar() {
1419	var _self = this;
1420	this.year = null;
1421	this.month = null;
1422	this.day = null;
1423	this.days = new Array();
1424	this.selectedDay = null;
1425	this.rootNode = null;
1426	this.yearSelect = null;
1427	this.monthSelect = null;
1428	this.timer = null;
1429	
1430	this.webraInstance = null;
1431
1432	this.selectDay = function(d) {
1433		if (this.selectedDay != null) {
1434			this.days[this.selectedDay].node.className = this.days[this.selectedDay].node.className.replace('selectedDay', '');
1435		}
1436		this.selectedDay = d;
1437		if (this.selectedDay != null) {
1438			this.days[this.selectedDay].node.className = this.days[this.selectedDay].node.className+' selectedDay ';
1439		}
1440		var params=Array();
1441		setParamValue(params, 'webra_action', 'getDayInfo');
1442		setParamValue(params, 'nodoctype', '1');
1443		setParamValue(params, 'year', this.year);
1444		setParamValue(params, 'month', this.month);
1445		setParamValue(params, 'day', this.selectedDay);
1446		setParamValue(params, 'webraInstance', this.webraInstance);
1447		
1448		if (document.getElementById('naptar_kulso')) {
1449			this.setTimer(params);
1450		}
1451		else {
1452			addRequest(mainURL+'main.php', 'cal.selectDayResponse', params, params);
1453		}
1454	}
1455
1456	this.selectDay_pointer = function(d) {
1457		if (this.selectedDay != null) {
1458			this.days[this.selectedDay].node.className = this.days[this.selectedDay].node.className.replace('selectedDay', '');
1459		}
1460		this.selectedDay = d;
1461		if (this.selectedDay != null) {
1462			this.days[this.selectedDay].node.className = this.days[this.selectedDay].node.className+' selectedDay ';
1463		}
1464	}
1465
1466	this.setTimer = function(params) {
1467		this.clearTimer();
1468	
1469		var paramStr = "";
1470		if (typeof params == "array" || typeof params == "object") {
1471			for (var i=0; i<params.length; i++) {
1472				if (paramStr != "") paramStr += ", ";
1473				paramStr += "Array('"+params[i][0]+"', '"+params[i][1]+"')";
1474			}
1475		}
1476		paramStr = "Array("+paramStr+")";
1477	
1478		if (document.getElementById('naptar_kulso')) {
1479			if (document.getElementById('cal_day_'+getParamValue(params, 'day'))) {
1480				if (document.getElementById('ticket_calendar_today')) {
1481					document.getElementById('ticket_calendar_today').style.display = 'block';
1482					this.clearBlock();
1483					document.getElementById('ticket_calendar_today').className = 'ticket_calendar_today';
1484					document.getElementById('ticket_calendar_today').style.top = (event_findPosY(document.getElementById('cal_day_'+getParamValue(params, 'day'))) - event_findPosY(document.getElementById('naptar_kulso')) + document.getElementById('calendar_pointer').clientHeight + document.getElementById('cal_day_'+getParamValue(params, 'day')).clientHeight)+'px';
1485					if (document.getElementById('calendar_pointer')) {
1486						document.getElementById('calendar_pointer').style.left = (event_findPosX(document.getElementById('cal_day_'+getParamValue(params, 'day'))) - event_findPosX(document.getElementById('naptar_kulso')))+'px';
1487					}
1488				}
1489			}
1490		}
1491		var commandStr = "addRequest(mainURL+'main.php', 'cal.selectDayResponse', "+paramStr+", "+paramStr+");";
1492		this.timer = setTimeout(commandStr, 1000);
1493	}
1494
1495	this.clearTimer = function() {
1496		if (this.timer) {
1497			clearTimeout(this.timer);
1498		}
1499	}
1500
1501	this.clearBlock = function() {
1502		if (document.getElementById('ticket_calendar_today')) {
1503			document.getElementById('ticket_calendar_today').innerHTML = '<div id="calendar_pointer" class="calendar_pointer"></div><br></br>';
1504		}
1505	}
1506
1507	this.clearselectedDay = function() {
1508		if (cal.selectedDay != null) {
1509			cal.days[cal.selectedDay].node.className = cal.days[cal.selectedDay].node.className.replace('selectedDay', '');
1510		}
1511	}
1512
1513	this.hideBlock = function() {
1514		if (document.getElementById('ticket_calendar_today')) {
1515			document.getElementById('ticket_calendar_today').style.display = 'none';
1516		}
1517	}
1518
1519	this.loadedBlock = function() {
1520		if (document.getElementById('ticket_calendar_today')) {
1521			document.getElementById('ticket_calendar_today').className = 'ticket_calendar_today_loaded';
1522		}
1523	}
1524
1525	this.selectDayResponse = function(xmlHttpResponse, params) {
1526		response = unescape(xmlHttpResponse);
1527		evalJS(response);
1528		document.getElementById('ticket_calendar_today').innerHTML=response;
1529		if (document.getElementById('ticket_toright')) {
1530			document.getElementById('ticket_toright').innerHTML = document.getElementById('ticket_fromleft').innerHTML;
1531			document.getElementById('ticket_fromleft').innerHTML = '';
1532		}
1533		if (document.getElementById('ticket_time') && document.getElementById('ticket_time').innerHTML=='' && actualDate) {
1534			document.getElementById('ticket_time').innerHTML=actualDate.substring(8,10)+':'+actualDate.substring(10,12);
1535			if (document.getElementById('td'+actualDate.substring(8,10)+'_'+actualDate.substring(10,12))) {
1536				var td=document.getElementById('td'+actualDate.substring(8,10)+'_'+actualDate.substring(10,12));
1537				td.style.border='1px solid yellow';
1538				lastDailyTimeSelected=td;
1539			}
1540		}
1541
1542		if (document.getElementById('naptar_kulso')) {
1543			if (document.getElementById('cal_day_'+getParamValue(params, 'day'))) {
1544				if (document.getElementById('ticket_calendar_today')) {
1545					document.getElementById('ticket_calendar_today').style.display = 'block';
1546					document.getElementById('ticket_calendar_today').className = 'ticket_calendar_today_loaded';
1547					document.getElementById('ticket_calendar_today').style.top = (event_findPosY(document.getElementById('cal_day_'+getParamValue(params, 'day'))) - event_findPosY(document.getElementById('naptar_kulso')) + document.getElementById('calendar_pointer').clientHeight + document.getElementById('cal_day_'+getParamValue(params, 'day')).clientHeight)+'px';
1548					if (document.getElementById('calendar_pointer')) {
1549						document.getElementById('calendar_pointer').style.left = (event_findPosX(document.getElementById('cal_day_'+getParamValue(params, 'day'))) - event_findPosX(document.getElementById('naptar_kulso')))+'px';
1550					}
1551				}
1552			}
1553			else {
1554				if (document.getElementById('ticket_calendar_today')) {
1555					document.getElementById('ticket_calendar_today').style.display = 'none';
1556				}
1557			}
1558		}
1559	}
1560
1561	this.unselectDay = function() {
1562		if (document.getElementById('naptar_kulso')) {
1563			if (document.getElementById('ticket_calendar_today')) {
1564				this.clearTimer();
1565				this.timer = setTimeout("cal.hideBlock();cal.clearselectedDay();", 1000);
1566			}
1567		}
1568	}
1569
1570	this.setDate = function(y, m, d) {
1571		if (y != null) this.year = parseInt(parseFloat(y)+0.1);
1572		if (m != null) this.month = parseInt(parseFloat(m)+0.1);
1573		if (d != null) this.day = parseInt(parseFloat(d)+0.1);
1574		this.setDayTypes();
1575	}
1576
1577	this.setDate_pointer = function(y, m, d) {
1578		if (y != null) this.year = parseInt(parseFloat(y)+0.1);
1579		if (m != null) this.month = parseInt(parseFloat(m)+0.1);
1580		if (d != null) this.day = parseInt(parseFloat(d)+0.1);
1581		this.setDayTypes_pointer();
1582	}
1583
1584	this.setDayType = function(d, type) {
1585		if (0<d && d<=31) {
1586			if (typeof(this.days[d]) == 'undefined') this.days[d] = new EventCalendarDay(d, type);
1587			if (type != null) this.days[d].type = type;
1588		}
1589	}
1590
1591	this.setDayTypes = function() {
1592		var params=Array();
1593		setParamValue(params, 'webra_action', 'getMonthTypes');
1594		setParamValue(params, 'nodoctype', '1');
1595		setParamValue(params, 'year', this.year);
1596		setParamValue(params, 'month', this.month);
1597		setParamValue(params, 'webraInstance', this.webraInstance);
1598		addRequest(mainURL+'main.php', 'cal.setDayTypesResponse', params);
1599	}
1600
1601	this.setDayTypes_pointer = function() {
1602		var params=Array();
1603		setParamValue(params, 'webra_action', 'getMonthTypes');
1604		setParamValue(params, 'nodoctype', '1');
1605		setParamValue(params, 'year', this.year);
1606		setParamValue(params, 'month', this.month);
1607		setParamValue(params, 'webraInstance', this.webraInstance);
1608		addRequest(mainURL+'main.php', 'cal.setDayTypesResponse_pointer', params);
1609	}
1610
1611	this.setDayTypesResponse = function(xmlHttpResponse) {
1612		response = unescape(xmlHttpResponse);
1613		evalJS(response);
1614		for (var d=1; d<=31; d++) {
1615			try {
1616				_self.setDayType(d, days[d-1]);
1617			} catch (e) {
1618				_self.setDayType(d, '');
1619			}
1620		}
1621		_self.displayCalendar();
1622		try {
1623			for (var i=0; i<_self.yearSelect.options.length; i++) {
1624				if (_self.yearSelect.options[i].value == _self.year) {
1625					_self.yearSelect.selectedIndex = i;
1626				}
1627			}
1628		}
1629		catch (e) {}
1630		try {
1631			for (var i=0; i<_self.monthSelect.options.length; i++) {
1632				if (_self.monthSelect.options[i].value == _self.month) {
1633					_self.monthSelect.selectedIndex = i;
1634				}
1635			}
1636		}
1637		catch (e) {}
1638		_self.selectDay(parseInt(_self.day));
1639	}
1640
1641	this.setDayTypesResponse_pointer = function(xmlHttpResponse) {
1642		response = unescape(xmlHttpResponse);
1643		evalJS(response);
1644		for (var d=1; d<=31; d++) {
1645			try {
1646				this.setDayType(d, days[d-1]);
1647			} catch (e) {
1648				this.setDayType(d, '');
1649			}
1650		}
1651		this.displayCalendar();
1652		try {
1653			for (var i=0; i<this.yearSelect.options.length; i++) {
1654				if (this.yearSelect.options[i].value == this.year) {
1655					this.yearSelect.selectedIndex = i;
1656				}
1657			}
1658		}
1659		catch (e) {}
1660		try {
1661			for (var i=0; i<this.monthSelect.options.length; i++) {
1662				if (this.monthSelect.options[i].value == this.month) {
1663					this.monthSelect.selectedIndex = i;
1664				}
1665			}
1666		}
1667		catch (e) {}
1668		this.selectDay_pointer(parseInt(this.day));
1669	}
1670
1671	this.displayCalendar = function() {
1672		year = this.year;
1673		month = this.month;
1674		day = this.day;
1675
1676		if (month[0] == "0") month = month.substring(1);
1677		month = parseInt(month);
1678		month--;
1679		year = parseInt(year);
1680		var days = this.getDaysInMonth(month, year);
1681		if (days < this.day) {
1682			this.day = days;
1683			day = this.day;
1684		}
1685		var firstOfMonth = new Date(year, month, 1);
1686		var startingPos = firstOfMonth.getDay() - 1;
1687		if (startingPos == -1) startingPos = 6;
1688		var str = "";
1689		days += startingPos;
1690	
1691		// bevezeto ures mezok
1692		var st;
1693		var border;
1694		var calendar = document.getElementById("naptar0_napok");
1695
1696		calendar.innerHTML = '';
1697		var calTable = document.createElement('table');
1698		calTable.cellSpacing = "0";
1699		calTable.className = "caltable_days";
1700		calendar.appendChild(calTable);
1701
1702		var calTBody = document.createElement('tbody');
1703		calTable.appendChild(calTBody);
1704		
1705		var row;
1706		
1707		for (var i=0; i<7; i++) {
1708			if (i%7 == 0) {
1709				row = document.createElement('tr');
1710				calTBody.appendChild(row);
1711			}
1712			var cell = document.createElement('td');
1713			row.appendChild(cell);
1714			
1715			cell.className = 'nap_cim';
1716			switch (i) {
1717				case 0: cell.innerHTML = LANG['CALENDAR_DAY_1_SHORT']; break;
1718				case 1: cell.innerHTML = LANG['CALENDAR_DAY_2_SHORT']; break;
1719				case 2: cell.innerHTML = LANG['CALENDAR_DAY_3_SHORT']; break;
1720				case 3: cell.innerHTML = LANG['CALENDAR_DAY_4_SHORT']; break;
1721				case 4: cell.innerHTML = LANG['CALENDAR_DAY_5_SHORT']; break;
1722				case 5: cell.innerHTML = LANG['CALENDAR_DAY_6_SHORT']; break;
1723				case 6: cell.innerHTML = LANG['CALENDAR_DAY_7_SHORT']; break;
1724			}
1725		}
1726		
1727		var calTable = document.createElement('table');
1728		calTable.cellSpacing = "1";
1729		calTable.className = "caltable_cal";
1730		calendar.appendChild(calTable);
1731		
1732		var calTBody = document.createElement('tbody');
1733		calTable.appendChild(calTBody);
1734	
1735		var dayType = '';
1736		for (var i=0; i<startingPos; i++) {
1737			if (i%7 == 0) {
1738				row = document.createElement('tr');
1739				calTBody.appendChild(row);
1740			}
1741			var cell = document.createElement('td');
1742			row.appendChild(cell);
1743			
1744			cell.className = 'nap empty';
1745			cell.innerHTML = "<div>&nbsp;</div>";
1746		}
1747
1748		for (; i < days; i++) {
1749			if (i%7 == 0) {
1750				row = document.createElement('tr');
1751				calTBody.appendChild(row);
1752			}
1753			var day = i - startingPos + 1;
1754	
1755			var cell = document.createElement('td');
1756			row.appendChild(cell);
1757			
1758			this.days[i+1-startingPos].node = cell;
1759			try {
1760				cell.className = 'nap '+this.days[i+1-startingPos].type;
1761			}
1762			catch (e) {
1763				cell.className = 'nap';
1764			}
1765			cell.innerHTML = "<div id='cal_day_"+(i+1-startingPos)+"' onclick='cal.selectDay("+(i+1-startingPos)+");' style=\"cursor: pointer;\">"+day+"</div>";
1766		}
1767
1768		var rest = 6 - (days-1) % 7;
1769		for (var i=0; i<rest; i++) {
1770			var cell = document.createElement('td');
1771			row.appendChild(cell);
1772			
1773			cell.className = 'nap empty';
1774			cell.innerHTML = "<div>&nbsp;</div>";
1775		}
1776	}
1777	
1778	this.changeYear = function(year) {
1779		this.year = year;
1780		this.setDate(null, null, null);
1781	}
1782	
1783	this.changeMonth = function(month) {
1784		this.month = month;
1785		this.setDate(null, null, null);
1786	}
1787	
1788	this.setCurrentDate = function() {
1789		var now = new Date();
1790		this.setDate(now.getFullYear(), now.getMonth()+1, now.getDate());
1791	}
1792	
1793	this.getDaysInMonth = function(month, year) {
1794		var days;
1795		if (month==0 || month==2 || month==4 || month==6 || month==7 || month==9 || month==11) {
1796			days=31;
1797		} else if (month==3 || month==5 || month==8 || month==10) {
1798			days=30;
1799		} else if (month==1) {
1800			if (this.isLeapYear(year)) {
1801				days=29;
1802			} else {
1803				days=28;
1804			}
1805		}
1806		return days;
1807	}
1808	
1809	this.isLeapYear = function(Year) {
1810		if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) {
1811			return (true);
1812		} else {
1813			return (false);
1814		}
1815	}
1816}
1817// --- end - eventcalendar ---------------------------
1818
1819function vote_stars(rate,inside) {
1820	for (i=1;6>i;i++) {
1821		if (inside==1) {
1822			if (i>rate) {
1823				document.getElementById('votestars'+i).src='/img/stars2.png';
1824			}
1825			else {
1826				document.getElementById('votestars'+i).src='/img/stars1.png';
1827			}					
1828		}
1829		else {
1830			if (i>document.getElementById('articlevotenr').value) {
1831				document.getElementById('votestars'+i).src='/img/stars2.png';
1832			}
1833			else {
1834				document.getElementById('votestars'+i).src='/img/stars1.png';
1835			}
1836		}
1837	}
1838}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.