<!--
//////////////////////////////////////////////////////////////////////////
////////////REMEMBER TO UPDATE BOTH FUNCTIONS//////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//////ANY CHANGES MADE TO THIS FILE A COPY MUST BE FORWARD TO JANICE FOR SSO and NOTIFY DEIRDRE TO UPDATE EUROPE VERSION OF THIS FILE ON THEIR SERVER////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////


function FormFocus() {
	document.vicor_search.q.focus();	
}

			
function FormValidate() {

	var googleform = document.vicor_search;
	
	
	if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "sitesearch") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "datasheets") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "products") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "library") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "manuals") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "notes") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "mech_drawings") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	else if (googleform.q.value == "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "partnumber") {
		alert ("Please enter a value in the search box");
		googleform.q.focus();
	}
	
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "sitesearch") {
		googleform.method = "get";
        googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "datasheets") {
		googleform.restrict.value = "datasheets";
		googleform.method = "get";
        googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "products") {
		googleform.restrict.value = "products";
		googleform.method = "get";
    	googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "library") {
		googleform.restrict.value = "library";
		googleform.method = "get";
    	googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "manuals") {
		googleform.restrict.value = "manuals";
		googleform.method = "get";
	    googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "notes") {
		googleform.restrict.value = "notes";
		googleform.method = "get";
    	googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "mech_drawings") {
		googleform.restrict.value = "mech_drawings";
		googleform.method = "get";
	    googleform.action = "http://207.141.187.10/search";
		googleform.submit();
	}
	
	else if (googleform.q.value != "" && googleform.drop_search.options[googleform.drop_search.selectedIndex].value == "partnumber") {
		googleform.method = "get";
        googleform.action = "javascript:parsePart(document.vicor_search,1);";
		googleform.submit();
	}
	
	
}




function parsePart(form,formid){

   if (form.q.value != "") {
       partnumber = getFamily(form.q.value);
  }


  if (form.q.value == ""){
 
      alert("Please enter a product name, part number or web expresscode.");
      form.q.focus();
  }


//else if (partnumber=="VICINABRICK") window.location="http://www.vicorpower.com/products/vichip/vicinbrick/";
  //webexpress code catalog search 
  else if (partnumber=="SUPPORT") window.location="http://www.vicorpower.com/support/?expresscode=support";
  else if (partnumber=="ROHS") window.location="http://www.vicorpower.com/technical_library/technical_documentation/quality_and_certification/rohs/?expresscode=rohs";
  else if (partnumber=="CONNECTS") window.location="http://www.vicorpower.com/products/accessories/interconnects/?expresscode=connects";
  else if (partnumber=="CPACS") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=cpacs";
  else if (partnumber=="CMDS") window.location="http://vdac2.vicr.com/vdac/00vdac-home.asp";
  else if (partnumber=="SUPPORT") window.location="http://www.vicr.com/support/?expresscode=support"; 
  else if (partnumber=="TECHSUPPORT") window.location="http://www.vicorpower.com/support/?expresscode=techsupport";
  else if (partnumber=="CMDS") window.location="http://www.vicorquality.com/?expresscode=cmds";
  else if (partnumber=="QUALITY") window.location="http://www.vicorquality.com/?expresscode=quality";
  else if (partnumber=="COMP") window.location="http://www.vicorpower.com/products/accessories/components/?expresscode=comp";
  else if (partnumber=="CUSTOM") window.location="http://www.vicorpower.com/products/custom_solutions/?expresscode=custom";
  else if (partnumber=="PFCFLATPAC") window.location="http://www.vicorpower.com/new_products/?expresscode=pfcflatpac";
  else if (partnumber=="PFCFRONTEND") window.location="http://www.vicorpower.com/products/configurable/pfcfrontend/?expresscode=pfcfrontend";
  else if (partnumber=="MCOMPAC") window.location="http://www.vicorpower.com/products/military/compac/?expresscode=mcompac";
  else if (partnumber=="MIAM") window.location="http://www.vicorpower.com/products/military/iam/?expresscode=miam";
  else if (partnumber=="MBRICKS2") window.location="http://www.vicorpower.com/products/military/mmm/?expresscode=mbricks2";
  else if (partnumber=="MBRICKS1") window.location="http://www.vicorpower.com/products/military/200_j00/?expresscode=mbricks1";
  else if (partnumber=="MILCAT") window.location="http://www.vicorpower.com/documents/military_catalog.pdf?expresscode=milcat";
  else if (partnumber=="MVICHIPS") window.location="http://www.vicorpower.com/products/military/vichip/?expresscode=mvichips";
  else if (partnumber=="BRICKS2") window.location="http://www.vicorpower.com/products/dc-dc/converters/mxmnmc/?expresscode=bricks2";
  else if (partnumber=="PRODSELECT") window.location="http://vicorwebapps.vicorpower.com/upc/PageStartAction.do";
  else if (partnumber=="BRICKS1") window.location="http://www.vicorpower.com/products/dc-dc/converters/dc-dc_converters/?expresscode=bricks1";
  else if (partnumber=="FPAEVAL") window.location="http://www.vicorpower.com/products/vichip/?expresscode=fpaeval";
  else if (partnumber=="MPRMVTM") window.location="http://www.vicorpower.com/products/military/vichip/?expresscode=milprmvtm";
  else if (partnumber=="PFM") window.location="http://www.vicorpower.com/technical_library/datasheets/?expresscode=pfm";
  else if (partnumber=="PRM") window.location="http://www.vicorpower.com/products/vichip/?expresscode=prm";
  else if (partnumber=="DCMEGAPAC") alert ('       Product will be available soon.\n\n       Please call your local Vicor Representative, \n       Distributor or Vicor Office.');
  else if (partnumber=="JAVELIN") alert ('       Product will be available soon.\n\n       Please call your local Vicor Representative, \n       Distributor or Vicor Office.');
  else if (partnumber=="VICBRICK") alert ('       Product will be available soon.\n\n       Please call your local Vicor Representative, \n       Distributor or Vicor Office.');
  else if (partnumber=="1GEN") window.location="http://www.vicorpower.com/products/dc-dc/converters/dc-dc_converters/?expresscode=1gen";
  else if (partnumber=="2GEN") window.location="http://www.vicorpower.com/products/dc-dc/converters/mxmnmc/?expresscode=2gen";
  else if (partnumber=="VIPACARRAY") window.location="http://www.vicorpower.com/products/configurable/vipacarray/?expresscode=vipacarray";
  else if (partnumber=="QPO-1") window.location="http://www.picorpower.com/products/output_filters/qpo-1/?expresscode=qpo1";
  else if (partnumber=="QPO-2") window.location="http://www.picorpower.com/products/output_filters/qpo-2/?expresscode=qpo2";
  //else if (partnumber=="QPI-1") window.location="http://www.picorpower.com/products/input_filters/qpi-1/?expresscode=qpi1";
 // else if (partnumber=="QPI-2") window.location="http://www.picorpower.com/products/input_filters/qpi-2/?expresscode=qpi2";
  else if (partnumber=="QPI-3") window.location="http://www.picorpower.com/products/input_filters/qpi-3/?expresscode=qpi3";
  else if (partnumber=="QPI-4") window.location="http://www.picorpower.com/products/input_filters/qpi-4/?expresscode=qpi4";
  else if (partnumber=="QPI-5") window.location="http://www.picorpower.com/products/input_filters/qpi-5/?expresscode=qpi5";
  else if (partnumber=="QPI-6") window.location="http://www.picorpower.com/products/input_filters/qpi-6/?expresscode=qpi6";
  else if (partnumber=="QPI-7") window.location="http://www.picorpower.com/products/input_filters/qpi-7/?expresscode=qpi7";
  else if (partnumber=="QPI-8") window.location="http://www.picorpower.com/products/input_filters/qpi-8/?expresscode=qpi8";
  else if (partnumber=="QPI-9") window.location="http://www.picorpower.com/products/input_filters/qpi-9/?expresscode=qpi9";
  else if (partnumber=="QPI-10") window.location="http://www.picorpower.com/products/input_filters/qpi-10/?expresscode=qpi10";
  else if (partnumber=="QPI-11") window.location="http://www.picorpower.com/products/input_filters/qpi-11/?expresscode=qpi11";
  else if (partnumber=="QPI-12") window.location="http://www.picorpower.com/products/input_filters/qpi-12/?expresscode=qpi12";
  else if (partnumber=="QPI") window.location="http://www.picorpower.com/products/input_filters/?expresscode=qpi";
  else if (partnumber=="QPO") window.location="http://www.picorpower.com/products/output_filters/?expresscode=qpo";
  else if (partnumber=="POLC") window.location="http://www.picorpower.com/products/power_managementics/?expresscode=polc";
  else if (partnumber=="M1GEN") window.location="http://www.vicorpower.com/products/military/200_j00/?expresscode=m1gen";
  else if (partnumber=="MCOMPAC") window.location="http://www.vicorpower.com/products/military/compac/?expresscode=mcompac";
  else if (partnumber=="MAIM") window.location="http://www.vicorpower.com/products/military/aim/?expresscode=maim";
  else if (partnumber=="MMEGA") window.location="http://www.vicorpower.com/products/military/megamod/?expresscode=mmega";
  else if (partnumber=="MVIPAC") window.location="http://www.vicorpower.com/products/military/vipac/?expresscode=mvipac";
  else if (partnumber=="M2GEN") window.location="http://www.vicorpower.com/products/military/200_j00/?expresscode=m2gen";
  else if (partnumber=="MURAM") window.location="http://www.vicorpower.com/products/military/microram/?expresscode=muram";
  else if (partnumber=="MLIT") window.location="http://www.vicorpower.com/documents/military_catalog.pdf?expresscode=militarycatalog";
  else if (partnumber=="INTFE") window.location="http://www.vicorpower.com/products/filter/frontend/?expresscode=intfe";
  else if (partnumber=="MINIEL") window.location="http://www.vicorpower.com/products/configurable/lopac/?expresscode=miniel";
  else if (partnumber=="MEGAPAC") window.location="http://www.vicorpower.com/products/configurable/mpfamily/?expresscode=megapac";
  else if (partnumber=="CONVERTERPAC") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=converterpac";
  else if (partnumber=="SOCKETS") window.location="http://www.vicorpower.com/products/accessories/2nd_gen_sockets/?expresscode=sockets";
  else if (partnumber=="COMPAC") window.location="http://www.vicorpower.com/products/configurable/compac/?expresscode=compac";
  else if (partnumber=="COMP") window.location="http://www.vicorpower.com/products/accessories/components/?expresscode=comp";
  else if (partnumber=="CAPS") window.location="http://www.vicorpower.com/products/accessories/capacitors/?expresscode=caps";
  else if (partnumber=="CHOKES") window.location="http://www.vicorpower.com/products/accessories/magnetics/?expresscode=chokes";
  else if (partnumber=="MOUNTING1") window.location="http://www.vicorpower.com/products/accessories/1st_gen_mounting/?expresscode=mounting1";
  else if (partnumber=="MOUNTING2") window.location="http://www.vicorpower.com/products/accessories/2nd_gen_mounting/?expresscode=mounting2";
  else if (partnumber=="STANDOFF") window.location="http://www.vicorpower.com/technical_library/mechanical_drawings/standoffs/?expresscode=standoff";
  
  //partnumber search
  //else if (partnumber=="VICBRICK") window.location="http://www.vicorpower.com/products/vichip/ibc/?expresscode=ibc";
  else if (partnumber=="IBC") window.location="http://www.vicorpower.com/products/vichip/ibc/?expresscode=ibc";
  else if (partnumber=="VTM") window.location="http://www.vicorpower.com/products/vichip/?expresscode=vtm";
  else if (partnumber=="BCM") window.location="http://www.vicorpower.com/products/vichip/?expresscode=bcm";
  else if (partnumber=="FPA") window.location="http://www.vicorpower.com/products/vichip/?expresscode=fpa";
  else if (partnumber=="VICHIP") window.location="http://www.vicorpower.com/products/vichip/?expresscode=vichip";
  else if (partnumber=="ENMODS") window.location="http://www.vicorpower.com/products/filter/enmods/?expresscode=enmods";
  else if (partnumber=="VIPACARRAY") window.location="http://www.vicorpower.com/products/configurable/vipacarray/?expresscode=vipacarray";
  else if (partnumber=="MICRORAM") window.location="http://www.vicorpower.com/products/filter/microram/?expresscode=microram";
  else if (partnumber=="BADGER") window.location="http://www.vicorpower.com/products/configurable/badger/?expresscode=badger";
  else if (partnumber=="POWERBANK") window.location="http://www.vicorpower.com/products/configurable/powerbank/?expresscode=powerbank";
  else if (partnumber=="RACKGUARD") window.location="http://www.vicorpower.com/products/configurable/rackguard/?expresscode=rackguard";
  else if (partnumber=="VP") window.location="http://www.vicorpower.com/products/configurable/vipac/?expresscode=vp";
  else if (partnumber=="VC") window.location="http://www.vicorpower.com/products/configurable/vipac/?expresscode=vc";
  else if (partnumber=="VA") window.location="http://www.vicorpower.com/products/configurable/vipac/?expresscode=va";
  else if (partnumber=="VIPAC") window.location="http://www.vicorpower.com/products/configurable/vipac/?expresscode=vipac";
  else if (partnumber=="VI200") window.location="http://www.vicorpower.com/products/dc-dc/converters/dc-dc_converters/?expresscode=vi200";
  else if (partnumber=="VIJ00") window.location="http://www.vicorpower.com/products/dc-dc/converters/dc-dc_converters/?expresscode=vij00";
  else if (partnumber=="BATMOD") window.location="http://www.vicorpower.com/products/dc-dc/converters/bat_mod/?expresscode=batmod";
  else if (partnumber=="AIMS") window.location="http://www.vicorpower.com/products/filter/aim/?expresscode=aims";
  else if (partnumber=="ARMS") window.location="http://www.vicorpower.com/products/filter/arm/?expresscode=arms";
  else if (partnumber=="HAMS") window.location="http://www.vicorpower.com/products/filter/ham/?expresscode=hams";
  else if (partnumber=="IAMS") window.location="http://www.vicorpower.com/products/filter/iam/?expresscode=iams";
  else if (partnumber=="RAMS") window.location="http://www.vicorpower.com/products/filter/ram/?expresscode=rams";
  else if (partnumber=="FLATPAC") window.location="http://www.vicorpower.com/products/configurable/flat_pac/?expresscode=flatpac";
  else if (partnumber=="FLATPAC-EN") window.location="http://www.vicorpower.com/products/configurable/flatpacen/?expresscode=flatpacen";
  else if (partnumber=="MEGAPAC") window.location="http://www.vicorpower.com/products/configurable/mpfamily/?expresscode=megapac";
  else if (partnumber=="CONVERTERPAC") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=converterpac";
  else if (partnumber=="MEGAMOD") window.location="http://www.vicorpower.com/products/configurable/megamod/?expresscode=megamod";
  else if (partnumber=="MI200") window.location="http://www.vicorpower.com/products/military/200_j00/?expresscode=mi200";
  else if (partnumber=="MIJ00") window.location="http://www.vicorpower.com/products/military/200_j00/?expresscode=mij00";
  else if (partnumber=="MIAIMS") window.location="http://www.vicorpower.com/products/military/aim/?expresscode=miaims";
  else if (partnumber=="MIIAMS") window.location="http://www.vicorpower.com/products/military/iam/?expresscode=miiams";
  else if (partnumber=="MIRAMS") window.location="http://www.vicorpower.com/products/military/ram/?expresscode=mirams";
  else if (partnumber=="MICOMPAC") window.location="http://www.vicorpower.com/products/military/compac/?expresscode=micompac";
  else if (partnumber=="MIMEGAMOD") window.location="http://www.vicorpower.com/products/military/megamod/?expresscode=mimegamod";
  else if (partnumber=="LOPAC") window.location="http://www.vicorpower.com/products/configurable/lopac/?expresscode=lopac";
  else if (partnumber=="2NDGEN") window.location="http://www.vicorpower.com/products/dc-dc/converters/mxmnmc/?expresscode=2ndgen";
  else if (partnumber=="IAM48") window.location="http://www.vicorpower.com/products/filter/iam/?expresscode=iam48";
  else if (partnumber=="FM48") window.location="http://www.vicorpower.com/documents/datasheets/ds_filtmod48.pdf?expresscode=fm48";
  else if (partnumber=="FIAM") window.location="http://www.vicorpower.com/products/filter/fiam/?expresscode=fiam";
  else if (partnumber=="FARM") window.location="http://www.vicorpower.com/products/filter/farm/?expresscode=farm";
  else if (partnumber=="SURFMATE") window.location="http://www.vicorpower.com/products/accessories/2nd_gen_sockets/?expresscode=surfmate";
  else if (partnumber=="INMATE") window.location="http://www.vicorpower.com/products/accessories/2nd_gen_sockets/?expresscode=inmate";
  else if (partnumber=="ACCESSORIES") window.location="http://www.vicorpower.com/products/accessories/?expresscode=accessories";
  else if (partnumber=="ACCESSORIESOP") window.location="http://www.vicorpower.com/products/accessories/?expresscode=accessoriesop";
  else if (partnumber=="ACCESSORIESMO") window.location="http://www.vicorpower.com/products/accessories/2nd_gen_mounting/?expresscode=accessoriesmo";
  else if (partnumber=="ACCESSORIESPC") window.location="http://www.vicorpower.com/products/accessories/components/?expresscode=accessoriespc";
  else if (partnumber=="POWERSTICK") window.location="http://www.vicorpower.com/products/dc-dc/converters/?expresscode=powerstick";
  else if (partnumber=="MFIAM") window.location="http://www.vicorpower.com/products/military/mfiam/?expresscode=mfiam";
  else {
    form.q.value = "";
    alert('       There was no matching part found.\n\n       Please try again or call your local\nVicor Representative, Distributor or Vicor Office.');
  }

}



function getFamily(product)
// Parses a part number pattern into a generic part number type or family
{
  Family = "";

  if (product=="") return Family;
     // Strip out all hyphens and convert to Upper Case
     NewProduct =  product.toUpperCase();
     Uproduct = cleanString(NewProduct);
     //    alert('Uproduct ' + Uproduct + '<---');
	 Uproduct29 = Uproduct.substring(0,29);
	 Uproduct28 = Uproduct.substring(0,28);
	 Uproduct27 = Uproduct.substring(0,27);
	 Uproduct26 = Uproduct.substring(0,26);
	 Uproduct25 = Uproduct.substring(0,25);
	 Uproduct24 = Uproduct.substring(0,24);
	 Uproduct23 = Uproduct.substring(0,23);
	 Uproduct22 = Uproduct.substring(0,22);
	 Uproduct21 = Uproduct.substring(0,21);
	 Uproduct20 = Uproduct.substring(0,20);
	 Uproduct19 = Uproduct.substring(0,19);
	 Uproduct18 = Uproduct.substring(0,18);
	 Uproduct17 = Uproduct.substring(0,17);
	 Uproduct16 = Uproduct.substring(0,16);
	 Uproduct15 = Uproduct.substring(0,15);
	 Uproduct14 = Uproduct.substring(0,14);
	 Uproduct13 = Uproduct.substring(0,13);
	 Uproduct12 = Uproduct.substring(0,12);
	 Uproduct11 = Uproduct.substring(0,11);
	 Uproduct10 = Uproduct.substring(0,10);
	 Uproduct9 = Uproduct.substring(0,9);
	 Uproduct8 = Uproduct.substring(0,8);
	 Uproduct7 = Uproduct.substring(0,7);
     Uproduct6 = Uproduct.substring(0,6);
     Uproduct5 = Uproduct.substring(0,5);
     Uproduct4 = Uproduct.substring(0,4);
     Uproduct3 = Uproduct.substring(0,3);
     Uproduct2 = Uproduct.substring(0,2);

     if (NewProduct.lastIndexOf('-BM')!="-1") Family="BATMOD"
	 //webexpress code catalog number
	 else if (Uproduct9=="DCMEGAPAC") Family="DCMEGAPAC"
	 else if (Uproduct7=="JAVELIN") Family="JAVELIN"
	 else if (Uproduct7=="SUPPORT") Family="SUPPORT"
	 else if (Uproduct4=="ROHS") Family="ROHS"
 	 else if (Uproduct7=="COM PAC") Family="COMPAC"
	 else if (Uproduct6=="COMPAC") Family="COMPAC"
	 else if (Uproduct8=="CONNECTS") Family="CONNECTS"
	 else if (Uproduct5=="CPACS") Family="CPACS"
	 else if (Uproduct4=="CMDS") Family="CMDS"
	 else if (Uproduct4=="SUPPORT") Family="SUPPORT"
	 else if (Uproduct4=="TECHSUPPORT") Family="TECHSUPPORT"
	 else if (Uproduct4=="CMDS") Family="CMDS"
	 else if (Uproduct7=="QUALITY") Family="QUALITY"
	 else if (Uproduct4=="COMP") Family="COMP"
	 else if (Uproduct6=="CUSTOM") Family="CUSTOM"
     else if (Uproduct10=="PFCFLATPAC") Family="PFCFLATPAC"
	 else if (Uproduct11=="PFCFRONTEND") Family="PFCFRONTEND"
	 else if (Uproduct7=="MCOMPAC") Family="MCOMPAC"
	 else if (Uproduct4=="MIAM") Family="MIAM"
  	 else if (Uproduct8=="MBRICKS1") Family="MBRICKS1"
	 else if (Uproduct8=="MBRICKS2") Family="MBRICKS2"
	 else if (Uproduct6=="MILCAT") Family="MILCAT"
	 else if (Uproduct8=="MVICHIPS") Family="MVICHIPS"
	 else if (Uproduct7=="BRICKS2") Family="BRICKS2"
	 else if (Uproduct10=="PRODSELECT") Family="PRODSELECT"
	 else if (Uproduct7=="BRICKS1") Family="BRICKS1"
	 else if (Uproduct4=="1GEN") Family="1GEN"
	 else if (Uproduct4=="2GEN") Family="2GEN"
	 else if (Uproduct10=="VIPACARRAY") Family="VIPACARRAY"
	 //else if (Uproduct5=="QPI-1") Family="QPI-1"
	// else if (Uproduct4=="QPI1") Family="QPI-1"
	// else if (Uproduct5=="QPI-2") Family="QPI-2"
	// else if (Uproduct4=="QPI2") Family="QPI-2"
	 else if (Uproduct5=="QPI-3") Family="QPI-3"
	 else if (Uproduct4=="QPI3") Family="QPI-3"
	 else if (Uproduct5=="QPI-4") Family="QPI-4"
	 else if (Uproduct4=="QPI4") Family="QPI-4"
	 else if (Uproduct5=="QPI-5") Family="QPI-5"
	 else if (Uproduct4=="QPI5") Family="QPI-5"
	 else if (Uproduct5=="QPI-6") Family="QPI-6"
	 else if (Uproduct4=="QPI6") Family="QPI-6"
	 else if (Uproduct5=="QPI-7") Family="QPI-7"
	 else if (Uproduct4=="QPI7") Family="QPI-7"
	 else if (Uproduct5=="QPI-8") Family="QPI-8"
	 else if (Uproduct4=="QPI8") Family="QPI-8"
 	 else if (Uproduct5=="QPI-9") Family="QPI-9"
	 else if (Uproduct4=="QPI9") Family="QPI-9"
 	 else if (Uproduct6=="QPI-10") Family="QPI-10"
	 else if (Uproduct5=="QPI10") Family="QPI-10"
 	 else if (Uproduct6=="QPI-11") Family="QPI-11"
	 else if (Uproduct5=="QPI11") Family="QPI-11"
 	 else if (Uproduct6=="QPI-12") Family="QPI-12"
	 else if (Uproduct5=="QPI12") Family="QPI-12"
	 else if (Uproduct3=="QPI") Family="QPI"
	 else if (Uproduct5=="QPO-1") Family="QPO-1"
	 else if (Uproduct4=="QPO1") Family="QPO-1"
	 else if (Uproduct5=="QPO-2") Family="QPO-2"
	 else if (Uproduct4=="QPO2") Family="QPO-2"
	 else if (Uproduct3=="QPO") Family="QPO"
	 else if (Uproduct4=="POLC") Family="POLC"
	 else if (Uproduct5=="M1GEN") Family="M1GEN"
	 else if (Uproduct7=="MCOMPAC") Family="MCOMPAC"
	 else if (Uproduct4=="MAIM") Family="MAIM"
	 else if (Uproduct5=="MMEGA") Family="MMEGA"
	 else if (Uproduct6=="MVIPAC") Family="MVIPAC"
	 else if (Uproduct5=="M2GEN") Family="M2GEN"
	 else if (Uproduct5=="MURAM") Family="MURAM"
	 else if (Uproduct4=="MLIT") Family="MLIT"
	 else if (Uproduct5=="INTFE") Family="INTFE"
	 else if (Uproduct6=="MINIEL") Family="MINIEL"
	 else if (Uproduct7=="MEGAPAC") Family="MEGAPAC"
	 else if (Uproduct7=="SOCKETS") Family="SOCKETS"
	 else if (Uproduct4=="COMP") Family="COMP"
	 else if (Uproduct4=="CAPS") Family="CAPS"
	 else if (Uproduct6=="CHOKES") Family="CHOKES"
	 else if (Uproduct9=="MOUNTING1") Family="MOUNTING1"
	 else if (Uproduct9=="MOUNTING2") Family="MOUNTING2"
	 else if (Uproduct3=="PFM") Family="PFM"
 	 else if (Uproduct6=="F3D480") Family="PFM"
	 else if (Uproduct19=="POWER FACTOR MODULE") Family="PFM"
 	 else if (Uproduct5=="MV036") Family="MPRMVTM"
	 else if (Uproduct6=="MP028F") Family="MPRMVTM"
	 else if (Uproduct5=="P048K") Family="PRM"
	 else if (Uproduct5=="P048F") Family="PRM"
 	 else if (Uproduct5=="P045F") Family="PRM"
	 else if (Uproduct5=="P024F") Family="PRM"
	 else if (Uproduct3=="PRM") Family="PRM"
	 else if (Uproduct6=="PRM-AL") Family="PRM"
	 else if (Uproduct20=="PRE REGULATOR MODULE") Family="PRM"
	 else if (Uproduct5=="B384F") Family="BCM"
	 else if (Uproduct5=="B352F") Family="BCM"
	 else if (Uproduct5=="B048K") Family="BCM"
	 else if (Uproduct5=="B048F") Family="BCM"
	 else if (Uproduct5=="B048L") Family="BCM"
	 else if (Uproduct5=="V048K") Family="VTM"
	 else if (Uproduct5=="V048F") Family="VTM"
	 else if (Uproduct5=="I048C") Family="IBC"
	 else if (Uproduct5=="D048C") Family="VICBRICK" 
	 else if (Uproduct10=="VIC-BRICK") Family="VICBRICK"
	 else if (Uproduct9=="VIC BRICK") Family="VICBRICK"
	 else if (Uproduct8=="VICBRICK") Family="VICBRICK"
 	 else if (Uproduct7=="F48P24A") Family="FPAEVAL"
	 else if (Uproduct16=="FACTORIZED POWER") Family="FPA"
	 else if (Uproduct3=="FPA") Family="FPA"
	 else if (Uproduct29=="FACTORIZED POWER ARCHITECTURE") Family="FPA"
	 else if (Uproduct5=="V040F") Family="VTM"
	 else if (Uproduct3=="VTM") Family="VTM"
	 else if (Uproduct29=="VOLTAGE TRANSFORMATION MODULE") Family="VTM"
	 else if (Uproduct5=="I048C") Family="IBC"
	 else if (Uproduct3=="IBC") Family="IBC"
	 else if (Uproduct26=="INTERMEDIATE BUS CONVERTER") Family="IBC"
	 else if (Uproduct3=="BCM") Family="BCM"
	 else if (Uproduct20=="BUS CONVERTER MODULE") Family="BCM"
 	 else if (Uproduct8=="VICBRICK") Family="VICBRICK"
	 else if (Uproduct6=="VICHIP") Family="VICHIP"
	 else if (Uproduct7=="VI CHIP") Family="VICHIP"
	 else if (Uproduct7=="V ICHIP") Family="VICHIP"
	 else if (Uproduct8=="STANDOFF") Family="STANDOFF"
	 else if (Uproduct9=="STANDOFFS") Family="STANDOFF"
	 else if (Uproduct9=="STAND OFF") Family="STANDOFF"
	 else if (Uproduct10=="STAND OFFS") Family="STANDOFF"
	 else if (Uproduct4=="AIMS") Family="AIMS"
	 else if (Uproduct3=="AIM") Family="AIMS"
     else if (Uproduct5=="VIAIM") Family="AIMS"
	 else if (Uproduct4=="ARMS") Family="ARMS"
	 else if (Uproduct3=="ARM") Family="ARMS"
     else if (Uproduct5=="VIARM") Family="ARMS"
	 else if (Uproduct6=="BATMOD") Family="BATMOD"
     else if (Uproduct5=="HAMS") Family="HAMS"
	 else if (Uproduct3=="HAM") Family="HAMS"
     else if (Uproduct5=="VIBAM") Family="HAMS"
     else if (Uproduct5=="VIHAM") Family="HAMS"
	 else if (Uproduct4=="IAMS") Family="IAMS"
	 else if (Uproduct5=="VIIAM" || Uproduct3=="VIA") Family="IAMS"
	 else if (Uproduct4=="RAMS") Family="RAMS"
	 else if (Uproduct3=="RAM") Family="RAMS"
     else if (Uproduct5=="VIRAM") Family="RAMS"
	 else if (Uproduct11=="VIPAC ARRAY") Family="VIPACARRAY"
	 else if (Uproduct5=="VIPAC") Family="VIPAC"
	 else if (Uproduct2=="VP") Family="VIPAC"
	 else if (Uproduct2=="VC") Family="VIPAC"
	 else if (Uproduct2=="VA") Family="VIPAC"
     else if (Uproduct5=="VI200") Family="VI200"
     else if (Uproduct3=="VI2") Family="VI200"
     else if (Uproduct3=="VIB") Family="VI200"
	 else if (Uproduct5=="VIJ00") Family="VIJ00"
     else if (Uproduct3=="VIJ") Family="VIJ00"
	 else if (Uproduct3=="JR") Family="VIJ00"
     else if (Uproduct6=="ENMODS") Family="ENMODS"
	 else if (Uproduct5=="ENMOD") Family="ENMODS"
	 else if (Uproduct9=="FLATPACEN") Family="FLATPAC-EN"
     else if (Uproduct10=="FLATPAC-EN") Family="FLATPAC-EN"
	 else if (Uproduct8=="FLAT PAC") Family="FLATPAC"
	 else if (Uproduct7=="FLATPAC") Family="FLATPAC"
     else if (Uproduct4=="VILU") Family="FLATPAC"
     else if (Uproduct4=="VIMU") Family="FLATPAC"
     else if (Uproduct4=="VINU") Family="FLATPAC"
     else if (Uproduct4=="VIPU") Family="FLATPAC"
     else if (Uproduct4=="VIQU") Family="FLATPAC"
     else if (Uproduct4=="VIRU") Family="FLATPAC"
     else if (Uproduct4=="VILF") Family="FLATPAC"
     else if (Uproduct4=="VIMF") Family="FLATPAC"
     else if (Uproduct4=="VINF") Family="FLATPAC"
     else if (Uproduct4=="VIPF") Family="FLATPAC"
     else if (Uproduct4=="VIQF") Family="FLATPAC"
     else if (Uproduct4=="VIRF") Family="FLATPAC"
     else if (Uproduct4=="VIMA") Family="FLATPAC"
     else if (Uproduct4=="VINA") Family="FLATPAC"
     else if (Uproduct4=="VIPA") Family="FLATPAC"
     else if (Uproduct4=="VIQA") Family="FLATPAC"
     else if (Uproduct4=="VIRA") Family="FLATPAC"
     else if (Uproduct4=="VILC") Family="COMPAC"
     else if (Uproduct4=="VIMC") Family="COMPAC"
     else if (Uproduct4=="VINC") Family="COMPAC"
     else if (Uproduct4=="VIPC") Family="COMPAC"
     else if (Uproduct4=="VIQC") Family="COMPAC"
     else if (Uproduct4=="VIRC") Family="COMPAC"
	 else if (Uproduct11=="URAM") Family="MICRORAM"
	 else if (Uproduct11=="U RAM") Family="MICRORAM"
	 else if (Uproduct8=="URAM2C21") Family="MICRORAM"
	 else if (Uproduct11=="MICRO RAM") Family="MICRORAM"
	 else if (Uproduct10=="MICRORAM") Family="MICRORAM"
	 else if (Uproduct11=="MEGA MODULE") Family="MEGAMOD"
	 else if (Uproduct10=="MEGAMODULE") Family="MEGAMOD"
	 else if (Uproduct8=="MEGA MOD") Family="MEGAMOD"
	 else if (Uproduct7=="MEGAMOD") Family="MEGAMOD"
	 else if (Uproduct4=="MEGA") Family="MEGAMOD"
     else if (Uproduct3=="VIL") Family="MEGAMOD"
     else if (Uproduct3=="VIM") Family="MEGAMOD"
     else if (Uproduct3=="VIN") Family="MEGAMOD"
     else if (Uproduct3=="VIP") Family="MEGAMOD"
     else if (Uproduct3=="VIQ") Family="MEGAMOD"
     else if (Uproduct3=="VIR") Family="MEGAMOD"
     else if (Uproduct4=="VILJ") Family="MEGAMOD"
     else if (Uproduct4=="VIPJ") Family="MEGAMOD"
     else if (Uproduct4=="VIRJ") Family="MEGAMOD"
     else if (Uproduct5=="MIAIM") Family="MIAIMS"
     else if (Uproduct5=="MIIAM" || Uproduct3=="MIA") Family="MIIAMS"
     else if (Uproduct5=="MIRAM") Family="MIRAMS"
	 else if (Uproduct5=="MI200") Family="MI200"
     else if (Uproduct3=="MI2") Family="MI200"
     else if (Uproduct3=="MIB") Family="MI200"
	 else if (Uproduct5=="MIJ00") Family="MIJ00"
     else if (Uproduct3=="MIJ") Family="MIJ00"
	 else if (Uproduct8=="MICOMPAC") Family="MICOMPAC"
     else if (Uproduct4=="MILC") Family="MICOMPAC"
     else if (Uproduct4=="MIMC") Family="MICOMPAC"
     else if (Uproduct4=="MINC") Family="MICOMPAC"
     else if (Uproduct4=="MIPC") Family="MICOMPAC"
     else if (Uproduct4=="MIQC") Family="MICOMPAC"
     else if (Uproduct4=="MIRC") Family="MICOMPAC"
	 else if (Uproduct9=="MIMEGAMOD") Family="MIMEGAMOD"
     else if (Uproduct3=="MIL") Family="MIMEGAMOD"
     else if (Uproduct3=="MIM") Family="MIMEGAMOD"
     else if (Uproduct3=="MIN") Family="MIMEGAMOD"
     else if (Uproduct3=="MIP") Family="MIMEGAMOD"
     else if (Uproduct3=="MIQ") Family="MIMEGAMOD"
     else if (Uproduct3=="MIR") Family="MIMEGAMOD"
     else if (Uproduct4=="MILJ") Family="MIMEGAMOD"
     else if (Uproduct4=="MIPJ") Family="MIMEGAMOD"
     else if (Uproduct4=="MIRJ") Family="MIMEGAMOD"
     else if (Uproduct6=="BADGER") Family="BADGER"
	 else if (Uproduct9=="POWERBANK") Family="POWERBANK"
	 else if (Uproduct10=="POWER BANK") Family="POWERBANK"
	 else if (Uproduct9=="RACKGUARD") Family="RACKGUARD"
	 else if (Uproduct10=="RACK GUARD") Family="RACKGUARD"
	 else if (Uproduct8=="PFC MINI") Family="LOPAC"
	 else if (Uproduct7=="PFCMINI") Family="LOPAC"
     else if (Uproduct2=="PM") Family="LOPAC"
	 else if (Uproduct5=="LOPAC") Family="LOPAC"
     else if (Uproduct8=="PFCMICRO") Family="LOPAC"
	 else if (Uproduct9=="PFCMICROS") Family="LOPAC"
	 else if (Uproduct9=="PFC MICRO") Family="LOPAC"
	 else if (Uproduct10=="PFC MICROS") Family="LOPAC"
	 else if (Uproduct6=="BUSMOD") Family="ACCESSORIES"
	 else if (Uproduct7=="BUSMODS") Family="ACCESSORIES"
     else if (Uproduct7=="BUS MOD") Family="ACCESSORIES"
	 else if (Uproduct8=="BUS MODS") Family="ACCESSORIES"
	 else if (Uproduct6=="FINMOD") Family="ACCESSORIES"
	 else if (Uproduct7=="FINMODS") Family="ACCESSORIES"
     else if (Uproduct7=="FIN MOD") Family="ACCESSORIES"
	 else if (Uproduct8=="FIN MODS") Family="ACCESSORIES"
	 else if (Uproduct7=="SLIMMOD") Family="ACCESSORIES"
	 else if (Uproduct8=="SLIMMODS") Family="ACCESSORIES"
	 else if (Uproduct8=="SLIM MOD") Family="ACCESSORIES"
	 else if (Uproduct9=="SLIM MODS") Family="ACCESSORIES"
	 else if (Uproduct8=="MEGA PAC") Family="MEGAPAC"
	 else if (Uproduct7=="MEGAPAC") Family="MEGAPAC"
     else if (Uproduct2=="MD") Family="MEGAPAC"
     else if (Uproduct2=="MP") Family="MEGAPAC"
     else if (Uproduct2=="MM") Family="MEGAPAC"
	 else if (Uproduct14=="2ND GENERATION") Family="2NDGEN"
	 else if (Uproduct13=="2NDGENERATION") Family="2NDGEN"
	 else if (Uproduct7=="2ND GEN") Family="2NDGEN"
	 else if (Uproduct6=="2NDGEN") Family="2NDGEN"
	 else if (Uproduct3=="V24") Family="2NDGEN"
     else if (Uproduct3=="V48") Family="2NDGEN"
     else if (Uproduct4=="V300") Family="2NDGEN"
     else if (Uproduct4=="V375") Family="2NDGEN"
     else if (Uproduct5=="IAM48") Family="IAM48"
	 else if (Uproduct4=="FM48") Family="FM48"
     else if (Uproduct2=="FM") Family="FM48"
     else if (Uproduct4=="FIAM") Family="FIAM"
     else if (Uproduct4=="FARM") Family="FARM"
     else if (Uproduct10=="POWERSTICK") Family="POWERSTICK"
	 else if (Uproduct11=="POWER STICK") Family="POWERSTICK"
	 else if (Uproduct5=="MFIAM") Family="MFIAM"
	 else if (Uproduct12=="CONVERTERPAC") Family="CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="J") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="D") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="R") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="B") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="L") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="U") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="F") Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="M" && Uproduct.indexOf("/") > -1 ) Family= "CONVERTERPAC"
     else if (Uproduct.substring(0,1)=="X") Family= "CONVERTERPAC"
	 else if (Uproduct8=="SURFMATE") Family="SURFMATE"
	 else if (Uproduct9=="SURF MATE") Family="SURFMATE"
	 else if (Uproduct8=="INMATE") Family="INMATE"
	 else if (Uproduct9=="IN MATE") Family="INMATE"
	 else if (Uproduct11=="ACCESSORIES") Family="ACCESSORIES"
	 else if (Uproduct3=="PAC") Family="ACCESSORIESPC"
     else if (Uproduct8=="PAC CHIP") Family="ACCESSORIESPC" 
	 else if (Uproduct10=="COMPONENTS") Family="ACCESSORIES"
     else if (Uproduct13=="INTERCONNECTS") Family="ACCESSORIES" 
	 else if (Uproduct12=="THERMAL MGMT") Family="ACCESSORIES" 
	 else if (Uproduct18=="THERMAL MANAGEMENT") Family="ACCESSORIES" 
	 else if (Uproduct16=="MOUNTING OPTIONS") Family="ACCESSORIESMO"
	 else if (Uproduct17=="PACKAGING OPTIONS") Family="ACCESSORIESOP"
	 else if (Uproduct3=="IAM") Family="IAMS"
	 else if (Uproduct.substring(0,1)=="0") Family="ACCESSORIES"
     else if (Uproduct.substring(0,1)=="1") Family="ACCESSORIES"
     else if (Uproduct.substring(0,1)=="2") Family="ACCESSORIES"
     else if (Uproduct.substring(0,1)=="3") Family="ACCESSORIES"
     else if (Uproduct.substring(0,2)=="88") Family="ACCESSORIES"
     else if (Uproduct.substring(0,3)=="HUB") Family="ACCESSORIES"
     else Family="INVALID";

  //    alert('Family = ' + Family);
        return Family;
}

function cleanString(StringVal)
// strips out all hyphens from the part number to allow easier parsing logic
{
   NewVal = " "

   for (var i = 0;i < StringVal.length; i++)
   {
     if (StringVal.substring(i,i+1) != "-") NewVal = NewVal + StringVal.substring(i,i+1);
   }

   NewVal= NewVal.substring(1,NewVal.length);
   return NewVal;
}

//-->





