



		var sonar =new Object();
		sonar.ss={ Benthos:["SIS-1500 ",
			"SIS-1502 ",
			"SIS-1503 ",
			"SIS-1000 ",
			"SIS-3000 ",
			"SIS-7000",
			"SIS-1624  ",
			"Chirp II",
			"C3D 2 channel Chirp"],
			CMax:["CM2"],
			DTI:["SAS"],
			Edgetech:["260",
			"DF-1000 DCI",
			"DF-1000 DCU",
			"272TD",
			"272ACI",
			"4300-MPX",
			"4200"],
			GeoAcoustics:["Analog"],
			Imagenex:["858"],
			Klein:["595",
			"2000",
			"2100",
			"3000",
			"5000",
			"5500"],
			Simrad:["992 (Analog)"]};
			
		sonar.mb={Elac:["1050",
			"1180",
			"1185"],
			Odom:["Echotrac"],
			Reson:["9001",
			"9002",
			"9003",
			"8101 (240Khz)",
			"8125 (455Khz)",
			"8124 (200Khz)",
			"8111 (100Khz)",
			"8160 (50Khz)",
			"8150 (12/24Khz)"],
			Simrad:["SM2000",
			"EM2000",
			"EM3000",
			"EM3000D",
			"EM3002"]};
		sonar.sbp={ Benthos:["SIS-1503",
			"SIS-1000",
			"SIS-3000"],
			GeoAcoustics:["All Models"],
			Edgetech:["3100",
			"3200",
			"SB-424",
			"SB-216S",
			"SB-512i"]};
		sonar.sb={	Odom:["Any Model"],
			Innerspace:["Any Model"],
			Raytheon:["All Models"],
			Simrad:["All Models"],
			RS232:["Any Model"],
			Atlas:["Deso 25",
			"Deso 30"]};
		sonar.ff={	Fansweep:[".SDA to .XTF"],
			Hypack:[".HSX to .XTF"],
			Simrad:[".ALL to .XTF"],
			SubMetrix:[".SXP  to .XTF"]};




	// make an element visible
	function show(ele) {
		if (ele!=null) {
			ele.style.display="inline";
			ele.style.visibility="visible";
		}
	}
	
	//Hide an element
	function hide(ele) {
		if (ele!=null) {
			ele.style.display="none";
			ele.style.visible="hidden";
		}
	}
	
	
function setTabNum(newTab) {
	//alert("setTabNum: "+newTab);
  //if All Products is being shown, make sure all categories visible
	//show all categories
	if (newTab==4) {
		show(getElementById("catacquisition"));
		show(getElementById("catrealtime"));
		show(getElementById("cataquisition"));
		show(getElementById("catprocessing"));
		show(getElementById("catsurvey"));
		show(getElementById("catintegrated"));
		show(getElementById("catworkstation"));
	} else if (newTab==3) {
	  fillMF('ss');
	}
		
  var pTab, nTab, pContent, nContent, pAnchor, nAnchor; //Variables for old and new tan and content divs
  if (lastTab>0) {
    pTab=getElementById("tab"+lastTab);
	pContent=getElementById("content"+lastTab);
	pAnchor=getElementById("taba"+lastTab);
  }
  
  nTab=getElementById("tab"+newTab);
  nContent=getElementById("content"+newTab);
  nAnchor=getElementById("taba"+newTab);
     
  //Reset previous tab
  if ((pTab!=null) && (pContent!=null)) {
   pAnchor.style.borderBottom="1pt solid #cccccc";
  pAnchor.style.backgroundColor="#eeeeee";
   pContent.style.display="none";
   pContent.style.visibility="hidden";//hidden
  }
  
  if ((nTab==null) || (nContent==null)) {
    alert("Tab "+newTab+" is not defined");
  } 
  
  if (nContent.style!=null) {
  nAnchor.style.borderBottom="thin solid #ffffff";
  nAnchor.style.backgroundColor="#ffffff";
  nContent.style.display="block";
  nContent.style.visibility="visible";
  lastTab=newTab;
  }
}


//go to a category
function setTab(newTab, aname) {
		//alert("setTab: "+newTab+" - "+aname);
		setTabNum(newTab);
		
		//hide all categories
		hide(getElementById("catacquisition"));
		hide(getElementById("catrealtime"));
		hide(getElementById("cataquisition"));
		hide(getElementById("catprocessing"));
		hide(getElementById("catsurvey"));
		hide(getElementById("catintegrated"));
		hide(getElementById("catworkstation"));
		
		//make the associated category div visible
		show(getElementById("cat"+aname));
		
		
		//location.href="#"+aname;
}

function initTab() {

	
		//If search result, start on tab 1
		if (location.search.indexOf("?zoom")!=-1) {
			setTabNum(1);
		} else if (location.href.indexOf("#")==-1) {
				setTabNum(2);
		} else {
			setTabNum(location.href.substr(location.href.length-1, 1));
		}
}
//-->

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


	//compatibility method for getElementById
	function getElementById(item) {
		if (document.all) {return document.all[item];}
		if (document.getElementById) {return document.getElementById(item);}
		alert("Your browser is unable to use our search.  \nPlease upgrade to a newer, more secure, browser at www.mozilla.org");
		return null;
	}
	
	
	function fillModel() {	
		//hide(document.forms.sonarsearch.modelSelector);
		var manuf = document.forms.sonarsearch.manufSelector.options[document.forms.sonarsearch.manufSelector.selectedIndex].value;
		
		var mf = sonar[typ][manuf]; //get an associative array of manufactures and models
		var obj = new Array();
		var i=0;
		document.forms.sonarsearch.modelSelector.options.length=0;
		for (mod in mf) {
			document.forms.sonarsearch.modelSelector.options[i]=new Option(mf[mod], mf[mod], false, false);
			i++;
		}
		document.forms.sonarsearch.modelSelector.selectedIndex=0;
		//setTimeout("show(document.forms.sonarsearch.modelSelector)", 60);
	}
	
	
	function fillMF(stype) {
		//hide(document.forms.sonarsearch.manufSelector);
		typ=stype;
		var mf = sonar[typ]; //get an associative array of manufactures and models
		var obj = new Array();
		var i=0;
		document.forms.sonarsearch.manufSelector.options.length=0;
		for (mod in mf) {
			document.forms.sonarsearch.manufSelector.options[i]=new Option(mod, mod, false, false);
			i++;
		}
		
		fillModel();		
		document.forms.sonarsearch.modelSelector.selectedIndex=0;
		//setTimeout("show(document.forms.sonarsearch.manufSelector)", 60);
	}
	
	
	//When a new type of sonar is selected, a different manufacturer list needs to be presented
	function sonarChange() {
		fillMF(document.forms.sonarsearch.sonarSelector.options[document.forms.sonarsearch.sonarSelector.selectedIndex].value);
	}
	
	function findSonar() {
		var searchterm = document.forms.sonarsearch.manufSelector.options[document.forms.sonarsearch.manufSelector.selectedIndex].value;
		searchterm=searchterm+" "+document.forms.sonarsearch.modelSelector.options[document.forms.sonarsearch.modelSelector.selectedIndex].value;
		
		var searchstring="zoom_query="+encodeURI(searchterm)+"&zoom_per_page=10&zoom_cat=-1&zoom_and=1&zoom_sort=0";
		document.location.href="forward.htm?"+searchstring;
		}
		
		
