function submitWishlist(){
document.buyForm.action = "processWishList.asp?fn=a";
document.buyForm.submit();
}
function openSize(){
sizeWin = window.open("/size_small.asp", "sizeWindow", "width=500, height=500, toolbar=no, scrollbars=yes");
sizeWin.focus();
}

function fliptab(id){
	for(var n = 1; n < 3; n ++){
		document.getElementById("tab"+n).style.visibility = n == id ? "visible" : "hidden";
	}
}

function fliptabs(id){
	for(var n = 1; n < 3; n ++){
		document.getElementById("newtab"+n).style.visibility = n == id ? "visible" : "hidden";
		document.getElementById("newtab"+n).style.overflow = n == id ? "auto" : "hidden";
	}
}

function doBookmark() {
	var sTitle = "Naughty Bits and Bobs";
	var sURL   = "http://www.naughtybitsandbobs.com";
	window.external.AddFavorite(sURL,sTitle);
}

function submitSearch(){
	if ( document.productSearchForm.fSearch.value == "" ) {
	  document.productSearchForm.fSearch.value = "#";
	}
	return true;
}

function openWin(n,w,h) {
	nWin = window.open(n, "", "height=" + h + ", width=" + w + ", scrollbars=yes");
	nWin.focus();
}

function getX(obj1) {
	var x1;
	if (obj1.offsetParent.nodeName != "BODY") {
		x1 = obj1.offsetLeft + getX(obj1.offsetParent);
	}
	else {
		x1 = obj1.offsetLeft;
	}
	return x1;
}

function getY(obj1) {
	var y1;
	if (obj1.offsetParent.nodeName != "BODY") {
		y1 = obj1.offsetTop + getY(obj1.offsetParent);
	}
	else {
		y1 = obj1.offsetTop;
	}
	return y1;
}

  function mnuOut(e1,obj1) {
  	var x1, y1;
  	var x2, y2;
  	var x3, y3;
	try {
	  	if (e1.layerX) { x1 = e1.pageX; } else { x1 = e1.x + document.body.scrollLeft; }
	  	if (e1.layerY) { y1 = e1.pageY; } else { y1 = e1.y + document.body.scrollTop; }
	
	  	x2 = document.getElementById(obj1).offsetLeft;
	  	y2 = document.getElementById(obj1).offsetTop;
	  	x3 = document.getElementById(obj1).offsetWidth;
	  	y3 = document.getElementById(obj1).offsetHeight;
	  	//alert(x1 + ", " + y1 + " : " + x2 + ", " + y2 + " : " + x3 + ", " + y3);
	  	if ((y1 >= (y2 + y3)) || (x1 >= (x2 + x3))) {
	  		//alert(x1 + ", " + y1 + " : " + x2 + ", " + y2 + " : " + x3 + ", " + y3);
	  		hideMenu(obj1);
	  	}
	  	if ((x1 <= x2) || (y1< y2)) {
		  	hideMenu(obj1);
	  	}
  	}
  	catch ( ex ) {
  		// Ignore errors
  	}
  }
  
  function hideMenus(obj1) {
  	if (obj1 != "mnu01") {hideMenu("mnu01");}
  	if (obj1 != "mnu02") {hideMenu("mnu02");}
  	if (obj1 != "mnu03") {hideMenu("mnu03");}
  	if (obj1 != "mnu04") {hideMenu("mnu04");}
  	if (obj1 != "mnu05") {hideMenu("mnu05");}
  	if (obj1 != "mnu06") {hideMenu("mnu06");}
  	if (obj1 != "mnu07") {hideMenu("mnu07");}
  	if (obj1 != "mnu08") {hideMenu("mnu08");}
  	if (obj1 != "mnu09") {hideMenu("mnu09");}
  }
function  mnuBarOut(e1, obj1) {
	mnuOut(e1,obj1);
}
  function hideMenu(obj1) {
  	document.getElementById(obj1).style.display = "none";
	document.getElementById(obj1 + "bar").className = "bar";
  }
  
function showLrgView(cat, scat, pid) {
	setWin = window.open("/enlarge.asp?cat=" + cat + "&scat=" + scat + "&pid=" + pid + "","nWin", "height=516, width=500, toolbars=no, scrolling=no");
	setWin.focus();
}