/*	
FUNCTION NAME:	getBrand
PURPOSE:		Called when user changes the value of "Have A Specific Brand In Mind" select boxes
				Simply redirects to /products/brands.asp if a brand was choosen
ARUGMENTS:		The brand unique ID and the Category unique ID, both as integers
NOTE:			The shortcoming of this solution is that the page fails to redirect if the user reselects the
				currently selected brand.
AUTHOR:			Steve Jansen, <stj@byteinteractive.com>
DATE:			July 27th, 2000
*/

function getBrand(brand_id, category_id)
{
	if ( (brand_id >= 0) && (category_id >= 0) )
		window.location = "/products/brands.asp?catid=" + category_id + "&brand=" + brand_id;
}

var oID;
var oCoupon;
var iScrollFactor;
var iStart;
var bLoaded = new Boolean(false);

	
function couponLoad(sBST)
{
	if (! document.all )
	{
		
		iScrollFactor = 200;
		iStart =0;

		oCoupon = document.layers.couponFrame.layers.couponBody
		oCoupon.src = sBST;
		
		bLoaded = Boolean(true);
		
		oCoupon.ypos = iStart
		oCoupon.top = oCoupon.ypos

		oID = setInterval("oCoupon.pixelTop-= 10",5)
		if (oCoupon.pixelTop <= 0)
			clearInterval(oID)
	}
	
	return;
}

function couponLoadRxSearch(sBST)
{
	if (! document.all )
	{
		
		iScrollFactor = 200;
		iStart =0;

		oCoupon = document.layers.couponFrameRxSearch.layers.couponBody
		oCoupon.src = sBST;
		
		bLoaded = Boolean(true);
		
		oCoupon.ypos = iStart
		oCoupon.top = oCoupon.ypos

		oID = setInterval("oCoupon.pixelTop-= 10",5)
		if (oCoupon.pixelTop <= 0)
			clearInterval(oID)
	}
	
	return;
}

function scrollDown()
{
	if ( bLoaded )
	{
		oCoupon.ypos -= iScrollFactor
		oCoupon.top = oCoupon.ypos
	}
}

function scrollUp()
{
	if ( bLoaded )
	{
		if (oCoupon.ypos >= iStart)
			oCoupon.top = iStart
		else
		{
			oCoupon.ypos += iScrollFactor
			oCoupon.top = oCoupon.ypos
		}
	}
}

		
