    function makeRequest(url) {
        var httpRequest;
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        }
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e) {
                try {
                    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e) {}
            }
        }

        if (!httpRequest) {
//            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() {
            if (httpRequest.readyState == 4) {
                if (httpRequest.status == 200) {
//                    httpResponse(httpRequest.responseText);
					return httpRequest.responseText;
                } else {
//                    alert('There was a problem with the request.');
                }
            }

         };
        httpRequest.open('GET', url, true);
        httpRequest.send('');
    }

function wait(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}
}

/////////////////////////////////////////////////////////////////////
var loff=0;
var toff=0;
var prevX=0;
var prevY=0;
var scrX=0;
var scrY=0;
var floatX=0;
var floatY=0;
var mdrag=0;

//shadow

var gradientshadow={}
gradientshadow.depth=10 //Depth of shadow in pixels
gradientshadow.containers=[]

 
gradientshadow.create=function(){
//var a = document.all ? document.all : document.getElementsByTagName('*')
var a =  document.getElementById("boxToDrag")
//for (var i = 0;i < a.length;i++) {
//	if (a.className == "shadow") {
		for (var x=0; x<gradientshadow.depth; x++){
			var newSd = document.createElement("DIV")
			newSd.className = "shadow_inner"
			newSd.id="shadow"+gradientshadow.containers.length+"_"+x //Each shadow DIV has an id of "shadowL_X" (L=index of target element, X=index of shadow (depth) 
			if (a.getAttribute("rel"))
				newSd.style.background = a.getAttribute("rel")
			else
				newSd.style.background = "black" //default shadow color if none specified
//			newSd.zIndex = 20-x
			document.body.appendChild(newSd)
		}
	gradientshadow.containers[gradientshadow.containers.length]=a
//	}
//}
gradientshadow.position()
//window.onresize=function(){
//	gradientshadow.position()
//}
}



gradientshadow.position=function(){
if (gradientshadow.containers.length>0){
	for (var i=0; i<gradientshadow.containers.length; i++){
		for (var x=0; x<gradientshadow.depth; x++){
  		var shadowdiv=document.getElementById("shadow"+i+"_"+x)
			shadowdiv.style.width = gradientshadow.containers[i].offsetWidth + "px"
			shadowdiv.style.height = gradientshadow.containers[i].offsetHeight + "px"
			shadowdiv.style.left = gradientshadow.containers[i].offsetLeft + x + "px"
			shadowdiv.style.top = gradientshadow.containers[i].offsetTop + x + "px"
			shadowdiv.style.visibility = 'visible';
		}
	}
}
}

/**

gradientshadow.position=function(){
eval(gradpos);
}

*/

gradientshadow.hide=function(){
if (gradientshadow.containers.length>0){
	for (var i=0; i<gradientshadow.containers.length; i++){
		for (var x=0; x<gradientshadow.depth; x++){
	  		var shadowdiv=document.getElementById("shadow"+i+"_"+x)
			shadowdiv.style.visibility = 'hidden';
		}
	}
}
}

 
//if (window.addEventListener)
//window.addEventListener("load", gradientshadow.create, false)
//else if (window.attachEvent)
//window.attachEvent("onload", gradientshadow.create)
//else if (document.getElementById)
//window.onload=gradientshadow.create

//end shadow

//drag
function Browser() {

var ua, s, i;

this.isIE = false;
this.isNS = false;
this.version = null;

ua = navigator.userAgent;

s = "MSIE";
if ((i = ua.indexOf(s)) >= 0) {
this.isIE = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}

s = "Netscape6/";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}

// Treat any other "Gecko" browser as NS 6.1.

s = "Gecko";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = 6.1;
return;
}
}

var browser = new Browser();

// Global object to hold drag information.

var dragObj = new Object();
dragObj.zIndex = 0;

function dragStart(event, id) {
var el;
var x, y;
// If an element id was given, find it. Otherwise use the element being
// clicked on.
if (id)
dragObj.elNode = document.getElementById(id);
else {
if (browser.isIE)
dragObj.elNode = window.event.srcElement;
if (browser.isNS)
dragObj.elNode = event.target;

// If this is a text node, use its parent element.

if (dragObj.elNode.nodeType == 3)
dragObj.elNode = dragObj.elNode.parentNode;
}

// Get cursor position with respect to the page.

if (browser.isIE) {
x = window.event.clientX + document.documentElement.scrollLeft
+ document.getElementById("ibody").scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop
+ document.getElementById("ibody").scrollTop;
}

if (browser.isNS) {
x = event.clientX + window.scrollX;
y = event.clientY + window.scrollY;
}

// Save starting positions of cursor and element.

dragObj.cursorStartX = x;
dragObj.cursorStartY = y;
dragObj.elStartLeft = parseInt(dragObj.elNode.style.left, 10);
dragObj.elStartTop = parseInt(dragObj.elNode.style.top, 10);

if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0;
if (isNaN(dragObj.elStartTop)) dragObj.elStartTop = 0;

// Update element's z-index.

//dragObj.elNode.style.zIndex = ++dragObj.zIndex;

// Capture mousemove and mouseup events on the page.
if (document.getElementById('cdiv').style.width > 150){
    document.getElementById('cdiv').style.overflow = 'hidden';
	document.getElementById("ctab").overflow = 'hidden';
}

if (browser.isIE) {
document.attachEvent("onmousemove", dragGo);
document.attachEvent("onmouseup", dragStop);
window.event.cancelBubble = true;
window.event.returnValue = false;
}
if (browser.isNS) {
document.addEventListener("mousemove", dragGo, true);
document.addEventListener("mouseup", dragStop, true);
event.preventDefault();
}



}

function dragGo(event) {
var x, y;
window.mdrag=1;
// Get cursor position with respect to the page.

if (browser.isIE) {
x = window.event.clientX + document.documentElement.scrollLeft
+ document.getElementById("ibody").scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop
+ document.getElementById("ibody").scrollTop;
}
if (browser.isNS) {
x = event.clientX + window.scrollX;
y = event.clientY + window.scrollY;
}

dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
dragObj.elNode.style.top = (dragObj.elStartTop + y - dragObj.cursorStartY) + "px";

gradientshadow.position()
dragObj.zIndex = ++dragObj.zIndex;

if (browser.isIE) {
window.event.cancelBubble = true;
window.event.returnValue = false;
}
if (browser.isNS)
event.preventDefault();
}

function dragStop(event) {
window.mdrag=0;
// Stop capturing mousemove and mouseup events.

if (document.all){
	window.scrY = document.documentElement.scrollTop + document.getElementById("ibody").scrollTop;
	window.scrX = document.documentElement.scrollLeft + document.getElementById("ibody").scrollLeft;
} else {
	window.scrY = window.pageYOffset;
	window.scrX = window.pageXOffset;
}
window.toff = dragObj.elNode.style.top.replace("px","") - window.scrY;
window.loff = dragObj.elNode.style.left.replace("px","") - window.scrX;

if (browser.isIE) {
document.detachEvent("onmousemove", dragGo);
document.detachEvent("onmouseup", dragStop);
}
if (browser.isNS) {
document.removeEventListener("mousemove", dragGo, true);
document.removeEventListener("mouseup", dragStop, true);
}
if (browser.isIE && document.getElementById('cdiv').style.width > 150){
    document.getElementById('cdiv').style.overflow = 'scroll !important';
	document.getElementById("cbody").overflow = 'scroll';
}
if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = captureMousePosition;
}


}
//drag

function dragshow(fx,fy,fz){
return false;
dobj=document.getElementById("boxToDrag");
if (dobj.style.visibility != 'visible') { 
mdrag=1;
clsp=0;
if (fz>9){fz=fz-10;clsp=1;}
if (fx){
	 dobj.style.left=fx+'px';
	 dobj.style.top=fy+'px';
	if (fz>=2 && fz<4){showcart('open');}
	if (fz==4){
 	    document.getElementById('box').style.visibility = 'hidden';
	    document.getElementById('ibox').style.visibility = 'visible';
		setTimeout('hidebox()',3000);
	}
} else {
	if (yMousePos+220>yMousePosMax){
		dobj.style.top=yMousePosMax-240+'px';	
	} else {
		dobj.style.top=yMousePos+20+'px';
	}
	if (xMousePos+50>xMousePosMax-200){
		dobj.style.left=xMousePosMax-230+'px';	
	} else {
		dobj.style.left=xMousePos+60+'px';
	}
}
	if (document.all){
	window.scrY = document.documentElement.scrollTop + document.getElementById("ibody").scrollTop;
	window.scrX = document.documentElement.scrollLeft + document.getElementById("ibody").scrollLeft;
	} else {
	  window.scrY = window.pageYOffset;
	  window.scrX = window.pageXOffset;
	}

	window.toff = dobj.style.top.replace("px","") - window.scrY;
	window.loff = dobj.style.left.replace("px","") - window.scrX;

	dobj.style.visibility = 'visible'; 
	if (fz!=4){
    	document.getElementById('box').style.visibility = 'visible';
	}				
	if (dobj.style.width == 360){ 
		document.getElementById('cdiv').style.visibility = 'visible';
	}

	gradientshadow.position();
	mdrag=0;

}
if (clsp==1){nocart(1);}
//if (dobj.style.height=='21px'){nocart();}

}

function hidebox(){
    document.getElementById('ibox').style.visibility = 'hidden';
	document.getElementById('boxToDrag').style.visibility = 'hidden';
	gradientshadow.hide();
	document.getElementById('boxToDrag').style.left='0px';
	document.getElementById('boxToDrag').style.top='0px';
}


function adjustbox(){
dobj=document.getElementById("boxToDrag");
 if (dobj.style.visibility != 'hidden'){
  if (window.mdrag==0){
  	if (document.all){
	window.floatY = document.documentElement.scrollTop + document.getElementById("ibody").scrollTop;
	window.floatX = document.documentElement.scrollLeft + document.getElementById("ibody").scrollLeft;

	} else {
 		window.floatY = window.pageYOffset;
		window.floatX = window.pageXOffset;
	}
	if (window.floatY!=window.scrY || window.floatX!=window.scrX){
	 	window.prevY = window.scrY;
	 	window.prevX = window.scrX;	 
if (document.getElementById('cdiv').style.width > 150){
	document.getElementById('cdiv').style.overflow = 'hidden';		 	
	document.getElementById("cbody").overflow = 'hidden';
}
		window.mdrag=2;
		stepadjust();
   	}
  }
 }
}


function stepadjust(){
	if (window.mdrag==2){
	dobj=document.getElementById("boxToDrag");

	var dx = Math.abs(window.floatX-window.prevX);
	var dy = Math.abs(window.floatY-window.prevY);
	var steps = 10;
	var tout = 20;
	if (dx < steps/2){
	 	cx = (dx>=1) ? 1 : 0;
		tout = 10;
	} else {
		cx = Math.round(dx/steps);
	}

	if (dy < steps/2){
		cy = (dy>=1) ? 1 : 0;
		tout = 10;
	}	else {
		cy = Math.round(dy/steps);
	}

	if (window.floatX > prevX)
		prevX += cx;
	else if (window.floatX < prevX)
		prevX -= cx;

	if (window.floatY > prevY)
		prevY += cy;
	else if (window.floatY < prevY)
		prevY -= cy;

	dobj.style.left = prevX + window.loff + 'px';
	dobj.style.top  = prevY + window.toff + 'px';

	gradientshadow.position();
	}
	if ((cx!=0||cy!=0) && window.mdrag==2){
	 
		setTimeout('stepadjust()',tout);
	} else {
	 	window.scrX=window.floatX;
 		window.scrY=window.floatY;	 	
if (browser.isIE && document.getElementById('cdiv').style.width > 150){
	document.getElementById('cdiv').style.overflow = 'scroll !important';	
	document.getElementById("cbody").overflow = 'scroll';
}
		window.mdrag=0;
	}
}



if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = captureMousePosition;
}
// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
xMousePosMax = 0; // Width of the page
yMousePosMax = 0; // Height of the page

function captureMousePosition(e) {
    if (document.layers) {
        // When the page scrolls in Netscape, the event's mouse position
        // reflects the absolute position on the screen. innerHight/Width
        // is the position from the top/left of the screen that the user is
        // looking at. pageX/YOffset is the amount that the user has
        // scrolled into the page. So the values will be in relation to
        // each other as the total offsets into the page, no matter if
        // the user has scrolled or not.
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position
        // reflects the position from the top/left of the screen the
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no
        // matter if the user has scrolled or not.
	window.scrY = document.documentElement.scrollTop + document.getElementById("ibody").scrollTop;
	window.scrX = document.documentElement.scrollLeft + document.getElementById("ibody").scrollLeft;

        xMousePos = window.event.x+document.documentElement.scrollLeft+document.getElementById("ibody").scrollLeft;
        yMousePos = window.event.y+document.documentElement.scrollTop+document.getElementById("ibody").scrollTop;
        xMousePosMax = document.getElementById("ibody").clientWidth+document.documentElement.scrollLeft+document.getElementById("ibody").scrollLeft;
        yMousePosMax = document.getElementById("ibody").clientHeight+document.documentElement.scrollTop+document.getElementById("ibody").scrollTop;

//        xMousePos = window.event.x+document.getElementById("ibody").scrollLeft;
//        yMousePos = window.event.y+document.getElementById("ibody").scrollTop;
//        xMousePosMax = document.getElementById("ibody").clientWidth+document.getElementById("ibody").scrollLeft;
//        yMousePosMax = document.getElementById("ibody").clientHeight+document.getElementById("ibody").scrollTop;
    } else if (document.getElementById) {
        // Netscape 6 behaves the same as Netscape 4 in this regard
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    }
}

var plist = new Array;
var rand = Math.random();
var bk = Math.round(rand * 100) % 5 + 1;
var cpn;

function pvar(pn){
if (pn==cpn){nocart();}
else {
cpn=pn;
//alert(plist[pn][0]);
//prod=document.getElementById('order');
	order.istr.value=pn.toUpperCase();
	order.item.value=plist[pn][0];
//	order.item1.value=plist[pn][0]+' (Starter Pk)';
//	order.item2.value=plist[pn][0]+' (Saver Pk)';
//	order.item3.value=plist[pn][0]+' (Super Pk)';
//	order.item4.value=plist[pn][0]+' (Seller Pk)';	
	order.price1.value=plist[pn][1];
	order.price2.value=plist[pn][2];
	order.price3.value=plist[pn][3];
	order.price4.value=plist[pn][4];		

hdr = plist[pn][0];
upack = plist[pn][5];
//hdr_len = 35;
//if (document.getElementById('cdiv').visibility='hidden'){hdr_len = 15;}
document.getElementById('hd').innerHTML = hdr;
document.getElementById('t1').innerHTML = '1-3 '+upack+'s:  $'+plist[pn][1]+' / '+upack;
document.getElementById('t2').innerHTML = '4-7 '+upack+'s:  $'+plist[pn][2]+' / '+upack;
document.getElementById('t3').innerHTML = '8-12 '+upack+'s:  $'+plist[pn][3]+' / '+upack;
document.getElementById('t4').innerHTML = '$'+(plist[pn][4]*12).toFixed(2)+' / case (12 '+upack+'s)';
document.getElementById('s1').innerHTML = upack+'s: ';
document.getElementById('s2').innerHTML = upack+'s: ';
document.getElementById('s3').innerHTML = upack+'s: ';
bk++;
if (bk>4){bk=1;}
for (x=1;x<5;x++){
document.getElementById('oft'+x).style.background = "url(/images/common/obk3"+bk+".png)";
}
if (plist[pn][6]==0){
for (x=1;x<5;x++){
 	document.getElementById('add'+x).src = "/images/common/nostock.gif";
	document.getElementById('add'+x).disabled = true;
}
} else {
for (x=1;x<5;x++){
 	document.getElementById('add'+x).src = "/images/common/add5.gif";
	document.getElementById('add'+x).disabled = false;
}
}

}
}





function nocart(clsp){
dobj=document.getElementById('boxToDrag');
if (dobj.style.height=='220px' || clsp==1){
	dobj.style.height=21;
	document.getElementById('udbut').src="/images/common/down.png";
	document.getElementById('icart').src = "/images/common/cart.png";
	document.getElementById('box').style.visibility = 'hidden';
	if (dobj.style.width == '360px'){
		document.getElementById('cdiv').style.visibility = 'hidden';
		document.getElementById('ctab').style.display="none";
	}
} else {
	return false;
	dobj.style.height=220;
	document.getElementById('udbut').src="/images/common/up.png";
	document.getElementById('box').style.visibility = 'visible';	
	if (dobj.style.width == '360px'){
		document.getElementById('cdiv').style.visibility = 'visible';	
		document.getElementById('ctab').style.display="block";		
	}
}
gradientshadow.position();
}



function showcart(opt){
opt='close';
cobj=document.getElementById('cdiv');
dobj=document.getElementById('boxToDrag');
if (cobj.style.visibility == 'hidden' && opt!='close'){
if (dobj.style.height=='21px'){nocart(0);}
dobj.style.width = 360;
//document.getElementById('tbar').style.width = 320;
document.getElementById('tbar').style.width = 286;
document.getElementById('icart').src = "/images/common/xcart.png";
document.getElementById('icart').alt = "Hide Cart";
document.getElementById('exp').style.left = 322;
document.getElementById('checkout').style.left = 304;
document.getElementById('close').style.left = 340;
document.getElementById('close').style.visibility = 'visible';
document.getElementById('box').style.left = 200;
cobj.style.width = 190;	

document.getElementById('ctab').style.display="block";
cobj.style.visibility = 'visible';
if (browser.isIE){
    cobj.style.overflow = 'scroll';
} else {
    cobj.style.overflow = 'hidden';
    document.getElementById('ctab').style.width=190;
}
} else {
cobj.style.width = 150;	
document.getElementById('ctab').style.display="none";
cobj.style.overflow = 'hidden';	
cobj.style.visibility = 'hidden';
document.getElementById('box').style.left = 0;
document.getElementById('icart').src = "/images/common/cart.png";
document.getElementById('icart').alt = "Show Cart";
document.getElementById('exp').style.left = 140;
document.getElementById('checkout').style.left = 122;
document.getElementById('close').style.left = 140;
document.getElementById('close').style.visibility = 'hidden';
//document.getElementById('tbar').style.width = 120;
document.getElementById('tbar').style.width = 106;
document.getElementById('boxToDrag').style.width = 160;
}
//if (opt!='close'){
	gradientshadow.position();
//}
}

function addtocart(pk){
tclosed = 0;
if (document.getElementById('cdiv').style.visibility == 'hidden'){
tclosed = 1;
showcart('open');
}
var item = document.order.item.value;
var price = eval('document.order.price'+pk+'.value');
var qty = eval('document.order.quantity'+pk+'.options['+eval('document.order.quantity'+pk+'.selectedIndex')+'].value');
var cost = (price*qty).toFixed(2);

var tbody = document.getElementById("ctab").getElementsByTagName("TBODY")[0];
var ttr = tbody.getElementsByTagName("tr");
var found = 0;
for (x=0;x<ttr.length;x++){
 	var ttd = ttr[x].getElementsByTagName("td");
	if (browser.isIE){
		if (ttd[0].innerText==item){
			ttd[1].innerText= price;
			ttd[2].innerText= qty;
			ttd[3].innerText= cost;
			found=1;
		}
	} else {
		if (ttd[0].textContent==item){
			ttd[1].textContent= price;
			ttd[2].textContent= qty;
			ttd[3].textContent= cost;
			found=1;
		}
	}
}
if (found==0){
 var row = document.createElement("TR");
 var td1 = document.createElement("TD");
 td1.appendChild(document.createTextNode(item));
 var td2 = document.createElement("TD");
 td2.appendChild (document.createTextNode(price));
 var td3 = document.createElement("TD");
 td3.appendChild (document.createTextNode(qty));
 var td4 = document.createElement("TD");
 td4.appendChild (document.createTextNode(cost));
 row.appendChild(td1);
 row.appendChild(td2);
 row.appendChild(td3);
 row.appendChild(td4);
tbody.appendChild(row);	
}
makeRequest(path+"acart.php?item="+item+"&price="+price+"&quantity="+qty+"&istr="+document.order.istr.value);
if (tclosed==1){
setTimeout('showcart("close")',2000);
}
}

function floc(obj){
dobj=document.getElementById('boxToDrag');
x=dobj.style.left;
y=dobj.style.top;
z=1;
if (dobj.style.visibility=='hidden'){z=0;}
if (dobj.style.width=='360px'){z+=2;}
if (dobj.style.height=='21px'){z+=10;}
if (obj.href.indexOf('?')>0){
	obj.href+='&fx='+x.replace('px','')+'&fy='+y.replace('px','')+'&fz='+z;
} else {
	obj.href+='?fx='+x.replace('px','')+'&fy='+y.replace('px','')+'&fz='+z;
}
}

function floc2(){
dobj=document.getElementById('boxToDrag');
x=dobj.style.left;
y=dobj.style.top;
z=1;
if (dobj.style.visibility=='hidden'){z=0;}
if (dobj.style.width=='360px'){z+=2;}
if (dobj.style.height=='21px'){z+=10;}
return '&fx='+x.replace('px','')+'&fy='+y.replace('px','')+'&fz='+z;
}



