<!--
function JSBrandWindow(evt, title, oContent, id, width, height, popupColor)
{
	
	// define variables
	this.title = title;
	this.oContent = oContent;
	windowWidth = document.body.clientWidth
	this.width = width;
	this.id = id;
	this.bgcolor = popupColor;
	
	
	// create the table window and define CSS properties
	this.oTable = document.createElement("table");
	this.oTable.id = "Window " + this.id;
	this.oTable.style.width = this.width + "px";
	this.oTable.style.border = "1px solid #000000";
	this.oTable.cellSpacing = 0;
	this.oTable.cellPadding = 2;
	this.oTable.border = 0;
	//this.oTable.style.backgroundColor = "#FFFFFF";

	// position window
	this.oTable.style.position = "absolute";
	this.oTable.style.zIndex  = "99";
	var evt = (evt) ? evt : ((window.event) ? event : null);
	var xPos = evt.clientX;
	var yPos = evt.clientY;
	var bwindow_width = f_clientWidth();
	var bwindow_height = f_clientHeight();
	var scroll_top = f_scrollTop();
	var desired_pos = yPos + scroll_top - height;
	if (desired_pos < scroll_top) {
		desired_pos = scroll_top + 20;
	}
	this.oTable.style.top = desired_pos + 'px';
	this.oTable.style.left = (xPos + 50) + 'px';
	
	// position window in Browser Window if smaller than JSwindow
	if ((bwindow_width - width) < 0){
		this.oTable.style.left = xPos + 'px';
	}
	if ((bwindow_height-height) < 0) {
		this.oTable.style.top = (yPos + scroll_top - 10) + 'px';
	}
	
	// link from the table to the JSBrandWindow object
	this.oTable.jsWindow = this;

	// if the table is clicked anywhere, show the table in front of other open windows
	this.oTable.onmousedown = JSBrandWindow.prototype.onBringToFront;

	// append to document body
	document.body.appendChild(this.oTable);

	// add a row for the titlebar
	var oTR = this.oTable.insertRow(0);
	
	// Title: add the title to the titlebar	
	oTD = oTR.insertCell(0);
	//oTD.innerHTML = title;
	//oTD.style.color = "#D3CCB9";
	oTD.jsWindow = this;
	oTD.onmousedown = JSBrandWindow.prototype.tdOnMouseDown;
	//oTD.style.borderBottom = "1px solid #cccccc";
	oTD.style.backgroundImage = "url(images/shop-by-brand.gif)";
	oTD.style.backgroundColor = this.bgcolor;
	oTD.height = "37";
	//oTD.width = "69%";
	
	// Close: add the close button to the titlebar
	oTD = oTR.insertCell(1); 

	oTD.jsWindow = this;
	oTD.onmousedown = JSBrandWindow.prototype.onClose;
	oTD.style.backgroundImage = "url(images/brand-close.gif)";
	oTD.style.backgroundColor = this.bgcolor;
	oTD.width = "30%";
	oTD.align = "right";
	oTD.style.textAlign = "right"
	
	// add a row for the window's content
	oTR = this.oTable.insertRow(1);
	
	this.oContentTD = oTR.insertCell(0);
	this.oContentTD.colSpan = 2;
	this.oContentTD.style.backgroundColor = this.bgcolor;
	this.oContentTD.className = "BrandWindowContentStyle";
	var Bstring;
	Bstring = '<table cellpadding="0" border="0" cellspacing="0" style="margin-top: 4px;">';
	Bstring += '<tr>';
	Bstring += '<td valign="top">';
	Bstring += '<div style="WIDTH: 136px; height: 232px; border: 2px solid #D7D0C1; background-color: #FFFFFF; padding: 5px;">';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=20' + appendStrAmp + '">American West®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=21' + appendStrAmp + '">Ariat®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=247' + appendStrAmp + '">Aura™ from Wrangler®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=119' + appendStrAmp + '">Belts By Simon®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=81' + appendStrAmp + '">Carhartt®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=25' + appendStrAmp + '">Cavender’s®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=275' + appendStrAmp + '">Charlie 1 Horse™</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=26' + appendStrAmp + '">Cinch®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=266' + appendStrAmp + '">Cowgirl Hardware®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=28' + appendStrAmp + '">Cruel Girl®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=29' + appendStrAmp + '">Dan Post®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=93' + appendStrAmp + '">Dorfman Pacific®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=30' + appendStrAmp + '">Double H®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=31' + appendStrAmp + '">Durango®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=109' + appendStrAmp + '">Elk Creek Silversmiths</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=87' + appendStrAmp + '">Georgia Boots</a></div>';
	Bstring += '<div class="br0"><a nohref>&nbsp;</a></div>';
	Bstring += '</div>';
	Bstring += '</td>';
	Bstring += '<td valign="top">';
	Bstring += '<div style="WIDTH: 136px; height: 232px; border: 2px solid #D7D0C1; background-color: #FFFFFF; padding: 5px;">';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=137' + appendStrAmp + '">Harley Davidson</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=159' + appendStrAmp + '">Justin Basics</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=33' + appendStrAmp + '">Justin®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=230' + appendStrAmp + '">Justin® George Strait™</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=269' + appendStrAmp + '">Justin® Vintage™</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=125' + appendStrAmp + '">Larry Mahan® Boots</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=36' + appendStrAmp + '">Lawman®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=38' + appendStrAmp + '">Lucchese® 1883</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=126' + appendStrAmp + '">Lucchese® 2000</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=240' + appendStrAmp + '">Lucky Brand®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=40' + appendStrAmp + '">Master Hatters®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=64' + appendStrAmp + '">Milano® Hat</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=85' + appendStrAmp + '">Minnetonka®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=301' + appendStrAmp + '">Miss Me®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=99' + appendStrAmp + '">Montana Silversmiths®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=248' + appendStrAmp + '">Nocona Belt Co.®</a></div>';
	Bstring += '<div class="br0"><a nohref>&nbsp;</a></div>';
	Bstring += '</div>';
	Bstring += '</td>';
	Bstring += '<td valign="top">';
	Bstring += '<div style="WIDTH: 136px; height: 232px; border: 2px solid #D7D0C1; background-color: #FFFFFF; padding: 5px;">';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=274' + appendStrAmp + '">Nocona®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=75' + appendStrAmp + '">Panhandle Slim®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=246' + appendStrAmp + '">Petrol Jeans®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=42' + appendStrAmp + '">Resistol® Hats</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=43' + appendStrAmp + '">Rockies®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=181' + appendStrAmp + '">Rocky Boots®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=44' + appendStrAmp + '">Rodeo King®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=69' + appendStrAmp + '">Roper®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=141' + appendStrAmp + '">Scully®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=291' + appendStrAmp + '">Southern Thread®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=50' + appendStrAmp + '">Stetson®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=54' + appendStrAmp + '">Tony Lama®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=294' + appendStrAmp + '">Twisted X Boots®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=110' + appendStrAmp + '">Vogt®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=320' + appendStrAmp + '">Western Trenditions®</a></div>';
	Bstring += '<div class="br0"><a href="BrandProducts.asp?brand=61' + appendStrAmp + '">Wrangler®</a></div>';
	Bstring += '<div class="br0"><a href="Brands_list.asp' + appendStrQue + '" style="color:#A41E29;font-weight: bold;">See All ></a></div>';
	Bstring += '</div>';
	Bstring += '</td>';
	Bstring += '</tr>';
	Bstring += '</table>';	
	// use the content from the referenced div as the content for the window
	//ORGINAL********************** 
	//this.oContentTD.innerHTML = document.all["Div" + this.id].innerHTML;
	//*****************************
	
	this.oContentTD.innerHTML = Bstring;
	
}

JSBrandWindow.prototype.onBringToFront = function()
{
	this.jsWindow.bringToFront();
}

JSBrandWindow.prototype.bringToFront = function()
{
	// if not already the last child of the document.body, make it so
	//if ( document.body.childNodes[document.body.childNodes.length-1] !== this.oTable )
	//{
		// move to bottom of document
	//	document.body.appendChild(this.oTable);
	//}
}

JSBrandWindow.prototype.tdOnMouseDown = function()
{
	this.jsWindow.onMouseDown();
}

JSBrandWindow.prototype.onMouseDown = function()
{
	// record that an onmousedown has just occurred
	this.bDown = true;
	
	// link from body to this JSBrandWindow object
	document.body.jsWindow = this;

	// save body mouse handlers
	this.saveMouseMove = document.body.onmousemove;
	this.saveMouseUp = document.body.onmouseup;

	// set new handlers.
	document.body.onmousemove = JSBrandWindow.prototype.bodyOnMouseMove;
	document.body.onmouseup = JSBrandWindow.prototype.bodyOnMouseUp;
}

JSBrandWindow.prototype.bodyOnMouseMove = function(evt)
{
	var e = window.event ? window.event : evt;
	this.jsWindow.onMouseMove(e);
}

JSBrandWindow.prototype.onMouseMove = function(evt)
{
	// if mouse not down, stop the move (for IE only)
	if ( (document.all) && !(evt.button & 1) )
	{
		this.onMouseUp();
		return;
	}
	if ( this.bDown )
	{
		this.dx = parseInt(this.oTable.style.left, 10) - evt.clientX;
		this.dy = parseInt(this.oTable.style.top, 10) - evt.clientY;
		this.bDown = false;
	}
	else
	{
		this.oTable.style.left = Math.max((this.dx + evt.clientX),0) + "px";
		this.oTable.style.top = Math.max((this.dy + evt.clientY),0) + "px";
	}
}

JSBrandWindow.prototype.bodyOnMouseUp = function()
{
	this.jsWindow.onMouseUp();
}

JSBrandWindow.prototype.onMouseUp = function()
{
	document.body.onmouseup = this.saveMouseUp;
	document.body.onmousemove = this.saveMouseMove;
	document.body.jsWindow = null;
}


JSBrandWindow.prototype.close = function()
{	
	// remove from browser document
	this.oTable.parentNode.removeChild(this.oTable);
}

JSBrandWindow.prototype.onClose = function()
{
	this.jsWindow.close();
}

function createBrandWindow(evt, title, width, height, popupColor, windowID)
{
if (document.getElementById('Window ' + windowID)) {
  }
else {
  new JSBrandWindow(evt, "&nbsp;" + title, document.getElementById("Div" + windowID), windowID, width, height, popupColor); 
  }
}
-->