<!--
	function openRelativeWindow(theURL, theName, baseWidth, baseHeight) {
		browser = navigator.appName;
		//Get the full screen size
		fullWidth = screen.width;
		fullHeight = screen.height;

		//Get the available screen Size
		if (browser.indexOf("WebTV") >= 0) {
			width = window.innerWidth - 16;
			height = window.innerHeight;
			fullHeight = window.outerHeight;
			fullWidth = window.outerWidth;
		}
		else if (browser.indexOf("Microsoft") >= 0) {
			width = document.body.offsetWidth - 20;
			height = document.body.offsetHeight;
			colorDepth = window.screen.colorDepth;
		}
		else if (browser.indexOf("Netscape") >= 0) {
			width = window.innerWidth - 16;
			height = window.innerHeight;
			colorDepth = window.screen.pixelDepth
		}
		var X = 0;
		var Y = 0;
		aspectRatio = (baseWidth / baseHeight);
		calcWidth = (screen.width / fullWidth) * baseWidth;
		calcHeight = calcWidth / aspectRatio;
		if (screen.availWidth) {
			X = (screen.availWidth / 2) - (calcWidth / 2);
			Y = (screen.availHeight / 2) - (calcHeight / 2);
		}
		var MyRemote = window.open(theURL, theName, "left=" + X + "screenX=" + X + "screenY=" + Y + ",top=" + Y + ",width=" + calcWidth + ",height=" + calcHeight + ",scrollbars=1,menubar=0,resizable=1");
		MyRemote.focus();
	}

	var idProduct;
	var idManufacturer;
	var idCategory;
	function ChangeFeatured(direction) {
		var theurl = "ajax/ajax_getPrevNext.asp"
	+ "?idProduct=" + idProduct
	+ "&homePage = -1 "
	+ "&idCategory=" + idCategory
	+ "&direction=" + direction;

		var req = new Request({ url: theurl,
			onSuccess: function(txt) {
				var txtArray = txt.split("|");
				$("imageHome").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '"><img src="<%=pImagesDir%>' + txtArray[1] + '" border=0 alt="' + txtArray[2] + '"  class="GrayBorder" /></a><br>');
				$("descriptionHome").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '">' + txtArray[2] + '</a>');
				$("descriptionLongHome").set('html',' ' +txtArray[3]);
				$("priceHome").set('html', 'Our Price: $' + CurrencyFormatted(txtArray[5]));
				idProduct = txtArray[0];

			},
			onFailure: function() {
				alert('unable to get the next item')
			},
			onComplete: function() {
				//do something

			}
		});

		req.send();

	}
	function ChangeBest(direction) {
		var theurl = "ajax/ajax_getPrevNext.asp"
	+ "?idProduct=" + idProduct
	+ "&idCategory=29"
	+ "&direction=" + direction;

		var req = new Request({ url: theurl,
			onSuccess: function(txt) {
				var txtArray = txt.split("|");
				$("imageBest").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '"><img src="<%=pImagesDir%>' + txtArray[1] + '" border=0 alt="' + txtArray[2] + '"  class="GrayBorder" /></a><br>');
				$("descriptionBest").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '">' + txtArray[2] + '</a>');
				$("descriptionLongBest").set('html', ' ' + txtArray[3]);
				$("priceBest").set('html', 'Our Price: $' + CurrencyFormatted(txtArray[5]));
				idProduct = txtArray[0];

			},
			onFailure: function() {
				alert('unable to get the next item')
			},
			onComplete: function() {
				//do something

			}
		});

		req.send();

	}
	function ChangeSale(direction) {
		var theurl = "ajax/ajax_getPrevNext.asp"
	+ "?idProduct=" + idProduct
	+ "&hotDeal = -1"
	+ "&idCategory=" + idCategory
	+ "&direction=" + direction;

		var req = new Request({ url: theurl,
			onSuccess: function(txt) {
			var txtArray = txt.split("|");
			$("imageHot").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '"><img src="<%=pImagesDir%>' + txtArray[1] + '" border=0 alt="' + txtArray[2] + '"  class="GrayBorder" /></a><br>');
			$("descriptionHot").set('html', '<a href="prodView.asp?idproduct=' + txtArray[0] + '">' + txtArray[2] + '</a>');
			$("descriptionLongHot").set('html', ' ' + txtArray[3]);
			$("priceHot").set('html', 'Our Price: $' + CurrencyFormatted(txtArray[5]));
			idProduct = txtArray[0];

			},
			onFailure: function() {
				alert('unable to get the next item')
			},
			onComplete: function() {
				//do something

			}
		});

		req.send();

	}
	function CurrencyFormatted(amount) {
		var i = parseFloat(amount);
		if (isNaN(i)) { i = 0.00; }
		var minus = '';
		if (i < 0) { minus = '-'; }
		i = Math.abs(i);
		i = parseInt((i + .005) * 100);
		i = i / 100;
		s = new String(i);
		if (s.indexOf('.') < 0) { s += '.00'; }
		if (s.indexOf('.') == (s.length - 2)) { s += '0'; }
		s = minus + s;
		return s;
	}

//-->
