/*	------------- make IE display PNG files -----------------	*/

ie = document.all && document.fireEvent && navigator.platform == "Win32";

if (ie)
{
	document.writeln('<style type="text/css">img.png { visibility:hidden; background:transparent; } </style>');
	window.attachEvent("onload", loadPngs);
}

function loadPngs()
{
	if (ie)
	{
		var i, a, f;
		for(i=0; (a = document.getElementsByTagName("img")[i]); i++)
		{
			if ((a.className == "png") || (a.className == "icon png"))
			{
				a.style.width = a.width + "px";
				a.style.height = a.height + "px";
				a.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src+"', sizingMethod='scale')";
				a.src = "http://www.woodfloorcare.com/Images/space.gif";
			}
			a.style.visibility = "visible";
		}
	}
}

/*	------------- make IE display transparent backgroung PNG files -----------------	*/

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent)
{
	window.attachEvent("onload", alphaBackgrounds);
}

function alphaBackgrounds()	{
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	for (i=0; i<document.all.length; i++)
	{
		var bg = document.all[i].currentStyle.backgroundImage;
		if (itsAllGood && bg)
		{
			if (bg.match(/\.png/i) != null)
			{
				var mypng = bg.substring(5,bg.length-2);
				document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='crop')";
				document.all[i].style.backgroundImage = "url('http://www.woodfloorcare.com/Images/space.gif')";
			}
		}
	}
}


/*	------------- popup window : centered, fixed or random -----------------	*/

	var win = null;

	function newWindow(mypage,myname,w,h,scroll,pos)
	{
		if (pos == "random")
		{
			LeftPosition = (screen.width)?Math.floor(Math.random()*(screen.width-w)) :100;
			TopPosition = (screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
		}

		if (pos == "center")
		{
			LeftPosition = (screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;
		}

		else if ((pos != "center" && pos != "random") || pos == null)
		{
			LeftPosition = 0; TopPosition = 20;
		}

		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=yes,toolbar=no,resizable=yes';

		win = window.open(mypage,myname,settings);
		if (win.focus)
		{
			win.focus();
		}

	}


/*	------------- four step process navigation -----------------	*/

	var lastSelected;

	function show(step)
	{
		if (document.getElementById)
		{
			if (lastSelected!=null)
			{
				lastSelected.style.display = "none";
			}
			else
			{
				document.getElementById("step1").style.display = "none";
			}
			document.getElementById(step).style.display = "block";
			lastSelected = document.getElementById(step);
		}
	}