function scDoQty(x){
var el = document.getElementById('vwquantity'+x);
	if(el && (el.value <= 0) || isNaN(el.value)){
		el.value = 1;
	}
}

function changeTab(x){
var currid = 'tabbedContent'+x;
var currtab = 'tab'+x;
var tabContent = document.getElementById(currid);
var tabId = document.getElementById(currtab);
var tabbedContainer = document.getElementById('tabbedContainer').getElementsByTagName('div');
var tabbedContainerLen = tabbedContainer.length
var tabs = document.getElementById('tabsContainer').getElementsByTagName('div');
var tabsLen = tabs.length
tabContent.style.display = 'block';
tabId.style.backgroundImage = "url(/lib/tigergps/tabon.gif)";
var inc = 0;
var inc2 = 0;
	while(inc<tabbedContainerLen){
		if(tabbedContainer[inc].id.indexOf('tabbedContent') > -1){
			if(tabbedContainer[inc].id != currid){
				document.getElementById(tabbedContainer[inc].id).style.display = 'none'
			}
		}
		inc++
	}
	while(inc2<tabsLen){
		if(tabs[inc2].id.indexOf('tab') > -1){
			if(tabs[inc2].id != currtab){
				document.getElementById(tabs[inc2].id).style.backgroundImage = "url(/lib/tigergps/taboff.gif)";
			}
		}
		inc2++
	}
}

function makeMAPWin(ww, wh) {
//ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<font size=\"2\" face=\"Arial, Helvetica, sans-serif\"><b>Price \"Too Low to Display\" Explained<\/b><br> In order to provide the best support from our manufacturer's and distributors, we have agreed to abide by their \"MAP\" or minimum-advertised-price policy. You can see this price by clicking the product name and then selecting the Add to Cart button on the product information page. <br><br>Please be assured that simply adding an item to your cart does not obligate you to buy it--you can always delete the item from your cart if you decide not to purchase it.<p align=\"center\"><a href=\"javascript:window.close();\">Close Window</a></p></font>");
w1.document.focus();
};

var w1;
function openNotify(itemid) 
	{ openWindow("http://hosting.solidcactus.com/tellafriend/tigergps/notify-me.asp",560,400,itemid); }
function openPriceMatch() 
	{ openWindow("http://hosting.solidcactus.com/tellafriend/tigergps/price-match.asp",560,550); }
function openMailingList() 
	{ openWindow("http://hosting.solidcactus.com/tellafriend/tigergps/mailing-list.asp",560,400); }

function openWindow(theurl,wid,hi,itemid) {
	if(w1) w1.close();
	if(itemid == "")
		w1 = window.open(theurl,'w1','width='+wid+',height='+hi+',top=100,left=100,scrollbars=1');
	else
		w1 = window.open(theurl+"?"+itemid,'w1','width='+wid+',height='+hi+',top=100,left=100,scrollbars=1');
	w1.focus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
