
if (document.all && !document.getElementById) {
  document.getElementById = function(id) { return document.all[id]; }
}
var isOpera = (navigator.userAgent.indexOf('Opera') != -1);
var isIE = (!isOpera && navigator.userAgent.indexOf('MSIE') != -1)

function GetXSize() {
 var XSize = 0;
 if( typeof( window.innerWidth ) == 'number' ) { XSize = window.innerWidth; }
 else if ( document.documentElement && document.documentElement.clientWidth ) { XSize = document.documentElement.clientWidth; }
 else if ( document.body && document.body.clientWidth ) { XSize = document.body.clientWidth; }
 return XSize;
}

function GetYSize() {
 var YSize = 0;
 if( typeof( window.innerWidth ) == 'number' ) { YSize = window.innerHeight; }
 else if ( document.documentElement && document.documentElement.clientHeight ) { YSize = document.documentElement.clientHeight; }
 else if ( document.body && document.body.clientHeight ) { YSize = document.body.clientHeight; }
 return YSize;
}

function GetXOffset() {
  var XOffset = 0;
  if (typeof( window.pageXOffset ) == 'number' ) { XOffset = window.pageXOffset; }
  else if ( document.body && document.body.scrollLeft ) { XOffset = document.body.scrollLeft; } 
  else if( document.documentElement && document.documentElement.scrollLeft ) { XOffset = document.documentElement.scrollLeft; }
    return XOffset;
}

function GetYOffset() {
  var YOffset = 0;
  if (typeof( window.pageYOffset ) == 'number' ) { YOffset = window.pageYOffset; }
  else if ( document.body && document.body.scrollTop ) { YOffset = document.body.scrollTop; }
  else if ( document.documentElement && document.documentElement.scrollTop ) { YOffset = document.documentElement.scrollTop; }
    return YOffset;
}

function GetXPos(e) {
  var XPos = 0; 
  if (!e) { e = window.event; }
  XPos = e.clientX;
  if (isIE) { XPos += document.body.scrollLeft; }
  return XPos;
}

function GetYPos(e) {
  var YPos = 0;
  if (!e) { e = window.event; }
  YPos = e.clientY;
  if (isIE) { YPos += document.body.scrollTop; }
  return YPos;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function delayhidemenu(timer){
 objtimer=setTimeout("hidemenu()",timer)
} 

function delayhidethumbs(timer){
 objtimer=setTimeout("hidethumbs()",timer)
} 

function stoptimer() {
 clearTimeout(objtimer);
}

function doIt(e) {
  var before = (GetXSize() - 834) / 2;
  var after  = before + 834;
  if (!e) var e = window.event;
  var current = GetXPos(e);
  if (current < before)
    document.location = previous; 
  if (current > after)
    document.location = next;
}

function ClearText(o) {
 o.value = "";
}
 
function CheckText(o, d) {
 if (o.value.length < 2) 
  o.value = d;
}

