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 = '';
		}
	}
}

//#PNG FIX#

function fixPNG(myImage) 
{
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])

	if ((version >= 5.5) && (version < 9) && (document.body.filters)) 
	{
	var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	var imgTitle = (myImage.title) ? 
					"title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	var imgStyle = "display:inline-block;" + myImage.style.cssText
	var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + myImage.width 
				+ "px; height:" + myImage.height 
				+ "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	myImage.outerHTML = strNewHTML	  
	}
}

function correctPNG(){ // correctly handle PNG transparency in Win IE 5.5 or higher.       
    for(var i=0; i<document.images.length; i++){     
       var img = document.images[i]  ;   
       var imgName = img.src.toUpperCase()  ;   
       if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {     
          var imgID = (img.id) ? "id='" + img.id + "' " : ""  ;   
          var imgClass = (img.className) ? "class='" + img.className + "' " : ""  ;   
          var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "  ;   
          var imgStyle = "display:inline-block;" + img.style.cssText   ;   
          if (img.align == "left") {   
                          imgStyle = "float:left;" + imgStyle;   
                  }   
          if (img.align == "right") {   
                          imgStyle = "float:right;" + imgStyle;   
                  }   
          if (img.parentElement.href) {   
                          imgStyle = "cursor:hand;" + imgStyle;   
                  }   
          var strNewHTML = "<span " + imgID + imgClass + imgTitle     
          + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"     
          + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"     
          + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"   ;   
          img.outerHTML = strNewHTML  ;   
          i = i-1  ;   
         }     
        }     
}    

function StarOver(id)
{

}

//#END PNG FIX#

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();

