/* Top menu functions */
 
function change(id, newClass) {
var identity=document.getElementById(id);
identity.className=newClass;
}

function menu (id) {

var buttons = new Array();
buttons[0] = "broadband";
buttons[1] = "general";
buttons[2] = "matched";
buttons[3] = "personal";
buttons[4] = "broadcasting";

<!--buttons[5] = "components";-->
<!--buttons[6] = "tr-switch";-->


var submenu = new Array();

submenu[0] = '<b><font color="#CA0000">10 KHz to 6 GHz </font></b>' + 
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">' +
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=BBM"><u>1000 Series: Modules <font color="#CA0000" size="-2">(Up to 600 Watt)</font></u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +			 
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=BBS"><u>2000 Series: Systems <font color="#CA0000" size="-2">(Up to 2000 Watt)</font></u></a> ' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';  

submenu[1] = '<b><font color="#CA0000">0.1 MHz to 4.2 GHz </font></b>' + 
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">' +
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=GCM"><u>3000 Series: Modules <font color="#CA0000" size="-2">(Up to 800 Watt)</font></u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +			 
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=GCS"><u>4000 Series: Systems <font color="#CA0000" size="-2">(Up to 2500 Watt)</font></u></a> ' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';

submenu[2] = '<b><font color="#CA0000">up to 6 GHz </font></b>' + 
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">' +
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=MBM"><u>5000 Series: Modules <font color="#CA0000" size="-2">(Up to 300 Watt)</font></u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +			 
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=MBS"><u>6000 Series: Systems <font color="#CA0000" size="-2">(Up to 1000 Watt)</font></u></a> ' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';

submenu[3] = '<b><font color="#CA0000">CEll, PCS, UMTS, Wll </font></b>' + 
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">' +
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=PCM"><u>7000 Series: Modules <font color="#CA0000" size="-2">(Various)</font></u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +			 
			'<a href="http://www.empowerrf.com/products/browse_products.php?cat=PCS"><u>8000 Series: Systems <font color="#CA0000" size="-2">(Various)</font></u></a> ' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';
			
submenu[4] = '<a href="http://www.empowerrf.com/broadcasting/dtv_module.php"><u>Broadcast RF Amplifier Modules</u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +
			'<a href="http://www.empowerrf.com/broadcasting/dtv_system.php"><u>Broadcast RF Amplifier Systems</u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';

submenu[5] = '<a href="http://www.empowerrf.com/components/connectors.php"><u>RF Connectors</u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +
			'<a href="http://www.empowerrf.com/components/adapters.php"><u>RF Adapters</u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14"> ' +
			'<a href="http://www.empowerrf.com/components/cable-assemblies.php"><u>Cable Assemblies</u></a>' +
			'<img src="http://www.empowerrf.com/images/arrow-space.gif" width="14" height="14">';

<!--submenu[6] = '';-->



  for (i=0;i<buttons.length;i++)
  {
    if (buttons[i] == id) {
	change(id, 'nav-row-selected');
	document.getElementById("submenutext").innerHTML = submenu[i];
	}
	else {
	change(buttons[i], 'nav-row');
	}
  }

}

/* Functions for swapping images on RF Amplifiers Index */

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

/* Components Search Function for changing selections*/
function comp_change_cat(selection) {
 
if (document.comppart.category.options[4])  { 
  newOpt = document.createElement("option");
  newOpt.text="PCB Connectors";
  newOpt.value="4";
  document.comppart.category.options.add(newOpt,4) ;
}
 
 
 
  if (selection == 'MMCX')  {
	document.comppart.category.remove(5);
	document.comppart.category.remove(4);
  }
  else if (selection == 'MCX') {
	document.comppart.category.remove(5);
  }
  else if (selection == 'BNC' || selection == 'TNC' || selection == 'N') {
	document.comppart.category.remove(4);
  }
  
}


