// ##########################################################################################
function DoScriptsOnLoad() { //Struja
    //MM_showHideLayers('lywait', '', 'hide');
}

function DoScriptsOnBeforeUnload() { //Struja
    //MM_showHideLayers('lywait', '', 'show');
    //setTimeout('document.images["wt"].src = "images/busy.gif"', 200);
}

// ##########################################################################################
// ##########################################################################################
// ##########################################################################################

function shPOPadminupload(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    popupwin = window.open(tmpSwitches, 'POPadminslikaupload', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function POPadminslikaupload(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    popupwin = window.open(tmpSwitches, 'POPadminslikaupload', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function admup(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    popupwin = window.open(tmpSwitches, 'admup', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function POPexport(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    popupwin = window.open(tmpSwitches, 'POPexport', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function shDLGwin(tmpSwitches, W, H) { // Struja
    var stat;
    var strReturn;
    stat = "center:yes;dialogHide:no;edge:raised;help:no;resizable:yes;scroll:yes;status:no;unadorned:no;dialogHeight:" + H + "px;dialogWidth:" + W + "px;dialogTop: px; dialogLeft: px";

    //MM_showHideLayers('lywait', '', 'hide');

    strReturn = window.showModalDialog(tmpSwitches, 'DLGwin', stat);
    if (strReturn == 'OK') {
        __doPostBack('PostBackFromDialog', strReturn);
        //document.forms.form1.submit();
    }

   //MM_showHideLayers('lywait', '', 'hide');

}

function shDLGwinCAL(tmpSwitches, W, H) { // prerašen za AGE (samo za forme projekata)
    var stat;
    var strReturn;
    stat = "center:yes;dialogHide:no;edge:raised;help:no;resizable:yes;scroll:yes;status:no;unadorned:no;dialogHeight:" + H + "px;dialogWidth:" + W + "px;dialogTop: px; dialogLeft: px";

    //SetAsPostBack(1);
    
    //MM_showHideLayers('lywait', '', 'hide');

    strReturn = window.showModalDialog(tmpSwitches, 'DLGwinCAL', stat);
    if (strReturn == 'OK') {
        __doPostBack('PostBackFromDialog', strReturn);
        //document.forms.form1.submit();
    }
    else {
        setTimeout('SetAsPostBack(0);', 1000);
    }

    //MM_showHideLayers('lywait', '', 'hide');

}

function shDLGwinCAL1(tmpSwitches, W, H) { // prerašen za AGE (samo za forme projekata)
    var stat;
    var strReturn;
    stat = "center:yes;dialogHide:no;edge:raised;help:no;resizable:yes;scroll:yes;status:no;unadorned:no;dialogHeight:" + H + "px;dialogWidth:" + W + "px;dialogTop: px; dialogLeft: px";

    //SetAsPostBack(1);

    //MM_showHideLayers('lywait', '', 'hide');

    strReturn = window.showModalDialog(tmpSwitches, 'DLGwinCAL1', stat);

    var sr, tmpctl, tmpdate;
    sr = strReturn.substring(0, 2);

    if (sr == 'OK') {
        tmpdate = strReturn.substring(3, 13);
        tmpctl = strReturn.substring(14, strReturn.length);
        if (tmpctl != null && tmpdate != null) {
            document.getElementById(tmpctl).value = tmpdate;
        }
    }

    //MM_showHideLayers('lywait', '', 'hide');

}

function shDLGwinP(tmpSwitches, W, H) { // Struja
    var stat;
    var strReturn;
    stat = "center:yes;dialogHide:no;edge:raised;help:no;resizable:yes;scroll:yes;status:no;unadorned:no;dialogHeight:" + H + "px;dialogWidth:" + W + "px;dialogTop: px; dialogLeft: px";

    //MM_showHideLayers('lywait', '', 'hide');

    strReturn = window.showModalDialog(tmpSwitches, 'DLGwinP', stat);
    //    if (strReturn == 'OK') {
    //        __doPostBack('PostBackFromDialog', strReturn);
    //    }

    //MM_showHideLayers('lywait', '', 'hide');

}

function shPOP(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    // MM_showHideLayers('lywait','','hide');

    popupwin = window.open(tmpSwitches, 'shPOP', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function shPOPjobwindow(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    // MM_showHideLayers('lywait','','hide');

    popupwin = window.open(tmpSwitches, 'POPjobwindow', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

function POPslikaupload(tmpSwitches, W, H) { // Struja
    var stat;
    stat = "status=yes,toolbar=no,menubar=no,titlebar=yes,location=no,resizable=yes,scrollbars=no,height=" + H + ",width=" + W;

    popupwin = window.open(tmpSwitches, 'POPslikaupload', stat);
    popupwin.focus();
    //MM_showHideLayers('lywait', '', 'hide');
}

// ##########################################################################################
// ##########################################################################################
// ##########################################################################################

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
		
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
		
function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) { 
	    v=args[i+2];
	    if (obj.style) {
	        obj = obj.style;
	        v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; 
	        }
	        obj.visibility = v;
	        //setTimeout("MM_showHideLayers('lywait', '', 'hide');", 10000);
	    }
}		

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if (typeof deconcept == "undefined") { var deconcept = new Object(); } if (typeof deconcept.util == "undefined") { deconcept.util = new Object(); } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object(); } deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a) { if (!document.getElementById) { return; } this.DETECT_KEY = _a ? _a : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (_1) { this.setAttribute("swf", _1); } if (id) { this.setAttribute("id", id); } if (w) { this.setAttribute("width", w); } if (h) { this.setAttribute("height", h); } if (_5) { this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true; } if (c) { this.addParam("bgcolor", c); } var q = _7 ? _7 : "high"; this.addParam("quality", q); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var _c = (_8) ? _8 : window.location; this.setAttribute("xiRedirectUrl", _c); this.setAttribute("redirectUrl", ""); if (_9) { this.setAttribute("redirectUrl", _9); } }; deconcept.SWFObject.prototype = { useExpressInstall: function(_d) { this.xiSWFPath = !_d ? "expressinstall.swf" : _d; this.setAttribute("useExpressInstall", true); }, setAttribute: function(_e, _f) { this.attributes[_e] = _f; }, getAttribute: function(_10) { return this.attributes[_10]; }, addParam: function(_11, _12) { this.params[_11] = _12; }, getParams: function() { return this.params; }, addVariable: function(_13, _14) { this.variables[_13] = _14; }, getVariable: function(_15) { return this.variables[_15]; }, getVariables: function() { return this.variables; }, getVariablePairs: function() { var _16 = new Array(); var key; var _18 = this.getVariables(); for (key in _18) { _16[_16.length] = key + "=" + _18[key]; } return _16; }, getSWFHTML: function() { var _19 = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\""; _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" "; var _1a = this.getParams(); for (var key in _1a) { _19 += [key] + "=\"" + _1a[key] + "\" "; } var _1c = this.getVariablePairs().join("&"); if (_1c.length > 0) { _19 += "flashvars=\"" + _1c + "\""; } _19 += "/>"; } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">"; _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; var _1d = this.getParams(); for (var key in _1d) { _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; } var _1f = this.getVariablePairs().join("&"); if (_1f.length > 0) { _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; } _19 += "</object>"; } return _19; }, write: function(_20) { if (this.getAttribute("useExpressInstall")) { var _21 = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var n = (typeof _20 == "string") ? document.getElementById(_20) : _20; n.innerHTML = this.getSWFHTML(); return true; } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")); } } return false; } }; deconcept.SWFObjectUtil.getPlayerVersion = function() { var _23 = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { var axo = 1; var _26 = 3; while (axo) { try { _26++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26); _23 = new deconcept.PlayerVersion([_26, 0, 0]); } catch (e) { axo = null; } } } else { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch (e) { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23 = new deconcept.PlayerVersion([6, 0, 21]); axo.AllowScriptAccess = "always"; } catch (e) { if (_23.major == 6) { return _23; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch (e) { } } if (axo != null) { _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } } return _23; }; deconcept.PlayerVersion = function(_29) { this.major = _29[0] != null ? parseInt(_29[0]) : 0; this.minor = _29[1] != null ? parseInt(_29[1]) : 0; this.rev = _29[2] != null ? parseInt(_29[2]) : 0; }; deconcept.PlayerVersion.prototype.versionIsValid = function(fv) { if (this.major < fv.major) { return false; } if (this.major > fv.major) { return true; } if (this.minor < fv.minor) { return false; } if (this.minor > fv.minor) { return true; } if (this.rev < fv.rev) { return false; } return true; }; deconcept.util = { getRequestParameter: function(_2b) { var q = document.location.search || document.location.hash; if (_2b == null) { return q; } if (q) { var _2d = q.substring(1).split("&"); for (var i = 0; i < _2d.length; i++) { if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) { return _2d[i].substring((_2d[i].indexOf("=") + 1)); } } } return ""; } }; deconcept.SWFObjectUtil.cleanupSWFs = function() { var _2f = document.getElementsByTagName("OBJECT"); for (var i = _2f.length - 1; i >= 0; i--) { _2f[i].style.display = "none"; for (var x in _2f[i]) { if (typeof _2f[i][x] == "function") { _2f[i][x] = function() { }; } } } }; if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true; } } if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }; } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject;

function P7_getHW(t, a) { //v2.03 by PVII
    var r, p, h = 0, w = 0; if ((p = MM_findObj(a)) != null) {
        if (document.all || document.getElementById) {
            h = parseInt(p.offsetHeight); w = parseInt(p.offsetWidth);
            if (!h) { h = parseInt(p.style.pixelHeight); w = parseInt(p.style.pixelWidth); }
        } else if (document.layers) { h = parseInt(p.clip.height); w = parseInt(p.clip.width); } 
    }
    if (t == "width") { r = w; } else { r = h; } return r;
}

function P7_MM1dwt() { //v2.03 by PVII
    var g, lh, sw, fr = false;
    if (!document.p7mc) return;
    for (var x = 0; x < p7m1.length; x++) {
        tl = p7m1[x].id; lh = "P7CM1DWT0" + tl;
        if ((g = MM_findObj(lh)) != null) { fr = true; sw = 0; break; }
        lh = "P7CM1DWT1" + tl; if ((g = MM_findObj(lh)) != null) { fr = true; sw = 1; break; } 
    }
    if (fr) { eval("P7_trigMenuMagic1('" + tl + "'," + sw + ")"); }
}

function P7_setMenuMagic1() { //v2.03 by PVII
    var s, d, g, g2, gg, ww, kx, th, tu, ts, nu, xx, k = 0, pa = 0; args = P7_setMenuMagic1.arguments;
    if ((navigator.appName == "Netscape") && parseInt(navigator.appVersion) > 4 && navigator.userAgent.indexOf("Opera") == -1) { pa = "px"; }
    if (navigator.userAgent.indexOf("Opera") > -1) { P7OperaW = window.innerWidth; P7OperaH = window.innerHeight; }
    if (!document.p7mc) {
        p7m = new Array(); document.p7mc = true; p7ms = new Array(); document.P7_imswap = new Array(); document.P7_imswapo = new Array();
        p7m1 = new Array(); p7m2 = new Array(); p7mprop = new Object(); p7mprop.p7offset = args[0]; p7mprop.p7rate = args[1];
        p7mprop.p7delay = args[2]; p7mprop.p7bottom = args[3];
        if (document.layers) { p7mprop.p7pageh = document.height; } 
    }
    for (var x = 4; x < args.length; x += 3) {
        if ((g = MM_findObj(args[x])) != null) {
            p7m[k] = args[x]; g.p7imname = args[x + 2]; g.p7sub = args[x + 1];
            g2 = MM_findObj(args[x + 2]); tu = g2.src; ts = tu.lastIndexOf(".");
            nu = tu.substring(0, ts) + "_open" + tu.substring(ts, tu.length);
            nu2 = tu.substring(0, ts) + "_over" + tu.substring(ts, tu.length);
            document.P7_imswap[k] = new Image(); document.P7_imswap[k].src = nu;
            document.P7_imswapo[k] = new Image(); document.P7_imswapo[k].src = nu2; k++;
        } 
    }
    var lf = 0; for (var j = 0; j < p7m.length; j++) {
        if ((g = MM_findObj(p7m[j])) != null) {
            d = (document.layers) ? g : g.style; p7m1[j] = g; g.p7waiting = false;
            if (j == 0) { lf = parseInt(d.left); th = parseInt(d.top); }
            if (j > 0) { d.left = (lf + pa); th += P7_getHW('height', p7m[j - 1]); d.top = (th + pa); }
            if ((s = MM_findObj(g.p7sub)) != null) {
                p7m2[j] = s; ww = P7_getHW('width', g.p7sub);
                kx = lf - ww - 20; dd = (document.layers) ? s : s.style;
                dd.left = (kx + pa); dd.top = (th + pa); p7ms[j] = th; dd.visibility = "visible"; s.p7open = false; s.p7waiting = false;
            } 
        } 
    }
    if ((g = MM_findObj(p7mprop.p7bottom)) != null) {
        d = (document.layers) ? g : g.style;
        d.left = (lf + parseInt(args[0]) + pa); th += P7_getHW('height', p7m[p7m.length - 1]); d.top = (th + pa);
    }
}

function P7_wait(a) { //v2.03 by PVII
    var ma, mb; if ((mb = MM_findObj(a)) != null) {
        if (!mb.p7waiting || mb.p7waiting == "none") { return; }
        ma = mb.p7waiting; mb.p7waiting = false; eval(ma);
    }
}

function P7_trigMenuMagic1(a, sw) { //v2.03 by PVII
    var x, g, gg, d, dd, w, lp, tp, im, im2, ts, nu, e, pa = 0;
    if (!document.p7mc) return;
    if ((navigator.appName == "Netscape") && parseInt(navigator.appVersion) > 4 && navigator.userAgent.indexOf("Opera") == -1) { pa = "px"; }
    if (navigator.userAgent.indexOf("Opera") > -1) { if (P7OperaW != window.innerWidth || P7OperaH != window.innerHeight) P7_setMenuMagic1(); }
    var ofs = parseInt(p7mprop.p7offset), trt = parseInt(p7mprop.p7rate);
    var tdy = parseInt(p7mprop.p7delay), tsb, tlf, tst;
    for (x = 0; x < p7m.length; x++) {
        if (p7m[x] == a) {
            d = p7m1[x]; dd = (document.layers) ? d : d.style; g = p7m2[x]; gg = (document.layers) ? g : g.style;
            e = MM_findObj(d.p7imname); im = e.src; ts = im.replace("_open", ""); ts = ts.replace("_over", "");
            if (!g.p7open) {
                tst = "closed"; im2 = ts.lastIndexOf(".");
                nu = ts.substring(0, im2) + "_open" + ts.substring(im2, ts.length); ts = nu;
            } else { tst = "open" } break;
        } 
    }
    for (j = 0; j < p7m.length; j++) {
        d = p7m1[j]; dd = (document.layers) ? d : d.style; g = p7m2[j]; gg = (document.layers) ? g : g.style;
        if (j == 0) { tlf = parseInt(dd.left); }
        if (g.p7open) {
            w = P7_getHW('width', d.p7sub) + 20; w -= parseInt(dd.left); w *= -1; d.p7waiting = false;
            eval("P7_BM1('" + d.p7sub + "'," + w + "," + parseInt(gg.top) + "," + trt + "," + tdy + ",0,0)");
        }
        d.p7waiting = false; g.p7open = false;
        if (parseInt(sw) == 1) { e = MM_findObj(d.p7imname); im = e.src; im2 = im.replace("_open", ""); e.src = im2; } 
    }
    var tnt = new Array(); var df = 0, tcd = 0, tdl = p7m[0];
    for (j = 0; j < p7m.length; j++) {
        d = p7m1[j]; dd = (document.layers) ? d : d.style; g = p7m2[j]; gg = (document.layers) ? g : g.style;
        if (j == 0) { th = parseInt(dd.top); } tnt[j] = th; df = Math.abs(parseInt(dd.top) - th);
        if (df > tcd) { tdl = p7m[j]; tcd = df; } th += P7_getHW('height', p7m[j]);
        if (x == j && tst == "closed") { tsb = th; th += P7_getHW('height', d.p7sub); } p7ms[j] = th;
    }
    if (tst == "closed") {
        d = p7m1[x]; dd = (document.layers) ? d : d.style;
        g = p7m2[x]; gg = (document.layers) ? g : g.style; lp = tlf + ofs;
        gg.top = (tsb + pa); p7ms[x] = tsb; gg.visibility = "visible"; e = MM_findObj(d.p7imname);
        if (parseInt(sw) == 1) { e.src = ts; } var r; g.p7open = true; r = MM_findObj(tdl);
        r.p7waiting = "P7_BM1('" + d.p7sub + "'," + lp + "," + tsb + "," + trt + "," + tdy + ",0,0)";
    } else { d = p7m1[p7m1.length - 1]; d.p7waiting = "none"; }
    for (j = 0; j < p7m.length; j++) { eval("P7_BM1('" + p7m[j] + "'," + tlf + "," + tnt[j] + "," + trt + "," + tdy + ",0,0)"); }
    if ((g = MM_findObj(p7mprop.p7bottom)) != null) {
        d = (document.layers) ? g : g.style; g.p7waiting = false;
        eval("P7_BM1('" + p7mprop.p7bottom + "'," + (tlf + ofs) + "," + th + "," + trt + "," + tdy + ",0,0)");
        th += (document.layers) ? P7_getHW('height', p7mprop.p7bottom) : 0;
    }
    if (document.layers) {
        var tw2 = document.width;
        if (document.height < th) { document.height = th; document.width = tw2; } 
    }
}

function P7_rollCMenu1(ev, a, b) { //v2.02 by PVII
    var e, im, ts, j, nu, g, tev = ev.type;
    if (!document.p7mc) return;
    if (tev == "mouseover") {
        for (var x = 0; x < p7m.length; x++) {
            if (p7m[x] == a) {
                g = p7m2[x]; if (parseInt(b) == 0 && g.p7open) { break; return; }
                e = MM_findObj(p7m1[x].p7imname); im = e.src; ts = im.replace("_open", "");
                ts = ts.replace("_over", ""); j = ts.lastIndexOf(".");
                e.src = ts.substring(0, j) + "_over" + ts.substring(j, ts.length); break;
            } 
        }
    } else if (tev == "mouseout") {
        for (var x = 0; x < p7m.length; x++) {
            if (p7m[x] == a) {
                e = MM_findObj(d = p7m1[x].p7imname); im = e.src;
                g = p7m2[x]; ts = im.replace("_open", ""); ts = ts.replace("_over", "");
                if (g.p7open) {
                    j = ts.lastIndexOf(".");
                    nu = ts.substring(0, j) + "_open" + ts.substring(j, ts.length);
                } else { nu = ts; } e.src = nu; break;
            } 
        } 
    }
}

function P7_setScroller(a, b, x, y) { //v2.9 by PVII
    var g, d, dd, w, ww, pa = "";
    if ((parseInt(navigator.appVersion) > 4 || navigator.userAgent.indexOf("MSIE") > -1) && navigator.userAgent.indexOf("Opera") == -1) { pa = "px"; }
    if ((g = MM_findObj(a)) != null && (d = MM_findObj(b)) != null) {
        if (g.p7Scroll) {
            if ((w = MM_findObj(g.p7Scroll)) != null) {
                ww = (document.layers) ? w : w.style; ww.visibility = "hidden";
            } 
        }
        g.p7Scroll = b; dd = (document.layers) ? d : d.style; dd.left = parseInt(x) + pa;
        dd.top = parseInt(y) + pa; dd.visibility = "visible"; g.p7sCycle = 0;
        if (document.layers) {
            g.p7sTop = g.clip.top; g.p7sBot = g.clip.bottom;
            g.p7sRight = g.clip.right; g.p7sLeft = g.clip.left; g.p7sStartTop = parseInt(y); g.p7sStartLeft = parseInt(x);
        } else if (g.style.clip) {
            var tc = g.style.clip; var j = tc.indexOf("(");
            tc = tc.substring(j + 1, tc.length - 1); var tr = tc.split(" ");
            if (tc.length < 1) { tr[0] = 0; tr[3] = 0; tr[2] = g.style.pixelHeight; tr[1] = g.style.pixelWidth; }
            g.p7sTop = parseInt(tr[0]); g.p7sRight = parseInt(tr[1]); g.p7sBot = parseInt(tr[2]);
            g.p7sLeft = parseInt(tr[3]); g.p7sStartTop = parseInt(y); g.p7sStartLeft = parseInt(x);
        } else {
            g.p7sTop = 0; g.p7sRight = g.offsetWidth; g.p7sBot = g.offsetHeight;
            g.p7sLeft = 0; g.p7sStartTop = parseInt(y); g.p7sStartLeft = parseInt(x);
        } 
    }
    g.toMove = true;
}

function P7_moveScroll(co, md, op, dy, cy) { //v2.9 by PVII
    var g, d, dd, x, y, h, w, tt, ff, m = false, pa = "";
    op = parseInt(op); cy = parseInt(cy); dy = parseInt(dy);
    if ((parseInt(navigator.appVersion) > 4 || navigator.userAgent.indexOf("MSIE") > -1) && navigator.userAgent.indexOf("Opera") == -1) { pa = "px"; }
    if ((g = MM_findObj(co)) == null) { return; }
    if ((d = MM_findObj(g.p7Scroll)) == null) { return; }
    var sp = parseInt(sp = g.P7Ssp), fr = parseInt(g.P7Sfr), ff = fr;
    if (op == 2) { g.p7sCycle = 0; g.p7sCycDy = (dy > 0) ? dy : g.p7sCycDy; dy = 0; op = 3; }
    if (op == 3) {
        g.p7sCycle += sp; ff = fr; if (parseInt(g.p7sCycle) > cy) {
            op = 2; g.p7sCycle = 0; ff = g.p7sCycDy;
        } 
    } g.P7Sop = op; if (dy > 0) { ff = dy; }
    var ti = "g.p7Magic=setTimeout(\"P7_moveScroll('" + co + "','" + md + "'," + op + ",0," + cy + ")\"," + ff + ")";
    if (op == 2 || dy > 0) { clearTimeout(g.p7Magic); eval(ti); return; }
    dd = (document.layers) ? d : d.style; x = parseInt(dd.left); y = parseInt(dd.top);
    if (document.all || document.getElementById) {
        h = parseInt(d.offsetHeight); w = parseInt(d.offsetWidth);
        if (!h) { h = parseInt(d.style.pixelHeight); w = parseInt(d.style.pixelWidth); }
    } else if (document.layers) { h = parseInt(d.clip.height); w = parseInt(d.clip.width); }
    var st = 0, rStart = parseInt(g.p7sStartLeft), tStart = parseInt(g.p7sStartTop); g.p7sH = h; g.p7sW = w;
    if (md == "Down") {
        tt = y - sp; st = parseInt(g.p7sBot) - h - tStart;
        if (tStart < 0 && tt < tStart) {
            dd.top = tStart + pa;
        } else if (tStart >= 0 && tt < st) { dd.top = st + pa; } else { dd.top = tt + pa; m = true; } 
    }
    if (md == "Up") {
        tt = sp + y; var rEnd = tStart + h; if (tStart < 0 && tt > rEnd) {
            dd.top = rEnd + pa;
        } else if (tStart >= 0 && tt > tStart) { dd.top = tStart + pa; } else { dd.top = tt + pa; m = true; } 
    }
    if (md == "Right") {
        tt = x - sp; st = parseInt(g.p7sRight) - w - rStart;
        if (rStart < 0 && tt < rStart) {
            dd.left = rStart + pa;
        } else if (rStart >= 0 && tt < st) { dd.left = st + pa; } else { dd.left = tt + pa; m = true; } 
    }
    if (md == "Left") {
        tt = x + sp; var rEnd = rStart + w; if (rStart < 0 && tt > rEnd) {
            dd.left = rEnd + pa;
        } else if (rStart >= 0 && tt > rStart) { dd.left = rStart + pa; } else { dd.left = tt + pa; m = true; } 
    }
    if (m && g.toMove) { eval(ti); } else {
        if (g.P7Sflip == 1) {
            clearTimeout(g.p7Magic); var tj = 0;
            eval("g.p7Magic=setTimeout(\"P7_runScroller('" + co + "','Reverse','Medium',0,0,0,1)\"," + tj + ")");
        } else {
            if (op > 0 && g.toMove) {
                g.p7sCycle = 0; dd.top = g.p7sStartTop + pa; dd.left = g.p7sStartLeft + pa; eval(ti);
            } 
        } 
    }
}

function P7_runScroller(co, md, spd, op, dy, cy, flp) { //v2.9 by PVII
    var g, d, dd, rl = 0; rt = 0; pa = '', sp = 2, fr = 10, slw = true, kl = true;
    if ((parseInt(navigator.appVersion) > 4 || navigator.userAgent.indexOf("MSIE") > -1) && navigator.userAgent.indexOf("Opera") == -1) { pa = "px"; }
    if (navigator.userAgent.indexOf("NT") > -1 || navigator.userAgent.indexOf("Windows 2000") > -1) { slw = false; }
    if ((g = MM_findObj(co)) != null) {
        if (g.p7Scroll) {
            if ((d = MM_findObj(g.p7Scroll)) != null) {
                dd = (document.layers) ? d : d.style;
                if (md == "Resume" && g.P7Sspd) { spd = g.P7Sspd; md = g.P7Smd; op = g.P7Sop; dy = 0; cy = g.P7Scy; flp = g.P7Sflip; kl = false; }
                if (md == "Reverse" && g.P7Sspd) {
                    spd = g.P7Sspd; md = g.P7Smd; op = g.P7Sop; flp = g.P7Sflip; dy = 0; cy = g.P7Scy; kl = false; g.p7sCycle = 0;
                    if (g.P7Smd == "Down") { md = "Up"; if (g.P7Sop > 0) { g.p7sStartTop = g.p7sStartTop - g.p7sH; } }
                    if (g.P7Smd == "Up") { md = "Down"; if (g.P7Sop > 0) { g.p7sStartTop = g.p7sStartTop + g.p7sH; } }
                    if (g.P7Smd == "Left") { md = "Right"; if (g.P7Sop > 0) { g.p7sStartLeft = g.p7sStartLeft + g.p7sW; } }
                    if (g.P7Smd == "Right") { md = "Left"; if (g.P7Sop > 0) { g.p7sStartLeft = g.p7sStartLeft - g.p7sW; } } 
                }
                if (spd == "Slow") {
                    sp = (slw) ? 1 : 1; fr = (slw) ? 50 : 50;
                } else if (spd == "Medium") {
                    sp = (slw) ? 4 : 1; fr = (slw) ? 40 : 10;
                } else { sp = (slw) ? 8 : 4; fr = (slw) ? 40 : 10; }
                if (md == "Stop") { g.toMove = false; clearTimeout(g.p7Magic); } else if (md == "Reset") {
                    g.toMove = false; dd.top = g.p7sStartTop + pa; dd.left = g.p7sStartLeft + pa;
                } else {
                    if (kl) { g.P7Ssp = sp; g.P7Sfr = fr; } if (md == "Speed") { return; }
                    g.toMove = true; clearTimeout(g.p7Magic);
                    g.P7Smd = md; g.P7Sspd = spd; g.P7Sop = op; g.P7Sdy = dy; g.P7Scy = cy; g.P7Sflip = flp;
                    eval("P7_moveScroll('" + co + "','" + md + "'," + op + "," + dy + "," + cy + ")");
                } 
            } 
        } 
    }
}

function P7_BM1(el, x, y, a, b, c, s) { //v2.03 by PVII
    var g, elo = el, f = "", m = false, d = ""; x = parseInt(x); y = parseInt(y);
    var t = 'g.p7BM = setTimeout("P7_BM1(\'' + elo + '\',';
    if ((g = MM_findObj(el)) != null) { d = (document.layers) ? g : g.style; } else { return; }
    var xx = (parseInt(d.left)) ? parseInt(d.left) : 0;
    var yy = (parseInt(d.top)) ? parseInt(d.top) : 0;
    var i = parseInt(a);
    if (eval(g.moved)) { clearTimeout(g.p7BM); }
    if (xx < x) { xx += i; m = true; if (xx > x) { xx = x; } }
    if (xx > x) { xx -= i; m = true; if (xx < x) { xx = x; } }
    if (yy < y) { yy += i; m = true; if (yy > y) { yy = y; } }
    if (yy > y) { yy -= i; m = true; if (yy < y) { yy = y; } }
    if (m) {
        if ((navigator.appName == "Netscape") && parseInt(navigator.appVersion) > 4 && navigator.userAgent.indexOf("Opera") == -1) {
            xx += "px"; yy += "px";
        }
        d.left = xx; d.top = yy; g.moved = true; eval(t + x + ',' + y + ',' + a + ',' + b + ',' + c + ',0)",' + b + ')');
    } else { g.moved = false; P7_wait(elo); }

}
