// Image 'hovering div' script v1.2 (Dec 2006)
// By Henric Blomgren (henric@digitalroutes.co.uk)
// Copyright Digital Routes Ltd 2006, all rights reserved.
// Use, sale, storage, modification of this script without
// written permission from Digital Routes Ltd is not allowed.

var agt=navigator.userAgent.toLowerCase();
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

function ShowImg(d,img) {
	padding = '140'; // Number of pixels (from the top of the document) to align the floating div
	document.getElementById(d).style.display = "";
	if(is_ie == false && document.documentElement.scrollTop < padding) {
		document.getElementById(d).style.top = padding;
	} else if(is_ie == false) {
		document.getElementById(d).style.top = document.documentElement.scrollTop + 'px;';
	} else if(is_ie == true) {
		var ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
		if(ignoreMe < padding) {
		var diff = padding - ignoreMe;
		var x = document.getElementById(d);
		x.style.top = ignoreMe + diff +" px";
	} else {
		var x = document.getElementById(d);
		x.style.top = ignoreMe + " px";
	}
	}
	document.getElementById(d).innerHTML = "<img src='"+img+"' alt='[Dynamic image]'>";
	return true;
}

function HideImg(d) {
	document.getElementById(d).style.display = "none";
	document.getElementById(d).innerHTML = "";
	return true;
}
