var t=0;

function QueryStringParam(param)
{
	querystring = location.search.substring(1);
	pairstring = querystring.split("&");
	for (i=0; i<pairstring.length; i++)
	{
		pair = pairstring[i].split("=");
		if (pair[0] == param) return pair[1];
	}
	return 0;
}

function showcart()
{
	if (window.document.getElementById("minicart"))
	{
		window.document.getElementById("minicart").style.visibility = "visible";
		changeOpac(96, "minicart")
		clearTimeout(t);
	}
}

function hidecart(delay, speed)
{
	if (window.document.getElementById("minicart"))
	{
		t = setTimeout("fadeoutcart(" + speed + ")", delay);
	}
}
   
function fadeoutcart(speed)
{
	opacity("minicart",96,0,speed,60);
}

window.onload = function()
{
	var coll = document.getElementsByTagName('input');
	for(var i=0; i<coll.length; i++)
	{
		if(coll[i].type)
		{
			coll[i].className += ' ' + coll[i].type + ' ';
		}
	}

	if (QueryStringParam("showcart") == 'true')
	{
		showcart();
		hidecart(2000,2000);
	}
}	

