// This code can be reused as long as the following notice is maintained

// Copyright 1999 InsideDHTML.com, LLC
// For more information, see www.siteexperts.com

var NS = (navigator.appName == 'Netscape')

function doOver() {
  // Destination is the window - update status
  if (this.dest==window) {
    window.status = this.overValue
    return true
  }
  // Destination is the input element - update value
  else if ((this.dest.type!=null) && ((this.dest.type=="text") 
    || (this.dest.type=="textarea")))
    this.dest.value = this.overValue
  // Destination is an image - update src
  else if (this.dest.src!=null) 
    this.dest.src = this.overValue
  return true
}

function doOut() {
  // Destination is the window, clear status
  if (this.dest==window)
    window.status=""
  // Destination is the input element, set default value
  else if (this.dest.type!=null)
    this.dest.value=this.dest.defaultValue
  // Destination is an image, reset original image
  else if (this.dest.src)
    this.dest.src = this.dest.osrc
}

function OverEffect(src,dest,overValue) {
  // Assign onmouseover handler
  src.onmouseover = doOver
  // Assign onmouseout handler
  src.onmouseout = doOut
  // Store the destination element on the src
  src.dest = dest
  // Store the overValue on the src
  src.overValue= overValue
  // If an image, start downloading
  if (dest.src!=null) {
    dest.osrc = dest.src
    var i = new Image()
    i.src = src.overValue
  }
}

function InitOverEffect(src,dest,overValue) {
  // Setup over effect
  OverEffect(src,dest,overValue)
  // Make sure first rollover is applied
  return src.onmouseover()
}

function InitIOverEffect(src,dest,overValue,statusText) {
  // Setup over effect
  IOverEffect(src,dest,overValue,statusText)
  // Make sure first rollover is applied
  return src.onmouseover()
}

function doIOver() {
  // Destination is the window - update status
  window.status = this.statusText
  // Destination is the input element - update value
  this.dest.src = this.overValue
  return true
}

function doIOut() {
  // Destination is the window, clear status
  window.status=""
  // Destination is the input element, set default value
  this.dest.src = this.dest.osrc
}

function IOverEffect(src,dest,overValue,statusText) {
  // Assign onmouseover handler
  src.onmouseover = doIOver
  // Assign onmouseout handler
  src.onmouseout = doIOut
  // Store the destination element on the src
  src.dest = dest
  // Store the overValue on the src
  src.overValue= overValue
  src.statusText = statusText
  // If an image, start downloading
  if (dest.src!=null) {
    dest.osrc = dest.src
    var i = new Image()
    i.src = src.overValue
  }
}
// Pridane 9. marca 2001
function doTOver() {
  // Destination is the window - update status
  window.status = this.overValue
  if (!NS) {
    this.style.color = this.overColor
  }
  return true
}

function doTOut() {
  // Destination is the window, clear status
  window.status=""
  if (!NS) {
    this.style.color = this.oldColor
  }
}

function TOverEffect(src,dest,overValue,overColor) {
  // Assign onmouseover handler
  src.onmouseover = doTOver
  // Assign onmouseout handler
  src.onmouseout = doTOut
  // Store the destination element on the src
  src.dest = dest
  // Store the overValue on the src
  src.overValue= overValue
  if (!NS) {
    src.overColor= overColor
    src.oldColor= src.style.color
  }
}

function InitTOverEffect(src,dest,overValue,overColor) {
  // Setup over effect
  TOverEffect(src,dest,overValue,overColor)
  // Make sure first rollover is applied
  return src.onmouseover()
}
function doLoad() {
//Can also setup from script
//OverEffect(document.links[0],window,"Hello World")
}

//window.onload = doLoad
var WmW = 0;
var WmH = 0;
var WmT = 0;
var WmL = 0;
var ZIN = 0;
var oldWmTop = 82;
var us = null;
var bool = true;
function WMMoving(){
	oldWmW = WmW;
	WmW = document.body.clientWidth;
	oldWmH = WmH;
	WmH = document.body.clientHeight;
	oldWmT = WmT;
	WmT = document.body.scrollTop;
	oldWmL = WmL;
	WmL = document.body.scrollLeft;
	if(bool||((WmW!=oldWmW)||(WmH!=oldWmH))||((WmT!=oldWmT)||(WmL!=oldWmL))){
		allDivs= document.all.tags("DIV");
		if(us==null){for(i=0; i<allDivs.length; i++){
			us=allDivs(i);if(us.id == "Valley") break;
		}
	};
	if(us!=null){
		us.style.left=WmW+WmL-151;
		newWmTop=WmH+WmT-151;
		if(Math.abs(newWmTop-oldWmTop)<3){
			bool=false
		} else {
			if(newWmTop<oldWmTop){
				oldWmTop-=2
			} else {
				oldWmTop+=2
			};
			bool=true
		};
		us.style.top=oldWmTop;
		for (i=0; i<allDivs.length; i++){
			templay= allDivs(i);
			if (templay.style.zIndex > ZIN) us.style.zindex = (templay.style.zIndex + 1);
		}
	}
}
}
//if ((document.all) || (document.layers)){setInterval("WMMoving()",50)};
 
