<!--
//////////////////////////////////////////////////////////////////////////
//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
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

/*
HEADER SEARCH ...

Part Number Search
  Form name: vicor_search_p
  Element name: p
  onsubmit="FormValidate1();"
  Form submits no matter what. Will reload same page if there's no value.

Site Search
  Form name: vicor_search
  Element name: q
  onsubmit="FormValidate();"
  Form submits no matter what. Will reload same page if there's no value.


CATALOG EXPRESS CODE SEARCH (right sidebar)

  Form name: psearch2
  Element name: partnum2
  action="javascript:parsePart(document.psearch2,1);"
  Form submits only if there is a value.

*/

//--------FUNCTION-----------------------------------------
function FormValidate() {

    var googleform = document.vicor_search;

    if (googleform.q.value == "") 
    {
        alert ("Please enter a value in the search box");
        googleform.q.focus();
    }
    
    else 
    {
        googleform.method = "get";
        googleform.action = "http://207.141.187.10/search";
        googleform.submit();
    }

} //function

//--------FUNCTION-----------------------------------------
/* New Code by Pavitra for new Search Capabilities*/
function FormValidate1() {

    var googleform1 = document.vicor_search_p;

    if (googleform1.p.value == "" || googleform1.p.value == "Search...") 
    {
        alert ("Please enter a value in the search box");
        googleform1.p.focus();
    }
    else 
    {
        googleform1.method = "get";
        //googleform1.action = "javascript:parsePart(document.vicor_search_p,1);";
        googleform1.action = "javascript:parsePart(document.vicor_search_p.p);";
        googleform1.submit();
    }

} //function


//--------FUNCTION-----------------------------------------
//CALLED DIRECTLY BY CATALOG EXPRESS CODE SEARCH ON HOME PAGE AND 
//FormValidate1() ABOVE, WHICH IS CALLED BY HEADER PART NUMBER SEARCH

//function parsePart(form,formid){    
function parsePart(formElement){    

if (formElement.value == "" || formElement.value == "Express Code:") {
    alert ("Please enter a value in the search box");
    formElement.value = "";
    formElement.focus();
}
else {

  var partnumber = "";

  //if (form.p.value != "") partnumber = getFamily(form.p.value);
  //if (form.elements[formid].value != "") partnumber = getFamily(form.elements[formid].value);
  if (formElement.value != "") partnumber = getFamily(formElement.value);

  //alert(partnumber);

  //webexpress code catalog search

  if (partnumber=="ABCD") alert ('Please enter a Web Express Code here.\n');
  else if (partnumber=="VIBRICK") window.location="http://www.vicorpower.com/products/vibrick/?expresscode=vibrick";
  else if (partnumber=="SUPPORT1") window.location="http://www.vicorpower.com/support/?expresscode=support1";
  else if (partnumber=="SUPPORT")window.location="http://www.vicorpower.com/support/sales/?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=="CPACS1") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=cpacs1";
  else if (partnumber=="CPACS2") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=cpacs2";
  else if (partnumber=="CPACS") window.location="http://www.vicorpower.com/products/configurable/converterpac/?expresscode=cpacs";
  else if (partnumber=="CMDS") window.location="http://vdac.vicorpower.com/vdac/";
  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=="QUAL") window.location="http://www.vicorquality.com/?expresscode=qual";
  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/company/via/?expresscode=custom";
  else if (partnumber=="PFCFLATPAC") window.location="http://www.vicorpower.com/products/configurable/pfcflatpac/?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=="PRM") window.location="http://www.vicorpower.com/products/vichip/?expresscode=prm";
  else if (partnumber=="PRMCC") window.location="http://www.vicorpower.com/products/vichip/evalboards/prm_cc/?expresscode=prmcc";


  else if (partnumber=="PWRB") window.location="http://www.vicorpower.com/technical_library/powerbench/?expresscode=pwrb";
  else if (partnumber=="DCMEGAPAC") window.location="http://www.vicorpower.com/products/configurable/megapac/?expresscode=dcmegapac";
  else if (partnumber=="JAVELIN") window.location="http://www.vicorpower.com/products/military/javelin/?expresscode=javelin";
  else if (partnumber=="VME450") window.location="http://www.vicorpower.com/products/military/vme/?expresscode=vme450";
  else if (partnumber=="VIBPRM") window.location="http://www.vicorpower.com/products/vibrick/prm_vtm/?expresscode=vibprm";
  else if (partnumber=="VIBVTM") window.location="http://www.vicorpower.com/products/vibrick/prm_vtm/?expresscode=vibvtm";
  else if (partnumber=="VIBBCM") window.location="http://www.vicorpower.com/products/vibrick/bcm/?expresscode=vibbcm";
  else if (partnumber=="VIBDCDC") window.location="http://www.vicorpower.com/products/vibrick/dc-dc/?expresscode=vibdcdc";
  else if (partnumber=="MVIB") window.location="http://www.vicorpower.com/products/military/prm_vtm/?expresscode=mvib";
  else if (partnumber=="VIBEB") window.location="http://www.vicorpower.com/products/accessories/eval_boards/?expresscode=vibeb";
  else if (partnumber=="MMMEB") window.location="http://www.vicorpower.com/products/accessories/eval_boards/?expresscode=mmmeb";
  else if (partnumber=="QPIEB") window.location="http://www.vicorpower.com/picorpower/data_sheets/#eval_boards/?expresscode=qpieb";
  else if (partnumber=="QPOEB") window.location="http://www.vicorpower.com/picorpower/data_sheets/#eval_boards/?expresscode=qpoeb";
  else if (partnumber=="BCMEB") window.location="http://www.vicorpower.com/products/vichip/bcm/evaluation_board/?expresscode=bcmeb";
  else if (partnumber=="VICEB") window.location="http://www.vicorpower.com/products/vichip/evalboards/prm_vtm/?expresscode=viceb";
  else if (partnumber=="BCMSB") window.location="http://www.vicorpower.com/products/vichip/bcm/series_array/?expresscode=bcmsb";
  else if (partnumber=="BCMPB") window.location="http://www.vicorpower.com/products/vichip/bcm/parallel_array/?expresscode=bcmpb";
  else if (partnumber=="ORING") window.location="http://www.vicorpower.com/picorpower/products/power_path/?expresscode=oring";
  else if (partnumber=="ORING2") window.location="http://www.vicorpower.com/picorpower/products/power_path/?expresscode=oring2";
  else if (partnumber=="COREB") window.location="http://www.vicorpower.com/picorpower/products/power_path/?expresscode=coreb";
  else if (partnumber=="BCMVB") window.location="http://www.vicorpower.com/documents/bcm_validation/validation_board_site.pdf?expresscode=bcmvb";
  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") window.location="http://www.picorpower.com/products/output_filters/?expresscode=qpo";
  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=="QPI") window.location="http://www.picorpower.com/products/input_filters/?expresscode=qpi";
  else if (partnumber.match(/^QPI+/)) window.location=("http://www.picorpower.com/products/input_filters/"+partnumber.toLowerCase()+"/");
  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=="MOUNTING") window.location="http://www.vicorpower.com/products/accessories/?expresscode=mounting";
  else if (partnumber=="STANDOFF") window.location="http://www.vicorpower.com/technical_library/mechanical_drawings/standoffs/?expresscode=standoff";
  else if (partnumber=="MVIPACARRAY") window.location="http://www.vicorpower.com/products/military/vipacarray/?expresscode=mvipacarray";
  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=="VI260CV") window.location="http://vicor.icentrix.com/search/?part_number=VI-260-CV";
  //else if (partnumber=="V24A24C100BL") window.location="http://vicor.icentrix.com/search/?part_number=V24A24C100BL";
  else if (partnumber=="MFIAM") window.location="http://www.vicorpower.com/products/military/mfiam/?expresscode=mfiam";
  else {
      partnumber == "INVALID";
      window.location="http://www.vicorpower.com/products/partnumber/?partnumber=invalid";
  }
 
} //else form element not empty

} //function

//--------FUNCTION-----------------------------------------
function getFamily(product) {

    //Parses a part number pattern into a generic part number type or family
    
    //THE SIGNIFICANCE OF Uproduct[num] IS THAT IF IT FINDS A MATCH 
    //IN THE SHORTER PARTIAL MATCH, PROCESSING WILL STOP THERE, E.G., 
    //(Uproduct5=="PRMCC") MUST BE LOCATED AHEAD OF (Uproduct3=="PRM")
    //BECAUSE IT SATISFIES BOTH TESTS.

    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

    // Changes for icentrix code to work...
    //else if (NewProduct =="VI-260-CV" || product =="VI-260-CV") Family="VI260CV"
    //else if (NewProduct =="V24A24C100BL") Family="V24A24C100BL"
    // Ends here... 

    /*
    else if (NewProduct.indexOf('VE-')!="-1") Family="VI200"
    else if (Uproduct4=="VE J") Family="VI200"
    else if (Uproduct3=="JR") Family="VI200"
    else if (Uproduct6=="VE J00") Family="VIJ00"
    else if (Uproduct4=="VE 2") Family="VI200"
    else if (Uproduct3=="VEB") Family="VI200"
    else if (Uproduct5=="VE200") Family="VI200"
    else if (Uproduct.substring(0,2)=="VE") Family="VI200"
    else if (Uproduct.substring(0,2)=="VE" && Uproduct.indexOf("-") > -1 ) Family="VI200"
    else if (Uproduct.substring(0,3)=="VE-") Family="VI200"
    else if (Uproduct.substring(0,4)=="VE-J") Family="VIJ00"
    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 (Uproduct.match(/^V[IE][2JB]+/)) Family="VI200"
    else if (Uproduct9=="DCMEGAPAC") Family="DCMEGAPAC"
    else if (Uproduct10=="DC MEGAPAC") Family="DCMEGAPAC"
    else if (Uproduct11=="DC MEGA PAC") Family="DCMEGAPAC"
    else if (Uproduct7=="JAVELIN") Family="JAVELIN"
    else if (Uproduct4=="ABCD") Family="ABCD"
    else if (Uproduct8=="SUPPORT1") Family="SUPPORT1"
    else if (Uproduct9=="SUPPORT-1") Family="SUPPORT1"
    else if (Uproduct9=="SUPPORT 1") Family="SUPPORT1"
    else if (Uproduct4=="ROHS") Family="ROHS"
    else if (Uproduct7=="COM PAC") Family="COMPAC"
    else if (Uproduct6=="COMPAC") Family="COMPAC"
    else if (Uproduct7=="CONNECT") Family="CONNECTS"
    else if (Uproduct8=="CONNECTS") Family="CONNECTS"
    else if (Uproduct9=="MVIPACARY") Family="MVIPACARRAY"
    else if (Uproduct11=="MVIPACARRAY") Family="MVIPACARRAY"
    else if (Uproduct6=="CPACS1") Family="CPACS1"
    else if (Uproduct7=="CPACS 1") Family="CPACS1"
    else if (Uproduct7=="CPACS-1") Family="CPACS1"
    else if (Uproduct6=="CPACS2") Family="CPACS2"
    else if (Uproduct7=="CPACS 2") Family="CPACS2"
    else if (Uproduct7=="CPACS-2") Family="CPACS2"
    else if (Uproduct4=="CMDS") Family="CMDS"
    else if (Uproduct4=="TECHSUPPORT") Family="TECHSUPPORT"
    else if (Uproduct4=="CMDS") Family="CMDS"
    else if (Uproduct7=="QUALITY") Family="QUAL"
    else if (Uproduct4=="COMP") Family="COMP"
    else if (Uproduct6=="CUSTOM") Family="CUSTOM"
    else if (Uproduct10=="PFCFLATPAC") Family="PFCFLATPAC"
    else if (Uproduct11=="PFC FLATPAC") Family="PFCFLATPAC"
    else if (Uproduct11=="PFCFRONTEND") Family="PFCFRONTEND"
    else if (Uproduct12=="PFC FRONTEND") Family="PFCFRONTEND"
    else if (Uproduct7=="MCOMPAC") Family="MCOMPAC"
    else if (Uproduct4=="MIAM") Family="MIAM"
    else if (Uproduct4=="QUAL") Family="QUAL"
    else if (Uproduct8=="MBRICKS1") Family="MBRICKS1"
    else if (Uproduct9=="MBRICKS 1") Family="MBRICKS1"
    else if (Uproduct8=="MBRICKS2") Family="MBRICKS2"
    else if (Uproduct9=="MBRICKS 2") Family="MBRICKS2"
    else if (Uproduct6=="MILCAT") Family="MILCAT"
    else if (Uproduct8=="MVICHIPS") Family="MVICHIPS"
    else if (Uproduct7=="BRICKS2") Family="BRICKS2"
    else if (Uproduct8=="BRICKS 2") Family="BRICKS2"
    else if (Uproduct10=="PRODSELECT") Family="PRODSELECT"
    else if (Uproduct7=="BRICKS1") Family="BRICKS1"
    else if (Uproduct8=="BRICKS 1") Family="BRICKS1"
    else if (Uproduct4=="1GEN") Family="1GEN"
    else if (Uproduct5=="1 GEN") Family="1GEN"
    else if (Uproduct4=="2GEN") Family="2GEN"
    else if (Uproduct5=="2 GEN") Family="2GEN"
    else if (Uproduct10=="VIPACARRAY") Family="VIPACARRAY"
    else if (Uproduct11=="VIPAC ARRAY") Family="VIPACARRAY"

    //Commented out on 12/18/08 by Pavitra to refine search functionality.
    /*
    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 (Uproduct3=="QPI") Family="QPI"
    else if (Uproduct.match(/^QPI[\d]+/)) {
       str1=Uproduct.split(/\d+/);
       str2=Uproduct.split(/QPI+/);
       Family=(str1+"-"+str2);
    }
    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 (Uproduct10=="MOUNTING 1") Family="MOUNTING1"
    else if (Uproduct9=="MOUNTING2") Family="MOUNTING2"
    else if (Uproduct10=="MOUNTING 2") Family="MOUNTING2"
    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"

    //THIS MUST BE LOCATED AHEAD OF (Uproduct3=="PRM") OR IT WILL STOP THERE
    else if (Uproduct5=="PRMCC") Family="PRMCC"

    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 (Uproduct6=="VIBPRM") Family="VIBPRM"
    else if (Uproduct11=="VIBRICK PRM") Family="VIBPRM"
    else if (Uproduct12=="VI BRICK PRM") Family="VIBPRM"
    else if (Uproduct12=="VI-BRICK-PRM") Family="VIBPRM"
    else if (Uproduct6=="VIBVTM") Family="VIBVTM"
    else if (Uproduct11=="VIBRICK VTM") Family="VIBVTM"
    else if (Uproduct12=="VI BRICK VTM") Family="VIBVTM"
    else if (Uproduct12=="VI-BRICK-VTM") Family="VIBVTM"
    else if (Uproduct6=="VIBBCM") Family="VIBBCM"
    else if (Uproduct11=="VIBRICK BCM") Family="VIBBCM"
    else if (Uproduct12=="VI BRICK BCM") Family="VIBBCM"
    else if (Uproduct12=="VI-BRICK-BCM") Family="VIBBCM"
    else if (Uproduct7=="VIBDCDC") Family="VIBDCDC"
    else if (Uproduct13=="VIBRICK DC-DC") Family="VIBDCDC"
    else if (Uproduct14=="VI BRICK DC DC") Family="VIBDCDC"
    else if (Uproduct14=="VI-BRICK-DC-DC") Family="VIBDCDC"
    else if (Uproduct4=="MVIB") Family="MVIB"
    else if (Uproduct16=="MILITARY VIBRICK") Family="MVIB"
    else if (Uproduct24=="MILITARY VIBRICK PRM VTM") Family="MVIB"
    else if (Uproduct24=="MILITARY VIBRICK PRM-VTM") Family="MVIB"
    else if (Uproduct3=="VME") Family="VME450"
    else if (Uproduct6=="VME450") Family="VME450"
    else if (Uproduct7=="VME 450") Family="VME450"
    else if (Uproduct4=="PWRB") Family="PWRB"
    else if (Uproduct10=="POWERBENCH") Family="PWRB"
    else if (Uproduct11=="POWER BENCH") Family="PWRB"
    else if (Uproduct5=="ORING") Family="ORING"
    else if (Uproduct6=="ORING2") Family="ORING2"
    else if (Uproduct7=="ORING 2") Family="ORING2"
    else if (Uproduct5=="QPIEB") Family="QPIEB"
    else if (Uproduct15=="QPI EVAL BOARDS") Family="QPIEB"
    else if (Uproduct5=="QPOEB") Family="QPOEB"
    else if (Uproduct15=="QPO EVAL BOARDS") Family="QPOEB"
    else if (Uproduct5=="BCMEB") Family="BCMEB"
    else if (Uproduct15=="BCM EVAL BOARDS") Family="BCMEB"
    else if (Uproduct5=="BCMVB") Family="BCMVB"
    else if (Uproduct21=="BCM VALIDATION BOARDS") Family="BCMVB"
    else if (Uproduct5=="VICEB") Family="VICEB"
    else if (Uproduct19=="PRM VTM EVAL BOARDS") Family="VICEB"
    else if (Uproduct5=="BCMSB") Family="BCMSB"
    else if (Uproduct22=="BCM SERIES EVAL BOARDS") Family="BCMSB"
    else if (Uproduct5=="BCMPB") Family="BCMPB"
    else if (Uproduct24=="BCM PARALLEL EVAL BOARDS") Family="BCMPB"
    else if (Uproduct5=="COREB") Family="COREB"
    else if (Uproduct27=="COOL ORING EVALUATION BOARD") Family="COREB"
    else if (Uproduct27=="COOL-ORING EVALUATION-BOARD") Family="COREB"
    else if (Uproduct22=="ORING EVALUATION-BOARD") Family="COREB"
    else if (Uproduct16=="ORING EVAL BOARD") Family="COREB"
    else if (Uproduct5=="VIBEB") Family="VIBEB"
    else if (Uproduct20=="VI BRICK EVAL BOARDS") Family="VIBEB"
    else if (Uproduct19=="VIBRICK EVAL BOARDS") Family="VIBEB"
    else if (Uproduct5=="MMMEB") Family="MMMEB"
    else if (Uproduct15=="MMM EVAL BOARDS") Family="MMMEB"
    else if (Uproduct11=="EVAL BOARDS") Family="MMMEB"
    else if (Uproduct11=="EVAL-BOARDS") Family="MMMEB"
    else if (Uproduct8=="MOUNTING") Family="MOUNTING"
    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 (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 (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 (Uproduct.match(/^VI[789]+/) || Uproduct.match(/^V[0-9]{2,3}[ABC]+/) || Uproduct.match(/^2ND+/)) 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 (Uproduct7=="SUPPORT") Family="SUPPORT"
    else if (Uproduct5=="CPACS") Family="CPACS"
    else if (Uproduct5=="MFIAM") Family="MFIAM"
    else if (Uproduct7=="VIBRICK") Family="VIBRICK"
    else if (Uproduct8=="VI BRICK") Family="VIBRICK"
    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

//--------FUNCTION-----------------------------------------
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;

} //function

//-->