/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Jeroen Haan :: http://www.haan.net/ */
 
/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */
x = 20;
y = 70;
function setVisible(obj, path, optWidth, optHeight)
{
	var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
	var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
	objimg = document.getElementById("popupimage");
	objimg.src=path;
	obj = document.getElementById(obj);
	obj.style.width=actualWidth +"px";
	obj.style.height=actualHeight +"px";
	obj.style.visibility = 'visible';
}
function setClosed(obj)
{
	obj = document.getElementById(obj);
	//obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	obj.style.visibility = 'hidden';
}
function placeIt(obj,optLeft, optTop)
{
	obj.style.left = optLeft + 'px' ;
	obj.style.top = optTop + 'px' ;	
}


/*
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('imagelayer')",500);
}
window.onscroll = setTimeout("placeIt('imagelayer')",500);
*/