function SetCells(tr, light)
{
	for (i = 0; i < tr.cells.length; i++)
	{
		if (light)
		{
			tr.cells[i].style.backgroundColor = '#F9F0C7';
		}
		else
		{
			tr.cells[i].style.backgroundColor = '';
			tr.cells[i].style.color = '';
		}
	}
}


function BreakFrames()
{
	// if called within FRAME then reload in full window (otherwise ambigous security breaks checkout)
	if (top != self)top.location.href = self.location.href;
}


/* order history 'quick basket' code */
function QkBasket0(asID) {
	ShowObj(QkBasket_Get(asID),false);
}

function QkBasket1(aObject,asID) {
	var ix=0,iy=0;
	while(aObject.offsetParent!=null) {
		ix+=aObject.offsetLeft;
		iy+=aObject.offsetTop;
		aObject=aObject.offsetParent;
	}
	var basket=QkBasket_Get(asID);
	QkBasket_Mv(basket,ix-100,iy+20)
	ShowObj(basket,true);
}
function QkBasket_Get(asID) {
	return document.getElementById("basketWin_"+asID);
}
function QkBasket_Mv(aObject,aX,aY) {
		aObject.style.left=aX+"px";
		aObject.style.top=aY+"px";
}
function ShowObj(aObject,abVisible) {
	aObject.style.display= abVisible?"block":"none";
}

/*get an item from the querystring (BM20071123):*/
function GetFromQueryString(item) {
	//if (item != null) {
		tempString = location.search.substring(1);
		//alert("query string: " + tempString + " item: " + item);
		itemLength = item.length;
		//start = tempString.indexOf(item) + itemLength + 1;
		start = tempString.indexOf(item);
		//alert("start: " + start);
		if (start != -1) {
			start += itemLength + 1;
			tempString = tempString.substring(start);
			end = tempString.indexOf("&");
			//alert("str: " + tempString + "\n" + "start: " + start + "\n" + "end: " + end);
			if (end != -1) tempString = tempString.substring(0,end);
		}
		else tempString = "";
		return tempString;
	//}
}


BreakFrames();


