ie = navigator.userAgent.indexOf("MSIE") != -1; iever = "0"; if (ie) { iever = navigator.userAgent.indexOf("MSIE"); iever = navigator.userAgent.substring(iever+5, iever+6); } document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); zindexcount = 999; function fadeIn(whatdiv, speed) { document.getElementById(whatdiv).style.visibility = "hidden"; document.getElementById(whatdiv).style.zIndex = zindexcount; zindexcount++; if (document.all) { document.getElementById(whatdiv).style.filter = "blendTrans(duration=" + speed + ")"; if (document.getElementById(whatdiv).filters.blendTrans.status != 2) { document.getElementById(whatdiv).filters.blendTrans.apply(); document.getElementById(whatdiv).style.visibility = "visible"; document.getElementById(whatdiv).filters.blendTrans.play(); } } else { document.getElementById(whatdiv).style.opacity = 0; document.getElementById(whatdiv).style.mozOpacity = 0; document.getElementById(whatdiv).style.visibility = "visible"; for (i = 0.1; i <= 1; i += 0.025) { window.setTimeout("document.getElementById('" + whatdiv + "').style.opacity=" + i, i * 1000 * speed); window.setTimeout("document.getElementById('" + whatdiv + "').style.mozOpacity=" + i, i * 1000 * speed); } } } function fadeOut(whatdiv,speed) { document.getElementById(whatdiv).style.visibility = "visible"; document.getElementById(whatdiv).style.zIndex = zindexcount; zindexcount++; if (document.all) { document.getElementById(whatdiv).style.filter = "blendTrans(duration=" + speed + ")"; if (document.getElementById(whatdiv).filters.blendTrans.status != 2) { document.getElementById(whatdiv).filters.blendTrans.apply(); document.getElementById(whatdiv).style.visibility = "hidden"; document.getElementById(whatdiv).filters.blendTrans.play(); } } else { document.getElementById(whatdiv).style.opacity = 0; document.getElementById(whatdiv).style.mozOpacity = 0; document.getElementById(whatdiv).style.visibility = "visible"; for (i = 0.1; i <= 1; i += 0.025) { window.setTimeout("document.getElementById('" + whatdiv + "').style.opacity=" + (0.9 - i), i * 1000 * speed); window.setTimeout("document.getElementById('" + whatdiv + "').style.mozOpacity=" + (0.9 - i), i * 1000 * speed); } } } function x_confirm(tekst, action) { if (document.getElementById("confirmlayer").style.visibility == "visible") return; document.getElementById("confirmlayer_tekst").innerHTML = tekst; t = document.getElementById("confirmlayer_yes").innerHTML; s = t.split("onclick=\""); s1 = s[0]; s2 = s[1].substring(s[1].indexOf('"') + 1); t = s1 + " onclick=\"un" + "wait('confirmlayer');x_" + "dropdowns(0,'wait');" + (action != "" ? unescape(action) : "") + "\" " +s2; document.getElementById("confirmlayer_yes").innerHTML = t; wait("confirmlayer"); } function x_alert(tekst, action) { if (document.getElementById("alertlayer").style.visibility == "visible") return; document.getElementById("alertlayer_tekst").innerHTML = tekst; t = document.getElementById("alertlayer_ok").innerHTML; s = t.split("onclick=\""); s1 = s[0]; s2 = s[1].substring(s[1].indexOf('"') + 1); t = s1 + " onclick=\"un" + "wait('alertlayer');x_"+"dropdowns(0,'wait');" + (action != "" ? unescape(action) : "") + "\" " +s2; document.getElementById("alertlayer_ok").innerHTML = t; wait("alertlayer"); } /* function x_dropdowns(x) { if (ie && iever < 7) { var o = document.getElementsByTagName('select'); for (dd = 0; dd < o.length; dd++) { o[dd].style.visibility = (x == 1 ? "hidden" : "visible"); //o[dd].style.display = (x == 1 ? "none" : "inline"); } } } */ function x_dropdowns(x, obj) { var mdd = document.getElementById(obj); var mdda = getpos(obj); if (ie && iever < 7) { var o = document.getElementsByTagName('select'); for (dd = 0; dd < o.length; dd++) { if (o[dd].id == "") o[dd].id = "x_auto_hide_dropdown_" + dd; var o_id = o[dd].id; var do_nothing = false; var tempEl = document.getElementById(o_id).offsetParent; while (tempEl != null && tempEl != undefined) { if (tempEl.tagName.toLowerCase() == "div" && tempEl.style.visibility == "hidden") { document.getElementById(o_id).style.visibility = "hidden"; do_nothing = true; break; } tempEl = tempEl.offsetParent; } if (!do_nothing) { var a = getpos(o_id); var x_show_select = true; if (a[0] > mdda[0] + mdd.offsetWidth) x_show_select = false; if (a[1] > mdda[1] + mdd.offsetHeight) x_show_select = false; if (a[0] + document.getElementById(o_id).offsetWidth < mdda[0]) x_show_select = false; if (a[1] + document.getElementById(o_id).offsetHeight < mdda[1]) x_show_select = false; if (x_show_select || x==0) o[dd].style.visibility = (x == 1 ? "hidden" : "visible"); } } } } function wait(wait2) { if (!unloading) { unloading = true; if (ie || 1==1) { pw = document.body.scrollWidth; ph = document.body.scrollHeight; cw = document.body.clientWidth; ch = document.body.clientHeight; sl = document.body.scrollLeft; st = document.body.scrollTop; } document.getElementById(wait2).style.top = Math.floor((ch - document.getElementById(wait2).offsetHeight) / 2) + st; document.getElementById(wait2).style.left = Math.floor((cw - document.getElementById(wait2).offsetWidth) / 2) + sl; document.getElementById('wait').style.width = pw; document.getElementById('wait').style.height = ph; document.getElementById('wait').style.zIndex = 999999998; document.getElementById(wait2).style.zIndex = 999999999; x_dropdowns(1, "wait"); document.getElementById('wait').style.visibility = "visible"; document.getElementById(wait2).style.visibility = "visible"; } } function unwait(wait2) { unloading = false; document.getElementById('wait').style.visibility = "hidden"; document.getElementById(wait2).style.visibility = "hidden"; } unloading = false; function mouseoverinit() { if (!document.getElementById) return; preloads = new Array(); imgs = document.getElementsByTagName('img'); for (i = 0; i < imgs.length; i++) { for (j = 0; j < imgs[i].attributes.length; j++) { tt = imgs[i].attributes[j].name.toUpperCase(); if (tt == "SWAP") { soff = imgs[i].getAttribute('src'); son = soff.replace("_off", "_on"); preloads[i] = new Image(); preloads[i].src = son; if (imgs[i].id.substring(0,3) != "nav") { imgs[i].onmouseover = new Function("imgs[" + i + "].src='" + son + "'"); imgs[i].onmouseout = new Function("imgs[" + i + "].src='" + soff + "'"); } } } } } function add_favorite(what, id) { geturl("/includes/add_favorite.php?type=" + what + "&id=" + id + "&random=" + new Date().getTime(), "favorite_result"); } function delete_favorite(what, id) { geturl("/includes/delete_favorite.php?type=" + what + "&id=" + id + "&random=" + new Date().getTime(), "favorite_result"); } function favorite_result(t) { if (t != "") { t = unescape(t); e = t.split("|"); if (e[1] == "add") x_alert(e[0]); if (e[1] == "delete") location.href = location.href.substring(0, location.href.indexOf("?")) + "?" + e[0].substring(0, 1).toLowerCase() + "d=true"; } } function trim(t) { while (t.substring(0,1) == " ") t = t.substring(1, t.length); while (t.substring(t.length - 1, t.length) == " ") t = t.substring(0, t.length - 1); return t; } function getRealLeft(el){ xPos = document.getElementById(el).offsetLeft; tempEl = document.getElementById(el).offsetParent; while (tempEl != null) { xPos += tempEl.offsetLeft; tempEl = tempEl.offsetParent; } return xPos; } function getRealTop(el){ yPos = document.getElementById(el).offsetTop; tempEl = document.getElementById(el).offsetParent; while (tempEl != null) { yPos += tempEl.offsetTop; tempEl = tempEl.offsetParent; } return yPos; } function getpos(isID){ trueX = getRealLeft(isID); trueY = getRealTop(isID); return Array(trueX,trueY); } function init() { doneloading = true; mouseoverinit(); try { homeinit(); } catch(e) { } } function clickcatch() { mout2(currentmenu); nosubmenus(); } var doneloading = false; onload = init; document.onclick = clickcatch;