


//  ***** B E G I N   C R O S S B R O W S E R   O U T E R H T M L   F U N C T I O N *****

	var setOuterHtml = function(s){
	   var range = this.ownerDocument.createRange();
	   range.setStartBefore(this);
	   var fragment = range.createContextualFragment(s);
	   this.parentNode.replaceChild(fragment, this);
	};
	if(window.HTMLElement) { HTMLElement.prototype.__defineSetter__("outerHTML", setOuterHtml)}

//	***** E N D   C R O S S B R O W S E R   O U T E R H T M L   F U N C T I O N *****

function toggle(obj) {
	if (obj.style.display == 'none') {
		obj.style.display = 'block'
	} else {
		obj.style.display = 'none'
	}
}

function isNumeric(x) {
	var RegExp = /^(-)?(\d*)(\.?)(\d*)$/;
	var result = x.match(RegExp);
	return result;
}

function toggleProductTable(obj) {
	if (document.getElementById('BrandsTable').style.display == 'none') {
		obj.innerHTML = 'New Arrivals';
	} else {
		obj.innerHTML = 'Show Brands'
	};
	toggle(document.getElementById('BrandsTable'));
	toggle(document.getElementById('NewArrivalTable'));
}

function AttachBlackStripe() {
	var rows = document.getElementsByTagName('a');
	for (var i=rows.length-1; i>0; i--) {
		if (rows[i].className.toLowerCase() == 'blackstripe') {
			var strHref = rows[i].href.toLowerCase()
				strHref = strHref.replace(/\'/g, "&rsquo;");
				strHref = (strHref.substring(0, 10) == "javascript") ? '#' : strHref;
			var strOnClick = (strHref == "#") ? rows[i].href.substring(11, rows[i].href.length) : 'location.href=\'' + strHref + '\'';
			var strHTML = '<div class="blackStripe" '
						+ 'onMouseOver="this.className=\'blackStripe_Inverted\'" '
						+ 'onMouseDown="this.className=\'blackStripe_onClicked\'" '
						+ 'onMouseOut="this.className=\'blackStripe\'" '
						+ 'onClick="' + strOnClick + '" '
						+ 'title="' + rows[i].title + '" '
						+ '><a href="' + strHref + '">'
						+ rows[i].innerHTML + '</a></div>';
			rows[i].outerHTML = strHTML;
		} else if (rows[i].className.toLowerCase() == 'blackstripe_onclicked') {
			var strHTML = '<div class="blackStripe_onClicked">'
						+ rows[i].innerHTML + '</div>';
			rows[i].outerHTML = strHTML;
		}
	}
}

function startup() {
	AttachBlackStripe();
}