/*
son of suckerfish menu script from:
http://www.htmldog.com/articles/suckerfish/dropdowns/
 */

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



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

function nextPage(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=nextPage(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function pickPageGo(selName,targ,restore){ //v3.0
  var selObj = nextPage(selName); if (selObj) pickPage(targ,selObj,restore);
}

function getPage() {
	var inputVal = document.form1.srch.value;
	
  switch(inputVal){ 
       case 'TY6001': 
	   case 'ty6001':
         document.location = 'tysearch6001.htm'; 
         break;
	   case 'F523': 
	   case 'f523': 
         document.location = 'f523.htm'; 
         break;
		case 'TY6003':
		case 'ty6003':
         document.location = 'tysearch6003.htm'; 
         break;
default: 
         document.location = 'sorry.htm'; 
         break; 
  }
}

function noEnterKey(e)
{
     var key;

     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          return false;
     else
          return true;
}