/*	------------- removes outlines from links -----------------	*/
	
	function blurLinks()
	{
		var links = document.getElementsByTagName("a");
		
		for (var i=0; i<links.length; i++)
		{
			document.links[i].onfocus=function()
			{
				this.blur();
			}
		}
	}


/*	------------- 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; } </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 = "../images/space.gif";
			}
			a.style.visibility = "visible";
		}
	}
}

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='scale')";
				document.all[i].style.backgroundImage = "url('../images/space.gif')";
			}
		}
	}
}

/*	------------- popup window -----------------	*/

	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();
		}

	}


/*	------------- resize window -----------------	*/

	function resizeWindow()
	{
		if (document.images)
		{
			if (document.images.length >= 1)
			{
				window.moveBy(-(window.document.getElementById("prodImg").width)/4,-(window.document.getElementById("prodImg").height)/4);
				window.resizeTo(window.document.getElementById("prodImg").width+50,window.document.getElementById("prodImg").height+170);
			 }
			else
			{
				setTimeout('resizeWindow()',1000);
			}
		}
	}


/*	------------- expands & collapses menus -----------------	*/
	var expandImage	=	new Image(14,9);
	expandImage.src	=	"../images/iconExpand.gif";

	var collapseImage	=	new Image(14,9);
	collapseImage.src	=	"../images/iconCollapse.gif";


	function switchIt(name)
	{
		if (document.getElementById)
		{
			var el = document.getElementById(name).style;
		}
		else
		{
			if (document.All)
			{
				var el = document.all[name].style;
			}
			else
			{
				if (document.layers)
				{
					var el = document.layers[name].style;
				}
			}
		}

		if (el.display == 'block')
		{
			el.display = 'none';
			
			if (document.images[name + '_icon'])
			{
				document.images[name + '_icon'].src = expandImage.src;
			}
		}
		else
		{
			el.display = 'block';
			
			if (document.images[name + '_icon'])
			{
				document.images[name + '_icon'].src = collapseImage.src;
			}
		}
	}
	
		