function newWin(fname,height,width) {
  if (height < 200) height=200;
  if (width < 400) width=400;  
  nWin = window.open(fname+'.html','Info','toolbar=no,location=no,scrollbars=no,resizable=yes,height='+height+',width='+width);
  nWin.focus; 
}
function newWins(fname,height,width) {
  if (height < 200) height=200;
  if (width < 400) width=400;  
  nWin = window.open(fname+'.html','Info','toolbar=no,location=no,scrollbars=yes,resizable=yes,height='+height+',width='+width);
  nWin.focus; 
}
function avWin(fname) {
  nWin = window.open('av/av_'+fname+'.shtml','Availability','toolbar=no,location=no,scrollbars=yes,resizable=yes,width=500,height=500')
  nWin.focus; 
}
function updateParent(newLocation) {
	if (opener) {
		opener.window.location=newLocation;
		opener.window.focus();
	}
	else
		window.location=newLocation;	
}
function canManipulateImages() {
  if (document.images)
      return true;
  else
      return false;
}
function preLoadImage(imageURL) {
  if (gImageCapableBrowser) {
      image = new Image();
      image.src = imageURL;
      return image;
  }
}
function changeButtonImage(buttonName,sourceImage) {
  if (gImageCapableBrowser) {
      document [buttonName].src = sourceImage.src;
      return true;
  }
}
function noStock() {
  alert("Sorry, we are currently out of stock of this item. We do not expect to get any new stock until next Autumn.");
  return false;
}

function jump_Menu(targ,selObj,restore)
{
 if (selObj.options[selObj.selectedIndex].value != "") {
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}

gImageCapableBrowser = canManipulateImages();
buttonHomeInactive     = preLoadImage("../images/buttons/i-home.gif");
buttonHomeActive       = preLoadImage("../images/buttons/a-home.gif");
buttonGuideInactive    = preLoadImage("../images/buttons/i-guide.gif");
buttonGuideActive      = preLoadImage("../images/buttons/a-guide.gif");
buttonpIndexInactive   = preLoadImage("../images/buttons/i-p-index.gif");
buttonpIndexActive     = preLoadImage("../images/buttons/a-p-index.gif");
buttonSearchInactive   = preLoadImage("../images/buttons/i-search.gif");
buttonSearchActive     = preLoadImage("../images/buttons/a-search.gif");
buttonPrevInactive     = preLoadImage("../images/buttons/i-prev.gif");
buttonPrevActive       = preLoadImage("../images/buttons/a-prev.gif");
buttonUpInactive       = preLoadImage("../images/buttons/i-up.gif");
buttonUpActive         = preLoadImage("../images/buttons/a-up.gif");
buttonNextInactive     = preLoadImage("../images/buttons/i-next.gif");
buttonNextActive       = preLoadImage("../images/buttons/a-next.gif");
buttonTrolleyInactive  = preLoadImage("../images/buttons/i-trolley.gif");
buttonTrolleyActive    = preLoadImage("../images/buttons/a-trolley.gif");
buttonCheckoutInactive = preLoadImage("../images/buttons/i-checkout.gif");
buttonCheckoutActive   = preLoadImage("../images/buttons/a-checkout.gif");
priceArray = new Array (2.29,2.15,1.98,1.78,1.54, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0) ;
distFactor = new Array (.6666667,0,0);
maxDist = 1 ;
maxSize = 1 ;
maxNo = 2500;
