// JavaScript Document
/* -----------------------------------------------
   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.
  ------------------------------------------------ */
function show (id, opacity) {
	id.style.opacity = opacity/100;
  id.style.MozOpacity = (opacity / 100);
  id.style.KhtmlOpacity = (opacity / 100);
  id.style.filter = "alpha(opacity=" + opacity + ")";
}

x = 20;
y = 70;

// obj is the name of the div
function setVisible(obj)
{
	var opacity=50;
	obj = document.getElementById(obj);
	var divs = document.getElementsByTagName('div');
	for (var i = 0; i < divs.length; i++) {
		var div = divs[i];
		// Finds the divs that cointain an id with the word "dress" in and makes them invisible.
		if (div.id.indexOf('dress') === 0) {
			div.style.visibility = 'hidden';
		}
	}
	
	if (obj.style.visibility == 'visible') {
		obj.style.visibility = 'hidden';
	} else {
		obj.style.opacity = 0;
		obj.style.visibility = 'visible';
		for (i = 10; i < 100; i=i+10) {
			setTimeout (show, i*4, obj, i);
			i++;
		}
	}
}


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('layer1')",500);
}
window.onscroll = setTimeout("placeIt('layer1')",500);

