var showLargeTime=60000;

function gO(pObj)
 {return document.getElementById(pObj)}

function makeObj(pObj,pValue)
 {if(gO(pObj)==null)return;
  gO(pObj).innerHTML=pValue}

function ShowObj(pObj)
 {if(gO(pObj)==null)return;
  gO(pObj).style.visibility="visible"}

function HideObj(pObj)
 {if(gO(pObj)==null)return;
  gO(pObj).style.visibility="hidden"}

var state_big=false;

function changeStyle(pObj,pOldStyle,pNewStyle)
{if(gO(pObj)==null)return;
 oldClass=document.getElementById(pObj).className;
 if(oldClass.indexOf(pOldStyle)==-1)return;
 style=oldClass.substr(0,oldClass.indexOf(pOldStyle))+pNewStyle+oldClass.substr(oldClass.indexOf(pOldStyle)+pOldStyle.length-1,oldClass.length)
 document.getElementById(pObj).className=style;
 document.getElementById(pObj).setAttribute("class",style)}

function pressKey(pEvent,pLeft,pRight,pUp,pDown)
 {eventCode=pEvent.which;
  if(document.all)eventCode=pEvent.keyCode;
  if(eventCode==37&&pLeft!=null)location.href=pLeft;
  if(eventCode==39&&pRight!=null)location.href=pRight;
  if(eventCode==38&&pUp!=null)location.href=pUp;
  if(eventCode==40&&pDown!=null)location.href=pDown}

var gLeft="";
var gRight="";
var gUp="";
var gDown="";

function registerNaviKeys(pLeft,pRight,pUp,pDown)
 {gLeft=pLeft;
  gRight=pRight;
  gUp=pUp;
  gDown=pDown}

function navigateByKey(pEvent)
 {eventCode=pEvent.which;
  if(document.all)eventCode=pEvent.keyCode;
  if(eventCode==37&&gLeft!=null)location.href=gLeft;
  if(eventCode==39&&gRight!=null)location.href=gRight;
  if(eventCode==38&&gUp!=null)location.href=gUp;
  if(eventCode==40&&gDown!=null)location.href=gDown}

function navigateByMouse(pNext)
 {if(pNext)location.href=gRight
  else location.href=gLeft}

function navigateByMouseCat(pNext)
 {if(pNext)location.href=gUp
  else location.href=gDown}

function makeCounter(pID)
 {//makeObj('siteCounter','<img src="http://www.menzel-fotografie.com/cgi-bin/counting.php.cgi?counterid='+pID+'" alt="you will see!" title="you will see!"/>')
  }

function showLarge(pForce)
{state_big=!state_big;
 if(pForce!=null)state_big=pForce;
 if(state_big)
  {HideObj("contentmenu_hr");
   HideObj("contentmenu");
   HideObj("thumbs");
   HideObj("thumbs2");
   changeStyle("next","next ","nonext ");
   changeStyle("prev","prev ","noprev ");
   //changeStyle("nextSmall","nextSmall ","nonextSmall ");
   //changeStyle("prevSmall","prevSmall ","noprevSmall ");
   HideObj("categoriemenu");
   HideObj("actions_left");
   HideObj("actions_right");
   HideObj("menutree");
   ShowObj("description")}
 else
  {ShowObj("contentmenu_hr");
   ShowObj("contentmenu");
   ShowObj("thumbs");
   ShowObj("thumbs2");
   changeStyle("next","nonext ","next ");
   changeStyle("prev","noprev ","prev ");
   //changeStyle("nextSmall","nonextSmall ","nextSmall ");
   //changeStyle("prevSmall","noprevSmall ","prevSmall ");
   ShowObj("categoriemenu");
   ShowObj("menutree");
   HideObj("description")}} 