﻿<!--

var IE = (document.all ? true : false);
if (!IE) document.captureEvents(Event.MOUSEMOVE)

function getMouseX(e){
 if (IE) {
  return event.clientX + document.body.scrollLeft;
 } else {
  return e.pageX;
 }  
}

function getMouseY(e) {
 if (IE) {
  return event.clientY + document.body.scrollTop;
 } else {
  return e.pageY;
 }  
}

function hover(id){
 var obj = document.getElementById('mnuE' + id);
 var txt = document.getElementById('mnuT' + id);
 var mnu = document.getElementById('mnu' + id);
 
 if (obj){
  obj.className = getAtt(obj, 'cn') + (obj.className.substr(obj.className.length - 2) == 'On' ? '' : 'On');
  txt.className = getAtt(txt, 'cn') + (txt.className.substr(txt.className.length - 2) == 'On' ? '' : 'On');
  
  if (mnu){
   if (mnu.className == 'hide'){
    mnu.className = getAtt(mnu, 'cn');
    mnu.style.top = (getTop(obj) + obj.offsetHeight) + 'px';
    mnu.style.left = getLeft(obj) + 'px';
   } else {
    mnu.className = 'hide';
   }
  }
 }
}
  
function getTop(obj){
 if (obj.offsetParent == null){
  return obj.offsetTop;
 } else {
  return getTop(obj.offsetParent) + obj.offsetTop;
 }
}

function getLeft(obj){
 if (obj.offsetParent == null){
  return obj.offsetLeft;
 } else {
  return getLeft(obj.offsetParent) + obj.offsetLeft;
 }
}

function hasAtt(obj, att){
 return obj.attributes[att];
}

function getAtt(obj, att){
 if (hasAtt(obj, att)){
  return obj.attributes[att].value;
 } else {
  return null;
 }
}

function setAtt(obj, name, value){
	if (obj.attributes){
		var attr = obj.attributes.getNamedItem(name);
		if (!attr){
			attr = document.createAttribute(name);
			obj.attributes.setNamedItem(attr)
		}
		attr.nodeValue = value;
	} else {
		obj[name] = value;
	}
}

function hoverImage(obj){
 document.getElementById('imgFull').style.display = '';
 document.getElementById('imgFull').src = obj.src;
 document.getElementById('aFull').href = obj.src;
 document.getElementById('tdLabel').innerText = getAtt(obj, 'lbl');
}

var imgPre = null;

function hoverThumbnail(obj, b){
 if (imgPre == null){
  imgPre = document.getElementById('imgPreview');
 }
 if (b){
  imgPre.src = obj.src.replace('/Thumbnails', '');
  imgPre.style.display = '';
  imgPre.style.left = getMouseX(event) - (imgPre.offsetWidth / 2);
  imgPre.style.top = getTop(obj) + 95;
 } else {
  imgPre.style.display = 'none';
 }
}

/*
var waxing = new Array();
var waning = new Array();
var bResizing = false;

function hoverThumbnail(obj, b){
 var i;
 if (b){
  i = inArr(waning, obj);
  if (i != -1){
   waning[i] = null;
  }
  obj.style.position = "relative";
  obj.style.top = 0;
  obj.style.left = 0;
  waxing[waxing.length] = obj;
 } else {
  waxing[waxing.length] = null;
  waning[waning.length] = obj;
 }
 if (!bResizing){
  bResizing = true;
  resizeImages();
 }
}

function resizeImages(){
 for (var i = 0; i < waxing.length; i++){
  if (waxing[i] != null){
   if (waxing[i].height >= 250){
    waxing[i] = null;
   } else {
    waxing[i].height += 20;
    //waxing[i].style.top = parseInt(waxing[i].style.top) - 20;
   }
  }
 }
 for (var i = 0; i < waning.length; i++){
  if (waning[i] != null){
   if (waning[i].height <= 60){
    waning[i] = null;
   } else {
    waning[i].height -= 3;
    //waning[i].style.top = parseInt(waning[i].style.top) + 3;
   }
  }
 }
 setTimeout('resizeImages();', 20);
}

function inArr(a, obj){
 for (var i = 0; i < a.length; i++){
  if (a[i] == obj){
   return i;
  }
 }
 return -1;
}
*/
-->