var dbg = false; //********************************************************************************************************************** // // Author: GF // www.bm.hu // //********************************************************************************************************************** var ns4 = (document.layers); var ie4 = (document.all && !document.getElementById); var ie5 = (document.all && document.getElementById); var ns6 = (!document.all && document.getElementById); //********************************************************************************************************************** // function open_sx() //********************************************************************************************************************** function open_sx() { window.open(getPath() + '/info.htm?OpenPage', 'info', 'width=400, height=300, statusbar=no, left=50, top=50'); } //********************************************************************************************************************** // function openerRefresh(loc) //********************************************************************************************************************** function openerRefresh(win, loc) { win.opener.location.href = getPath() + '/' + loc; } //********************************************************************************************************************** // function idozito(loops, mess) //********************************************************************************************************************** function idozito(loops, mess, win) { if (!win) w = window; else w = win; for (i = 0; i < loops; i++) w.status = mess + " ... " + String(i); } //********************************************************************************************************************** // function getElement(id, w) //********************************************************************************************************************** function getElement(id) { var obj; if (ns4) { obj = document.layers[id]; } else if (ie4) { obj = document.all[id]; } else if (ie5 || ns6) { obj = document.getElementById(id); } if (!obj) obj = document.getElementsByName(id)[0] return(obj); } //********************************************************************************************************************** // function getPath(mode) //********************************************************************************************************************** function getPath(mode) { w = window.location; n = w.pathname.indexOf(".nsf"); n += 4; p = w.pathname.substr(0, n); loc = w.protocol + "//" + w.hostname + p; if (mode == 'P') return p; else return loc; } //********************************************************************************************************************** // function openwin(url, name, ww, wh, scroll, status) //********************************************************************************************************************** function openwin(url, name, ww, wh, scroll) { var sh = screen.availHeight; var sw = screen.availWidth; var p = getPath(); var win; var attr; var s; if (!ww) ww = 400; if (!wh) wh = 200; s = scroll ? '1' : '0'; st = status ? '1' : '0'; attr = "toolbar=0, location=0, directories=0, status=" + st + ", menuBar=0, scrollbars=" + s + ", resizable=0, width=" + String(ww) + ", height=" + String(wh) + ", left=" + String((sw - ww) / 2) + ", top=" + String((sh - wh) / 2); if (dbg) alert('openwin...' + p + url + ', ' + name + ', ' + attr); win = window.open(p + url, name, attr); win.focus(); return win; } //********************************************************************************************************************** // function twistie() //********************************************************************************************************************** function twistie() { // Thanks for www.dominopower.com var i; var nullcount; var expand; var collapse; expand=new Image(); // creates new image object instance and assign reference expand.src = getPath() + '/expand.gif?OpenImageResource'; //place URL to your image for expand collapse=new Image(); collapse.src = getPath() + '/collapse.gif'; //place URL to your image for collapse nullcount=1; // initialize nullcount to non-zero so it enters the while loop. while (nullcount ) //while loop tests if all the images are loaded by the browser { nullcount=0; // Reset nullcount which counts number of images remaining to download. // document.images is collection of all images ( tags) on the document // it has length attribute representing the image count. for (i = 0; i < document.images.length; i++) { if (document.images[i].src == null) // src is property storing image url nullcount++; else { if (document.images[i].src.indexOf('expand.gif') > 0 ) // checks expand document.images[i].src=expand.src; else if(document.images[i].src.indexOf('collapse.gif') > 0) //checks collapse document.images[i].src=collapse.src; } } } } //********************************************************************************************************************** // function datum() //********************************************************************************************************************** function datum() { var ie; if (navigator.userAgent.indexOf('MSIE') > -1) ie = 0; else ie =1900; var nap = new Array("vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"); var ho = new Array("január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"); var ma = new Date(); var ev = ie + ma.getYear(); document.write(ev + ". " + ho[ma.getMonth()] + " " + ma.getDate() + ". " + nap[ma.getDay()] + "   "); } //********************************************************************************************************************** // function submit_ff() //********************************************************************************************************************** function submit_ff() { var v = replaceSubstring(getElement('gyk').value, unescape(' '), '+'); var loc = location; var view = getElement('ActView').value; var query = getElement('Query_String').value; var url; if (view == '' && query != '') view = 'web_search_results'; url = getPath() + '/' + view + '?OpenView&StartKey='; if (v != '') { v = url + v + '&CollapseView'; loc.replace(v); return false; } else { return false; } return false; } //********************************************************************************************************************** // function submit_fts(vw) //********************************************************************************************************************** function submit_fts(vw) { var v = replaceSubstring(getElement('ft_query').value, unescape(' '), '+'); var loc = location; // var view = getElement('ActView').value; var view = vw; var query = getElement('Query_String').value; var url; if (v == '') return false; // view = 'web_search_results'; url = getPath() + '/' + view + '?SearchView&Query=' + v + '*'; loc.replace(url); return false; } //********************************************************************************************************************** // function replaceSubstring(s, source, target) //********************************************************************************************************************** function replaceSubstring(s, source, target) { // Replaces s substring in a String with another substring var pos; pos = s.indexOf(source); do { if (pos == -1) { pos = -1; } else { if (pos == 0 && s.length == 1) { s = target; pos = -1; } else { s = s.substring(0, pos) + target + s.substring(pos + source.length); pos = s.indexOf(source, pos + target.length); } } } while (pos > -1); return(s); } //************************************************************************* // function clickIt(loc, dcnum, mode) //************************************************************************* function clickIt(loc, dcnum, mode) { var a; var c; var d; if (mode == "F") { a = getPath() + "/" + loc + "?OpenView&Start=" + dcnum + "&Expand=" + dcnum; } else if (mode == true) { a = getPath() + "/" + loc + "/" + dcnum + "?OpenDocument" } else { c = StrLeft(dcnum, '.'); d = (c.length == 0) ? dcnum : c; a = getPath() + "/" + loc + "?OpenView&Start=" + d + "&Expand=" + dcnum; } window.location.href = a; } function StrLeft(s, p) { return(String(s).substring(0, String(s).indexOf(String(p)))); } //************************************************************************* // function w(docid) //************************************************************************* function w(docid) { var path; var path = getPath() +'/wsz/' + docid + '?OpenDocument'; var pw; if(!pw) pw = window.open(path, 'pw', 'toolbar=0, resizable=1, scrollbars=1, width=795, height=595'); pw.focus(); window.location.reload(); } //************************************************************************* // function border() //************************************************************************* function border() { var divCollection = document.getElementsByTagName("DIV"); for (i=0; i < divCollection.length; i++) { obj = divCollection[i]; if (location.href.indexOf('&turisztika') != -1) { if (obj.id == 'v_tur_top') obj.id = 'tur_top'; if (obj.id == 'v_tur_left') obj.id = 'tur_left'; if (obj.id == 'v_tur_right') obj.id = 'tur_right'; if (obj.id == 'v_tur_bottom') obj.id = 'tur_bottom'; } } }