var DEV = 1;
var LOCAL = 0;


function popupStock(pagename,height,width){
	var h=parseInt(height);
	var w=parseInt(width);
	var hw="SCROLLBARS=0,HEIGHT="+h+",WIDTH="+w;
  myWind=window.open(pagename,"",hw)
}

function popupShipEst(pagename,height,width){
	var h=parseInt(height);
	var w=parseInt(width);
	var hw="SCROLLBARS=0,HEIGHT="+h+",WIDTH="+w;
  myWind=window.open(pagename,"",hw)
}

function popupCart(pagename,height,width){
	var h=parseInt(height);
	var w=parseInt(width);
	var hw="SCROLLBARS=1,HEIGHT="+h+",WIDTH="+w;
  myWind=window.open(pagename,"",hw)
}

function popupGisCart(pagename,height,width){
	var c=getGisCase();
	pagename+=c;
	var h=parseInt(height);
	var w=parseInt(width);
	var hw="SCROLLBARS=1,HEIGHT="+h+",WIDTH="+w;
  myWind=window.open(pagename,"",hw)
}

function getGisCase() {
	var theForm=document.guitarsinstock;
	var theField=theForm['cases'];
	if (theField.length) {
		for (var i=0; i<theField.length; i++) {
			if (theField[i].checked) {
				return i;
			}
		}
	} else {
		return 0;
	}
}

function validateTrackFields() {
	var theForm=document.track;
	var ordnum=theForm['ordnum'];
	var phnum=theForm['phnum'];
	var zip=theForm['zip'];
	// First check if an order number is entered
	if (ordnum.value=='') {
		// Must Include phone number and zip code
		if (phnum.value=='' || zip.value=='') {
			alert("You must enter either Order Number AND Phone Number OR Phone Number AND Zip/Postal Code");
			return false;
		} else {
			return true;
		}
	} else {
		// Must also include the phone number
		if (phnum.value=='') {
			alert("You must enter either Order Number AND Phone Number OR Phone Number AND Zip/Postal Code");
			return false;
		} else {
			return true;
		}
	}
}





(function(){var s=function(){__flash__removeCallback=function(i,n){if(i)i[n]=null;};window.setTimeout(s,10);};s();})();

