// Utility scipts for the support center
// Changelog
// mharen - 3/6/09 - removed absolute links for product pages in the data section
// mharen - 3/6/09 - added cheesy browser detection script to block chanined selects from setting cookies which were cratering safari 3.2.1 over Akamai. Bad browser. No soup for you.
// breece - 3/9/09 - added SRX 3400/3600
// breece - 04/20/09 - added EX2500.  Mmmm, soup.
// breece - 5/28/09 - added SRX210
// breece - 6/10/09 - added WXC 1800


// Browser Detection Javascript
// copyright 1 February 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

function whichBrs() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}

var _disable_empty_list=false;
var _hide_empty_list=false;

// ------


// JavaScript Document
// Chained Selects

// Copyright Xin Yang 2004
// Web Site: www.yxScripts.com
// EMail: m_yangxin@hotmail.com
// Last Updated: Feb.09, 2006
// 030909 - mh updated to disable cookie setting in safari.

// This script is free as long as the copyright notice remains intact.

function OpenTipsWindow(querystring)
{
	LeftPosition = (screen.width) ? (screen.width)/10 : 0;
	TopPosition = (screen.height) ? (screen.height)/10 : 0;
	settings = 'menubar=no,height=424,width=600,resizable=no,scrollbars=yes'
	hWin = window.open(querystring, "Tips", settings, true);
	hWin.focus();
	if (hWin.opener == null) hWin.opener = self;
}


///// DynamicDrive.com added function/////////////

var onclickaction="goto"

function goListGroup(){
for (i=arguments.length-1;i>=0; i--){
if (arguments[i].selectedIndex!=-1){
var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
if (selectedOptionvalue!=""){
if (onclickaction=="alert")
alert(selectedOptionvalue)
else if (newwindow==1)
window.open(selectedOptionvalue)
else
//document.getElementById("_top").src=selectedOptionvalue
window.top.location=selectedOptionvalue
break
}
}
}
}

///// END DynamicDrive.com added function//////


if (typeof(disable_empty_list)=="undefined") { disable_empty_list=_disable_empty_list; }
if (typeof(hide_empty_list)=="undefined") { hide_empty_list=_hide_empty_list; }

var cs_goodContent=true, cs_M="M", cs_L="L", cs_G="G", cs_EG="EG", cs_curTop=null, cs_curSub=null;
var cs_supportDOM=document.createElement;
var cs_nav=navigator.userAgent.toLowerCase();
var cs_isIE7=(cs_nav.indexOf("msie 7")!=-1);
var cs_isOpera=(cs_nav.indexOf("opera")!=-1);
var cs_isMac=(cs_nav.indexOf("mac")!=-1);

function cs_findOBJ(obj,n) {
  for (var i=0; i<obj.length; i++) {
    if (obj[i].name==n) { return obj[i]; }
  }
  return null;
}
function cs_findContent(n) { return cs_findOBJ(cs_content,n); }
function cs_findSubContent(n) { return cs_findOBJ(cs_subContent,n); }

function cs_findM(m,n) {
  if (m.name==n) { return m; }

  var sm=null;
  for (var i=0; i<m.items.length; i++) {
    if (m.items[i].type==cs_M) {
      sm=cs_findM(m.items[i],n);
      if (sm!=null) { break; }
    }
  }
  return sm;
}
function cs_findMenu(n) { return (cs_curSub!=null && cs_curSub.name==n)?cs_curSub:cs_findM(cs_curTop,n); }

function cs_subContentOBJ(n,list) {
  this.name=n;
  this.list=list;

  this.ifm=document.createElement("IFRAME");
  with (this.ifm.style) {
    position="absolute"; left="-200px"; top="-200px"; visibility="hidden"; width="100px"; height="100px";
  }
  document.body.appendChild(this.ifm);
  this.ifm.src=n;
}; cs_subContent=new Array();

function cs_contentOBJ(n,obj){
  this.name=n;
  this.menu=obj;
  this.lists=new Array();
  this.cookie="";
  this.callback=null;
  this.count=1;
}; cs_content=new Array();

function cs_topmenuOBJ(tm) {
  this.name=tm;
  this.type=cs_M;
  this.items=new Array();
  this.df=",";
  this.oidx=0;

  this.addM=cs_addM; this.addL=cs_addL; this.addG=cs_addG, this.endG=cs_endG;
}
function cs_submenuOBJ(dis,link,sub,label,css) {
  this.name=sub;
  this.type=cs_M;
  this.dis=dis;
  this.link=link;
  this.label=label;
  this.css=css;
  this.df=",";
  this.oidx=0;

  var x=cs_findMenu(sub);
  this.items=x==null?new Array():x.items;

  this.addM=cs_addM; this.addL=cs_addL; this.addG=cs_addG, this.endG=cs_endG;
}
function cs_linkOBJ(dis,link,label,css) {
  this.type=cs_L;
  this.dis=dis;
  this.link=link;
  this.label=label;
  this.css=css;
}
function cs_groupOBJ(label,css) {
  this.type=cs_G;
  this.dis="";
  this.link="";
  this.label=label;
  this.css=css;
}
function cs_groupOBJ2() {
  this.type=cs_EG;
  this.dis="";
  this.link="";
  this.label="";
}

function cs_addM(dis,link,sub,label,css) { this.items[this.items.length]=new cs_submenuOBJ(dis,link,sub,label,css); }
function cs_addL(dis,link,label,css) { this.items[this.items.length]=new cs_linkOBJ(dis,link,label,css); }
function cs_addG(label,css) { this.items[this.items.length]=new cs_groupOBJ(label,css); }
function cs_endG() { this.items[this.items.length]=new cs_groupOBJ2(); }

function cs_showMsg(msg) { window.status=msg; }
function cs_badContent(n) { cs_goodContent=false; cs_showMsg("["+n+"] Not Found."); }

function _setCookie(name, value) {
  document.cookie=name+"="+value;
}

// function disabled for Safari to prevent cookie issue See JNP-1254 for details - mharen 3/6
function cs_setCookie(name, value) {
	if ((whichBrs()) != "Safari") {
	setTimeout("_setCookie('"+name+"','"+value+"')",0);
	}
}

function cs_getCookie(name) {
  var cookieRE=new RegExp(name+"=([^;]+)");
  if (document.cookie.search(cookieRE)!=-1) {
    return RegExp.$1;
  }
  else {
    return "";
  }
}

function cs_optionOBJ(type,text,value,label,css) { this.type=type; this.text=text; this.value=value; this.label=label; this.css=css; }
function cs_getOptions(menu,list) {
  var opt=new Array();
  for (var i=0; i<menu.items.length; i++) {
    opt[i]=new cs_optionOBJ(menu.items[i].type, menu.items[i].dis, menu.items[i].link, menu.items[i].label, menu.items[i].css);
  }
  if (opt.length==0 && menu.name!="") {
    cs_getSubList(menu.name,list);
  }
  return opt;
}
function cs_emptyList(list) {
  if (cs_supportDOM && !cs_isMac && !cs_isIE7) {
    while (list.lastChild) {
      list.removeChild(list.lastChild);
    }
  }
  else {
    for (var i=list.options.length-1; i>=0; i--) {
      list.options[i]=null;
    }
  }
}
function cs_refreshList(list,opt,df,key) {
  var l=list.options.length;
  var optGroup=null, newOpt=null, optCount=0, optPool=list;

  if (cs_isMac) {
    var l=list.options.length;
    var iCount=0;

    for (var i=0; i<opt.length; i++) {
      if (opt[i].type!=cs_G && opt[i].type!=cs_EG) {
        iCount=l+optCount;

        list.options[iCount]=new Option(opt[i].text, opt[i].value, df.indexOf(","+optCount+",")!=-1, df.indexOf(","+optCount+",")!=-1);
        list.options[iCount].oidx=optCount;
        list.options[iCount].idx=i;
        list.options[iCount].key=key;

        if (opt[i].label!="") {
          list.options[iCount].label=opt[i].label;
        }
        if (opt[i].css!="") {
          list.options[iCount].className=opt[i].css;
        }

        optCount++;
      }
    }

    return;
  }

  for (var i=0; i<opt.length; i++) {
    if (opt[i].type==cs_G) {
      optGroup=document.createElement("optgroup");
      optGroup.setAttribute("label", opt[i].label);
	  
      if (opt[i].css!="") {
        optGroup.setAttribute("className", opt[i].css);
      }
	  
      list.appendChild(optGroup);
      optPool=optGroup;
    }
    else if (opt[i].type==cs_EG) {
      optGroup=null;
      optPool=list;
    }
    else {
      newOpt=new Option(opt[i].text,opt[i].value);
      if (cs_supportDOM && !cs_isIE7) {
        optPool.appendChild(newOpt);
      }
      else {
        list.options[l+optCount]=newOpt;
      }

      newOpt.oidx=optCount;
      newOpt.idx=i;
      newOpt.key=key;

      // a workaround for IE, but will screw up with Opera
      if (!cs_isOpera) {
        newOpt.text=opt[i].text;
        newOpt.value=opt[i].value;
      }

      if (df.indexOf(","+optCount+",")!=-1) {
        newOpt.selected=true;
      }
      if (opt[i].label!="") {
        newOpt.label=opt[i].label;
      }
      if (opt[i].css!="") {
        newOpt.className=opt[i].css;
      }
      newOpt.setAttribute("title", opt[i].text);
      optCount++;
    }
  }
}

function cs_getList(content,key) {
  var menu=content.menu;

  if (key!="[]") {
    var paths=key.substring(1,key.length-1).split(",");
    for (var i=0; i<paths.length; i++) {
      menu=menu.items[parseInt(paths[i],10)];
    }
  }

  return menu;
}
function cs_getKey(key,idx) {
  return "["+(key=="[]"?"":(key.substring(1,key.length-1)+","))+idx+"]";
}
function cs_getSelected(mode,name,idx,key,df) {
  if (mode) {
    var cookies=cs_getCookie(name+"_"+idx);
    if (cookies!="") {
      var mc=cookies.split("-");
      for (var i=0; i<mc.length; i++) {
        if (mc[i].indexOf(key)!=-1) {
          df=mc[i].substring(key.length);
          break;
        }
      }
    }
  }
  return df;
}

function cs_updateListGroup(content,idx,mode) {
  var menu=null, list=content.lists[idx], options=list.options, has_sublist=false;
  var key="", option=",", cookies="";

  //if (list.selectedIndex<0) {
  //  list.selectedIndex=0;
  //}

  for (var i=0; i<options.length; i++) {
    if (options[i].selected) {
      if (key!=options[i].key) {
        cookies+=key==""?"":((cookies==""?"":"-")+key+option);

        key=options[i].key;
        option=",";
        menu=cs_getList(content,key);
      }

      option+=options[i].oidx+",";

      if (idx+1<content.lists.length) {
        if (menu.items[options[i].idx].type==cs_M) {
          if (!has_sublist) {
            has_sublist=true;
            cs_emptyList(content.lists[idx+1]);
          }
          var subkey=cs_getKey(key,options[i].idx), df=cs_getSelected(mode,content.cookie,idx+1,subkey,menu.items[options[i].idx].df);
          cs_refreshList(content.lists[idx+1],cs_getOptions(menu.items[options[i].idx],list),df,subkey);
        }
      }
    }
  }

  if (key!="") {
    cookies+=(cookies==""?"":"-")+key+option;
  }

  if (content.cookie) {
    cs_setCookie(content.cookie+"_"+idx,cookies);
  }

  if (has_sublist && idx+1<content.lists.length) {
    if (disable_empty_list) {
      content.lists[idx+1].disabled=false;
    }
    if (hide_empty_list) {
      content.lists[idx+1].style.display="";
    }
    cs_updateListGroup(content,idx+1,mode);
  }
  else {
    for (var s=idx+1; s<content.lists.length; s++) {
      cs_emptyList(content.lists[s]);

      if (disable_empty_list) {
        content.lists[s].disabled=true;
      }
      if (hide_empty_list) {
        content.lists[s].style.display="none";
      }

      if (content.cookie) {
        cs_setCookie(content.cookie+"_"+s,"");
      }
    }
  }
}

function cs_initListGroup(content,mode) {
  var key="[]", df=cs_getSelected(mode,content.cookie,0,key,content.menu.df);

  cs_emptyList(content.lists[0]);
  cs_refreshList(content.lists[0],cs_getOptions(content.menu,content.lists[0]),df,key);
  cs_updateListGroup(content,0,mode);
}

function cs_updateList() {
  var content=this.content;
  for (var i=0; i<content.lists.length; i++) {
    if (content.lists[i]==this) {
      cs_updateListGroup(content,i,content.cookie);

      if (content.callback) {
        var opt="";
        for (var j=0; j<this.options.length; j++) {
          if (this.options[j].selected) {
            if (opt!="") {
              opt+=",";
            }
            if (this.options[j].value!="") {
              opt+=this.options[j].value;
            }
            else if (this.options[j].text!="") {
              opt+=this.options[j].text;
            }
            else if (this.options[j].label!="") {
              opt+=this.options[j].label;
            }
          }
        }
        content.callback(this,i+1,content.count,opt);
      }

      if (this.handler) {
        this.handler();
      }

      break;
    }
  }
}

function cs_getSubList(n,list) {
  if (cs_goodContent && cs_supportDOM) {
    var cs_subList=cs_findSubContent(n);
    if (cs_subList==null) {
      cs_subContent[cs_subContent.length]=new cs_subContentOBJ(n,list);
    }
  }
}

function cs_updateSubList(cn,sn) {
  var cc=cs_findContent(cn), sc=cs_findContent(sn);
  if (cc!=null && sc!=null) {
    var cs_sub=cs_findM(cc.menu,sn);
    if (cs_sub!=null) {
      cs_sub.df=sc.menu.df;
      cs_sub.oidx=sc.menu.oidx;
      cs_sub.items=sc.menu.items;
    }
  }

  var cs_subList=cs_findSubContent(sn);
  if (cs_subList!=null) {
    cs_subList.list.onchange();

    cs_subList.ifm.src="javascript:false;";
    document.body.removeChild(cs_subList.ifm);
    cs_subList.ifm=null;
  }
}

// ------
function addListGroup(n,tm) {
  if (cs_goodContent) {
    cs_curTop=new cs_topmenuOBJ(tm); cs_curSub=null;

    var c=cs_findContent(n);
    if (c==null) {
      cs_content[cs_content.length]=new cs_contentOBJ(n,cs_curTop);
    }
    else {
      delete(c.menu); c.menu=cs_curTop;
    }
  }
}

function addList(n,dis,link,sub,df,label,css) {
  if (typeof(sub)=="undefined" || sub=="") {
    addOption(n,dis,link||"",df||"",label||"",css||"");
  }
  else if (cs_goodContent) {
    cs_curSub=cs_findMenu(n);

    if (cs_curSub!=null) {
      cs_curSub.addM(dis,link||"",sub||"",label||"",css||"");
      if (typeof(df)!="undefined" && df) {
        cs_curSub.df+=cs_curSub.oidx+",";
      }
      cs_curSub.oidx++;
    }
    else {
      cs_badContent(n);
    }
  }
}

function addOption(n,dis,link,df,label,css) {
  if (cs_goodContent) {
    cs_curSub=cs_findMenu(n);

    if (cs_curSub!=null) {
      cs_curSub.addL(dis,link||"",label||"",css||"");
      if (typeof(df)!="undefined" && df) {
        cs_curSub.df+=cs_curSub.oidx+",";
      }
      cs_curSub.oidx++;
    }
    else {
      cs_badContent(n);
    }
  }
}

function addOptGroup(n,label,css) {
  if (cs_goodContent && cs_supportDOM && !cs_isOpera) {
    cs_curSub=cs_findMenu(n);

    if (cs_curSub!=null) {
      cs_curSub.addG(label,css||"");
    }
    else {
      cs_badContent(n);
    }
  }
}

function endOptGroup(n) {
  if (cs_goodContent && cs_supportDOM && !cs_isOpera) {
    cs_curSub=cs_findMenu(n);

    if (cs_curSub!=null) {
      cs_curSub.endG();
    }
    else {
      cs_badContent(n);
    }
  }
}

function initListGroup(n) {
  var _content=cs_findContent(n), count=0;
  if (_content!=null) {
    var content=new cs_contentOBJ("cs_"+_content.count+"_"+n,_content.menu);
    content.count=_content.count++;
    cs_content[cs_content.length]=content;

    for (var i=1; i<initListGroup.arguments.length; i++) {
      if (typeof(arguments[i])=="object" && arguments[i].tagName && arguments[i].tagName=="SELECT") {
        content.lists[count]=arguments[i];

        arguments[i].handler=arguments[i].onchange;
        arguments[i].onchange=cs_updateList;
        arguments[i].content=content; arguments[i].idx=count++;
      }
      else if (typeof(arguments[i])=="string" && /^[a-zA-Z_]\w*$/.test(arguments[i])) {
        content.cookie=arguments[i];
      }
      else if (typeof(arguments[i])=="function") {
        content.callback=arguments[i];
      }
      else {
        cs_showMsg("Warning: Unexpected argument in initListGroup() for ["+n+"]");
      }
    }

    if (content.lists.length>0) {
      cs_initListGroup(content,content.cookie);
    }
  }
}

function initListGroups(n) {
  var listCount=0;
  for (var i=1; i<initListGroups.arguments.length; i++) {
    // opera takes select array as function
    if ((typeof(arguments[i])=="object" || typeof(arguments[i])=="function") && arguments[i].length && typeof(arguments[i][0])!="undefined" && arguments[i][0].tagName && arguments[i][0].tagName=="SELECT") {
      if (listCount>arguments[i].length || listCount==0) {
        listCount=arguments[i].length;
      }
    }
  }

  var _content=cs_findContent(n), count=0, content=null;
  if (_content!=null) {
    for (var l=0; l<listCount; l++) {
      count=0;
      content=new cs_contentOBJ("cs_"+_content.count+"_"+n,_content.menu);
      content.count=_content.count++;
      cs_content[cs_content.length]=content;

      for (var i=1; i<initListGroups.arguments.length; i++) {
        if ((typeof(arguments[i])=="object" || typeof(arguments[i])=="function") && arguments[i].length && typeof(arguments[i][0])!="undefined" && arguments[i][0].tagName && arguments[i][0].tagName=="SELECT") {
          content.lists[count]=arguments[i][l];

          arguments[i][l].handler=arguments[i][l].onchange;
          arguments[i][l].onchange=cs_updateList;
          arguments[i][l].content=content; arguments[i][l].idx=count++;
        }
        else if (typeof(arguments[i])=="string" && /^[a-zA-Z_]\w*$/.test(arguments[i])) {
          content.cookie=arguments[i]+"_"+l;
        }
        else if (typeof(arguments[i])=="function") {
          content.callback=arguments[i];
        }
        else {
          cs_showMsg("Warning: Unexpected argument in initListGroups() for ["+n+"]");
        }
      }

      if (content.lists.length>0) {
        cs_initListGroup(content,content.cookie);
      }
    }
  }
}

function resetListGroup(n,count) {
  var content=cs_findContent("cs_"+(count||1)+"_"+n);
  if (content!=null && content.lists.length>0) {
    cs_initListGroup(content,"");
  }
}

function selectOptions(n,opts,mode) {
  var content=cs_findContent(n);
  if (content!=null) {
    var optss=opts.split(":"), menu=content.menu, path=true;
    for (var i=0; i<optss.length; i+=2) {
      if (menu.type==cs_M && path) {
        path=false;
        for (var o=0; o<menu.items.length; o++) {
          if (mode==0 && menu.items[o].dis==optss[i] || mode==1 && menu.items[o].link==optss[i] || mode==2 && o==optss[i]) {
            path=true;
            if (optss[i+1]!="-") {
              menu.df=","+o+",";
            }
            menu=menu.items[o];
            break;
          }
        }
      }
    }
  }  
}
// DATA GOES HERE




var hide_empty_list=false; //uncomment this line to hide empty selection lists
var disable_empty_list=true; //uncomment this line to disable empty selection lists
var onclickaction="goto" //set to "alert" or "goto". Former is for debugging purposes 
var newwindow=0; //Open links in new window or not? 1=yes, 0=no.

addListGroup("links", "series");

addOption("series", "Select first...", "");
addList("series", "C-Series", "", "c");
addList("series", "CTP (Acorn)", "", "ctp");
addList("series", "DX Data Acceleration (Redline) (End of Life)", "", "dx");
addList("series", "E-series", "", "erx");
addList("series", "EX-series", "", "ex");
addList("series", "G-series (End of Life)", "", "g");
addList("series", "Intrusion Detection & Prevention", "", "netscreen-idp");
addList("series", "J-series", "", "j");
addList("series", "M-series", "", "m");
addList("series", "MX-series", "", "mx");
addList("series", "Netscreen SSL VPN", "", "sslvpn");
addList("series", "SRX-series", "", "srx");
addList("series", "SSG, ISG & NS Firewall Security Devices", "", "firewall");
addList("series", "T-series", "", "t");
addList("series", "VF Session Border Control (Kagoor)", "", "vf");
addList("series", "Unified Access Control", "", "ic");
addList("series", "WX WAN Acceleration (Peribit)", "", "wx");
addList("series", "Carrier AAA", "", "aaa");
addList("series", "Odyssey Access Client", "", "o");
addList("series", "Steel-Belted Radius Enterprise", "", "sbr");
addList("series", "Proxy Remote Control", "", "proxy");
addList("series", "Security Threat Response Manager (STRM)", "", "strm");
addList("series", "Management Software", "", "mgmt");
addList("series", "JUNOS/JUNOSe Management", "", "junos");
addList("series", "NSM/Global Pro", "", "gpro");
addList("series", "WX Central Management System", "", "wxcms");

addOption("c", "Select...", "");
addOption("c", "C2000","/customers/support/products/c2000.jsp");
addOption("c", "C4000","/customers/support/products/c4000.jsp");

addOption("ctp", "Select...", "");
addOption("ctp","CTP 1002","/customers/support/products/ctp1002.jsp");
addOption("ctp","CTP 1004","/customers/support/products/ctp1004.jsp");
addOption("ctp","CTP 1012","/customers/support/products/ctp1012.jsp");
addOption("ctp","CTP 2008","/customers/support/products/ctp2008.jsp");
addOption("ctp","CTP 2024","/customers/support/products/ctp2024.jsp");
addOption("ctp","CTP 2056","/customers/support/products/ctp2056.jsp");

addOption("dx", "Select...", "");
addOption("dx","DX 3200 (Redline E|X 3200, T|X 2000, T|X 2200) (End of Life)","/customers/support/products/dx3200.jsp"); 
addOption("dx","DX 3250 (E|X 3250, T|X 2250) (End of Life)","/customers/support/products/dx3250.jsp"); 
addOption("dx","DX 3280 (End of Life)","/customers/support/products/dx3280.jsp");
addOption("dx","DX 3600 (E|X 3400, E|X 3600, T|X 2400, T|X 2600) (End of Life)","/customers/support/products/dx3600.jsp"); 
addOption("dx","DX 3650 (E|X 3650, T|X 2650) (End of Life)","/customers/support/products/dx3650.jsp"); 
addOption("dx","DX 3650 FIPS (E|X 3650 FIPS) (End of Life)","/customers/support/products/dx3650.jsp"); 
addOption("dx","DX 3670 (E|X 3670) (End of Life)","/customers/support/products/dx3670.jsp"); 
addOption("dx","DX 3680 (End of Life)","/customers/support/products/dx3680.jsp");

addOption("erx", "Select...", "");
addOption("erx","E120","/customers/support/products/e120.jsp");
addOption("erx","ERX-310","/customers/support/products/erx310.jsp");
addOption("erx","E320","/customers/support/products/e320.jsp");
addOption("erx","ERX-705/710","/customers/support/products/erx705.jsp");
addOption("erx","ERX-1410","/customers/support/products/erx1410.jsp");
addOption("erx","ERX-1440","/customers/support/products/erx1440.jsp");

addOption("ex", "Select...", "");
addOption("ex","EX 2500","/customers/support/products/ex2500.jsp");
addOption("ex","EX 3200","/customers/support/products/ex3200.jsp");
addOption("ex","EX 4200","/customers/support/products/ex4200.jsp");
addOption("ex","EX 8208","/customers/support/products/ex8200.jsp");
addOption("ex","EX 8216","/customers/support/products/ex8216.jsp");

addOption("g", "Select...", "");
addOption("g","G1 (End of Life)","/customers/support/products/g1.jsp");
addOption("g","G10 (End of Life)","/customers/support/products/g10.jsp");

addOption("netscreen-idp", "Select...", "");
addOption("netscreen-idp","Juniper Networks IDP 75","/customers/support/products/idp75.jsp");
addOption("netscreen-idp","Juniper Networks IDP 250","/customers/support/products/idp250.jsp");
addOption("netscreen-idp","Juniper Networks IDP 800","/customers/support/products/idp800.jsp");
addOption("netscreen-idp","Juniper Networks IDP 8200","/customers/support/products/idp8200.jsp");
addOption("netscreen-idp","Netscreen-IDP 10","/customers/support/products/netscreenidp10.jsp");
addOption("netscreen-idp","Netscreen-IDP 50","/customers/support/products/netscreenidp50.jsp");
addOption("netscreen-idp","Netscreen-IDP 100","/customers/support/products/netscreenidp100.jsp");
addOption("netscreen-idp","Netscreen-IDP 200","/customers/support/products/netscreenidp200.jsp");
addOption("netscreen-idp","Netscreen-IDP 500","/customers/support/products/netscreenidp500.jsp");
addOption("netscreen-idp","Netscreen-IDP 600C/600F","/customers/support/products/netscreenidp600.jsp");
addOption("netscreen-idp","Netscreen-IDP 1000","/customers/support/products/netscreenidp1000.jsp");
addOption("netscreen-idp","Netscreen-IDP 1100C/1100F","/customers/support/products/netscreenidp1100.jsp");

addOption("j", "Select...", "");
addOption("j","J2300 (End of Life)","/customers/support/products/j2300.jsp");
addOption("j","J2320","/customers/support/products/j2320.jsp");
addOption("j","J2350","/customers/support/products/j2350.jsp");
addOption("j","J4300 (End of Life)","/customers/support/products/j4300.jsp");
addOption("j","J4350","/customers/support/products/j4350.jsp");
addOption("j","J6300 (End of Life)","/customers/support/products/j6300.jsp");
addOption("j","J6350","/customers/support/products/j6350.jsp");

addOption("m", "Select...", "");
addOption("m","M5 (End of Life)","/customers/support/products/m5.jsp");
addOption("m","M7i","/customers/support/products/m7i.jsp");
addOption("m","M10 (End of Life)","/customers/support/products/m10.jsp");
addOption("m","M10i","/customers/support/products/m10i.jsp");
addOption("m","M20","/customers/support/products/m20.jsp");
addOption("m","M40 (End of Life)","/customers/support/products/m40.jsp");
addOption("m","M40e","/customers/support/products/m40e.jsp");
addOption("m","M120","/customers/support/products/m120.jsp");
addOption("m","M160 (End of Life)","/customers/support/products/m160.jsp");
addOption("m","M320","/customers/support/products/m320.jsp");

addOption("mx", "Select...", "");
addOption("mx","MX240","/customers/support/products/mx240.jsp");
addOption("mx","MX480","/customers/support/products/mx480.jsp");
addOption("mx","MX960","/customers/support/products/mx960.jsp");

addOption("srx", "Select...", "");
addOption("srx","SRX 100","/customers/support/products/srx100.jsp");
addOption("srx","SRX 210","/customers/support/products/srx210.jsp");
addOption("srx","SRX 240","/customers/support/products/srx240.jsp");
addOption("srx","SRX 650","/customers/support/products/srx650.jsp");
addOption("srx","SRX 3400","/customers/support/products/srx3400.jsp");
addOption("srx","SRX 3600","/customers/support/products/srx3600.jsp");
addOption("srx","SRX 5600","/customers/support/products/srx5600.jsp");
addOption("srx","SRX 5800","/customers/support/products/srx5800.jsp");

addOption("sslvpn", "Select...", "");
addOption("sslvpn","Secure Access 2500 Base System","/customers/support/products/sa2500base.jsp");
addOption("sslvpn","Secure Access 4500 Base System","/customers/support/products/sa4500base.jsp");
addOption("sslvpn","Secure Access 6500 Base System","/customers/support/products/sa6500base.jsp");
addOption("sslvpn","Netscreen Secure Access 700 (Remote Access 500)","/customers/support/products/netscreenra500.jsp");
addOption("sslvpn","Netscreen Secure Access 1000","/customers/support/products/netscreensa1000.jsp");
addOption("sslvpn","Netscreen Secure Access 2000","/customers/support/products/netscreensa2000.jsp");
addOption("sslvpn","Netscreen Secure Access 3000","/customers/support/products/netscreensa3000.jsp");
addOption("sslvpn","Netscreen Secure Access 4000","/customers/support/products/netscreensa4000.jsp");
addOption("sslvpn","Netscreen Secure Access 5000","/customers/support/products/netscreensa5000.jsp");
addOption("sslvpn","Netscreen Secure Access 6000","/customers/support/products/netscreensa6000.jsp");
addOption("sslvpn","Netscreen Secure Access 6000 SP","/customers/support/products/netscreensa6000sp.jsp");
addOption("sslvpn","NetScreen-SM 3000","/customers/support/products/netscreensm3000.jsp"); 

addOption("firewall", "Select...", "");
addOption("firewall","NetScreen-5GT ADSL","/customers/support/products/netscreen5gtadsl.jsp");
addOption("firewall","NetScreen-5GT","/customers/support/products/netscreen5gt.jsp");
addOption("firewall","NetScreen-5GT Wireless","/customers/support/products/netscreen5gtwireless.jsp");
addOption("firewall","NetScreen-5XP (End of Life)","/customers/support/products/netscreen5xp.jsp");
addOption("firewall","NetScreen-5XT","/customers/support/products/netscreen5xt.jsp");
addOption("firewall","NetScreen-25","/customers/support/products/netscreen25.jsp");
addOption("firewall","NetScreen-50","/customers/support/products/netscreen50.jsp");
addOption("firewall","NetScreen-204","/customers/support/products/netscreen204.jsp");
addOption("firewall","NetScreen-208","/customers/support/products/netscreen208.jsp");
addOption("firewall","NetScreen-500 GPRS","/customers/support/products/netscreen500.jsp");
addOption("firewall","NetScreen-500","/customers/support/products/netscreen500.jsp");
addOption("firewall","NetScreen-HSC","/customers/support/products/netscreenhsc.jsp");
addOption("firewall","NetScreen-ISG 1000","/customers/support/products/netscreenisg1000.jsp");
addOption("firewall","NetScreen-ISG 2000","/customers/support/products/netscreenisg2000.jsp");
addOption("firewall","NetScreen-SSG 5","/customers/support/products/ssg5.jsp");
addOption("firewall","NetScreen-SSG 20","/customers/support/products/ssg20.jsp");
addOption("firewall","NetScreen-SSG 140","/customers/support/products/ssg140.jsp");
addOption("firewall","NetScreen-SSG 320M","/customers/support/products/ssg320m.jsp");
addOption("firewall","NetScreen-SSG 350M","/customers/support/products/ssg350m.jsp");
addOption("firewall","NetScreen-SSG 520/520M","/customers/support/products/netscreenssg520.jsp");
addOption("firewall","NetScreen-SSG 550/550M","/customers/support/products/netscreenssg550.jsp");
addOption("firewall","NetScreen-5200","/customers/support/products/netscreen52005400.jsp");
addOption("firewall","NetScreen-5400","/customers/support/products/netscreen52005400.jsp");
addOption("firewall","NetScreen Remote VPN Client","/customers/support/products/netscreen_remote_vpn.jsp");
addOption("firewall","NetScreen Remote Security Client","/customers/support/products/netscreen_remote_security.jsp");
addOption("firewall","NetScreen-1000 (End of Life)","/customers/support/products/netscreen1000.jsp");
addOption("firewall","NetScreen-100 (End of Life)","/customers/support/products/netscreen100.jsp");
addOption("firewall","NetScreen-10 (End of Life)","/customers/support/products/netscreen10.jsp");
addOption("firewall","NetScreen-5 (End of Life)","/customers/support/products/netscreen5.jsp");

addOption("t", "Select...", "");
addOption("t","T320","/customers/support/products/t320.jsp"); 
addOption("t","T640","/customers/support/products/t640.jsp");
addOption("t","T1600","/customers/support/products/t1600.jsp");
addOption("t","TX Matrix","/customers/support/products/txmatrix.jsp");

addOption("vf", "Select...", "");
addOption("vf","VF1000 (End of Life)","/customers/support/products/vf1000.jsp");
addOption("vf","VF1000e (End of Life)","/customers/support/products/vf1000e.jsp");
addOption("vf","VF3000 (End of Life)","/customers/support/products/vf3000.jsp");
addOption("vf","VF4000 (End of Life)","/customers/support/products/vf4000.jsp");

addOption("ic", "Select...", "");
addOption("ic","Infranet Controller 4000 (IC 4000)","/customers/support/products/ic4000.jsp");
addOption("ic","Infranet Controller 4500 (IC 4500)","/customers/support/products/ic4500.jsp");
addOption("ic","Infranet Controller 6000 (IC 6000)","/customers/support/products/ic6000.jsp");
addOption("ic","Infranet Controller 6500 (IC 6500)","/customers/support/products/ic6500.jsp");

addOption("wx", "Select...", "");
addOption("wx","WX 15 (Peribit SR-15) (End of Life)","/customers/support/products/wx15.jsp"); 
addOption("wx","WX 20 (Peribit SR-20) (End of Life)","/customers/support/products/wx20.jsp");
addOption("wx","WX 50 (Peribit SR-50) (End of Life)","/customers/support/products/wx50.jsp"); 
addOption("wx","WX 55 (Peribit SR-55) (End of Life)","/customers/support/products/wx55.jsp"); 
addOption("wx","WX 60 (Peribit SR-55) (End of Life)","/customers/support/products/wx60.jsp");
addOption("wx","WX 80 (Peribit SR-80) (End of Life)","/customers/support/products/wx80.jsp");
addOption("wx","WX 100 (Peribit SR-100)","/customers/support/products/wx100.jsp");
addOption("wx","WX Stack","/customers/support/products/wx_stack.jsp");
addOption("wx","WXC 250 (Peribit SM-250) (End of Life)","/customers/support/products/wxc250.jsp");
addOption("wx","WXC 500 (Peribit SM-500)","/customers/support/products/wxc500.jsp");
addOption("wx","WXC 590 Application Acceleration Platform","/customers/support/products/wxc590.jsp");  
addOption("wx","WXC 1800 Application Acceleration Platform","/customers/support/products/wxc1800.jsp");  
addOption("wx","WXC 2600 Application Acceleration Platform","/customers/support/products/wxc2600.jsp");  
addOption("wx","WXC 3400 Application Acceleration Platform","/customers/support/products/wxc3400.jsp");  
addOption("wx","WXC Stack (Peribit SM-500 Cluster)","/customers/support/products/wxc_stack.jsp");

addOption("aaa", "Select...", "");
addOption("aaa","SBR Carrier","/customers/support/products/sbr_carrier.jsp"); 
addOption("aaa","SBR Service Provider Edition (SPE)","/customers/support/products/aaa_sbr_sp_spe.jsp");
addOption("aaa","SBR High Availability (HA)","/customers/support/products/sbr_ha.jsp");
addOption("aaa","SBR Subscriber Identity Module (SIM) Server","/customers/support/products/aaa_sbr_sp_sim.jsp");
addOption("aaa","SBR Mobile IP Module (MIM)","/customers/support/products/aaa_sbr_sp_mim.jsp");
addOption("aaa","SBR Service Level Manager (SLM)","/customers/support/products/aaa_sbr_sp_slm.jsp");
addOption("aaa","IP Multimedia Subsystem (IMS) AAA Server","/customers/support/products/ims_aaa.jsp");

addOption("o", "Select...", "");
addOption("o","Odyssey Access Client Enterprise Edition","/customers/support/products/oac.jsp"); 
addOption("o","Odyssey Access Client FIPS Edition","/customers/support/products/oac_fe.jsp");
addOption("o","Odyssey Access Client Windows Mobile","/customers/support/products/oac_wm.jsp");
addOption("o","Odyssesy Access Client CE","/customers/support/products/oac_ce.jsp");

addOption("sbr", "Select...", "");
addOption("sbr","Steel-Belted Radius Enterprise Edition","/customers/support/products/aaa_sbr_ee.jsp"); 
addOption("sbr","Steel-Belted Radius Global Enterprise Edition","/customers/support/products/aaa_sbr_ge.jsp");
addOption("sbr","Steel-Belted Radius Enterprise Edition Appliance","/customers/support/products/aaa_sbr_ee_app.jsp");
addOption("sbr","Steel-Belted Radius Global Enterprise Edition Appliance","/customers/support/products/aaa_sbr_ge_app.jsp"); 

addOption("proxy","Proxy Remote Control Software","/customers/support/products/proxy.jsp"); 

addOption("strm", "Select...", "");
addOption("strm","STRM 500","/customers/support/products/strm500.jsp");
addOption("strm","STRM 2500","/customers/support/products/strm2500.jsp");
addOption("strm","STRM 5000","/customers/support/products/strm5000.jsp");

addOption("mgmt", "Select...", "");
addOption("mgmt","Juniper Route Insight Manager (JRIM)","/customers/support/products/jrim.jsp");
addOption("mgmt","Junos Space","/customers/support/products/junosspace.jsp");

addOption("junos", "Select...", "");
addOption("junos","JUNOScope (J-,M-,MX-,T-Series)","/customers/support/products/junoscope.jsp");
addOption("junos","XML APIs for the JUNOS Software","/customers/support/products/xml.jsp");
addOption("junos","NMC-RX Application (E-series)","/customers/support/products/nmc-rx.jsp");
addOption("junos","SDX Application (E-,M-,T-series)","/customers/support/products/sdx300.jsp");

addOption("gpro", "Select...", "");
addOption("gpro","Global Pro","/customers/support/products/globalpro.jsp");
addOption("gpro","Global Pro Express","/customers/support/products/globalpro_express.jsp");
addOption("gpro","Network and Security Manager (NSM) (formerly NetScreen Security Manager)","/customers/support/products/nsm.jsp");
addOption("gpro","Network and Securty Manager Central Manager (NSM CM) (formerly NetScreen Security Manager)","/customers/support/products/nsmcm.jsp");
addOption("gpro","NSMXpress/NSMXpress HA","/customers/support/products/nsmxpress.jsp");
addOption("gpro","NSM3000","/customers/support/products/nsm3000.jsp");

addOption("wxcms","WX CMS","/customers/support/products/wxcms.jsp");


function openLink() {
  if (document.forms['sbp'].elements['site'].value != "") {
    location.href = document.forms['sbp'].elements['site'].value;
  }
  else {
    alert("Select a series first, then a product, before clicking on OPEN");
  }
}

function selectTheTab() {
	if ((window.location.href.lastIndexOf("?")) > 0) 
		switchTabs(window.location.search.substring(1,5))
		return
	}



// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

//Specify rate of display (1/freq)
var freq=1 /*frequency of dropin*/
var heightFromTop=20  /*height from top of window*/

//var random_num=Math.floor(Math.random()*freq)
//if (random_num==0)
//initbox();
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"


var bouncelimit=16 //(must be divisible by 8)
var direction="up"

function initbox(){
            if('N' == 'Y'){
                        if (!dom&&!ie&&!ns4)
                        return
                        crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
                        scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
                        crossobj.top=scroll_top-250+calunits
                        crossobj.visibility=(dom||ie)? "visible" : "show"
                        dropstart=setInterval("dropin()",50)
            }
}

function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<heightFromTop+scroll_top)  
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}




function PageQuery(q) {
if(q.length > 1) this.q = q.substring(1, q.length);
else this.q = null;
this.keyValuePairs = new Array();
if(q) {
for(var i=0; i < this.q.split("&").length; i++) {
this.keyValuePairs[i] = this.q.split("&")[i];
}
}
this.getKeyValuePairs = function() { return this.keyValuePairs; }
this.getValue = function(s) {
for(var j=0; j < this.keyValuePairs.length; j++) {
if(this.keyValuePairs[j].split("=")[0] == s)
return this.keyValuePairs[j].split("=")[1];
}
return false;
}
this.getParameters = function() {
var a = new Array(this.getLength());
for(var j=0; j < this.keyValuePairs.length; j++) {
a[j] = this.keyValuePairs[j].split("=")[0];
}
return a;
}
this.getLength = function() { return this.keyValuePairs.length; } 
}
function queryString(key){
var page = new PageQuery(window.location.search); 
return unescape(page.getValue(key)); 
}

function surveyCheck(){
            if(queryString('surveyrequest') != null){
                        if(queryString('surveyrequest') == 'Y'){
                                    return 'Y';
                        }else{
                                    return 'N';
                        }
            }else{
                        return 'N';
            }
}

function submitSurveyRequest(form, answer){
            form.surveyanswer.value = answer;
            form.submit();
}

// KB submission box
// 031309 - MH - removed from Product pages and added to theis script


var qna_submitOK       = true;
//var qna_browser        = new Browser();

function escapeVal(textarea,replaceWith){
textarea.value=escape(textarea.value)
for(i=0; i<textarea.value.length; i++){
 	if(textarea.value.indexOf("%0D%0A") > -1){
	textarea.value=textarea.value.replace("%0D%0A",replaceWith)
	}
	else if(textarea.value.indexOf("%0A") > -1){
	textarea.value=textarea.value.replace("%0A",replaceWith)
	}
	else if(textarea.value.indexOf("%0D") > -1){
	textarea.value=textarea.value.replace("%0D",replaceWith)
	}
}
textarea.value=unescape(textarea.value)
}


function submitQuestion()
{
    // Submit the question
if (!isSubmitOK())
    {
        return false;
    }
  
  disableSubmit();
    document.question_form.submit();

    // Wait 10 seconds before submit available
    setTimeout("enableSubmit();", 10000);
   
 return false;

}

function isSubmitOK()
{
    var form= top.document.question_form;
    var searchstrng=form.facet.value;
    var question = form.question_box.value;
   
  if (!qna_submitOK)
        return false;
    // Trim any whitespace from question
    question = question.replace(/^\s+/,'');
    question = question.replace(/\s+$/,'');
    // Don't submit a blank query
    if (question == "")
    {
        document.question_form.question_box.value = "";
        document.question_form.question_box.focus();

        return false;
    }
 escapeVal(document.question_form.question_box,"");   
form.action= 'http://kb.juniper.net/?ui_mode=question&question_box='+question+'&facet='+searchstrng;

    return true;
}
  
function disableSubmit()
{
    qna_submitOK = false;
    document.question_form.Ask.disabled = true;

}

function enableSubmit()
{
    qna_submitOK = true;
    document.question_form.Ask.disabled = false;

}
if (window.onload == null)
    window.onload = handleOnLoad;