var driverDownloadList;function RefreshDriverDownloadList(){driverDownloadList=getCookie("driverDownloadList");if(driverDownloadList.length==0){driverDownloadList=new Array()}else{driverDownloadList=driverDownloadList.split("|")}}RefreshDriverDownloadList();var popupConfirmDialog=null;function setCookie(B,C,A){var D=new Date();D.setDate(D.getDate()+A);document.cookie=B+"="+escape(C)+((A==null)?"":";expires="+D.toGMTString())}function getCookie(A){if(document.cookie.length>0){c_start=document.cookie.indexOf(A+"=");if(c_start!=-1){c_start=c_start+A.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function IsDriverSaved(D){var C=driverDownloadList.length;var A,B=false;for(A=0;A<driverDownloadList.length;A++){if(driverDownloadList[A]==D){B=true;break}}return B}function DeleteDriverFromCookie(G,F){var E=driverDownloadList.length;var A,B=false,D="";for(A=0;A<driverDownloadList.length;A++){if(driverDownloadList[A]!=G){if(D.length==0){D+=driverDownloadList[A]}else{D+="|"+driverDownloadList[A]}}else{B=true}}if(B){setCookie("driverDownloadList",D,7);RefreshDriverDownloadList();UpdateDriverList();var C=document.getElementById("driver"+G);if(C){C.innerHTML='<a class="link2new" href="javascript:AddDriverToList(\'driver'+G+"', '"+G+'\')"><img src="/support/images/save.gif" style="border: 0px" /> Save for later</a>';C.style.fontStyle="normal"}DisplayDriversListDialog()}}function DisplayDriversListDialog(){$(".boxy-wrapper").fadeOut();$(".downloadDialog").trigger("click");$(".boxy-wrapper").fadeIn()}function AddDriverToCookie(A){if(!IsDriverSaved(A)){driverList=getCookie("driverDownloadList");if(driverList.length==0){driverList=A}else{driverList+="|"+A}setCookie("driverDownloadList",driverList,7);RefreshDriverDownloadList()}}function AddDriverToList(A,C){AddDriverToCookie(C);var B=document.getElementById(A);B.innerHTML="Driver saved to your list";B.style.fontStyle="italic";UpdateDriverList();DisplayDriverPopup()}function UpdateDriverList(){var A=document.getElementById("downloadList");if(A){if(driverDownloadList.length==0){A.innerHTML="There are no items in your list."}else{A.innerHTML="You have "+driverDownloadList.length;if(driverDownloadList.length==1){A.innerHTML+=" driver"}else{A.innerHTML+=" drivers"}A.innerHTML+=' saved. <a class="link2new" href="javascript:void(null)" onclick="DisplayDriversListDialog()">Click here to view your list</a>.'}}}function DisplayDriverPopup(){var A='<p>The driver has been saved.	<a class="link2new" href="javascript:void(null)" onclick="HideDriverPopup(); DisplayDriversListDialog()">Click here to access your saved drivers</a>.</p>';if(popupConfirmDialog==null){options=$.extend({title:"Dialog"},{title:"Confirmation",modal:true}||{});popupConfirmDialog=new Boxy(A,{title:"Confirmation",modal:true})}popupConfirmDialog.center().show()}function HideDriverPopup(){if(popupConfirmDialog!=null){if(popupConfirmDialog.isVisible()){popupConfirmDialog.hide()}}}function CheckDriver(C,A){if(driverDownloadList.length>0){if(IsDriverSaved(C)){var B=document.getElementById(A);B.innerHTML="Driver saved to your list"}}}function ClearDriverList(){setCookie("driverDownloadList",null,-1);RefreshDriverDownloadList();UpdateDriverList()}function DownloadFile(A){document.location=A;return false}function DisplayDownloadListSection(){document.write("<tr>");document.write('<td class="BgBlue"><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="1" width="1"></td>');document.write("<td></td>");document.write('<td><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="6" width="1"><br>');document.write("<b>Download List</b><br>");document.write('<img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="6" width="1"></td>');document.write("<td></td>");document.write('<td class="BgBlue"><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="1" width="1"></td>');document.write("</tr>");document.write("<tr>");document.write('<td class="BgBlue"><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="1" width="1"></td>');document.write("<td></td>");document.write("<td>");document.write(' <div id="downloadList" style="padding-bottom: 5px;">There are no items in your list.</div>');document.write(' <span id="downloadLink" style="display: none"><a id="downloadDialog" href="rsDriversList.asp" onclick="HideDriverPopup()" title="Driver List" class="downloadDialog">Click here to view your list</a>.');$(function(){$(".downloadDialog").boxy({modal:true})});document.write("</span>");document.write("</td>");document.write("<td></td>");document.write('<td class="BgBlue"><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="1" width="1"></td>');document.write("</tr>");document.write('<tr class="BgBlue"><td colspan="5"><img src="http://cdnsupport.gateway.com/images/ub/ub_clear.gif" title="" alt="" height="1" width="1"></td></tr>')}window.onresize=function(){if(popupConfirmDialog!=null){if(popupConfirmDialog.isVisible()){popupConfirmDialog.hide();setTimeout("popupConfirmDialog.show().center()",500)}}var A=Boxy.get($("#driverTable"));if(A){if(A.isVisible()){$(".boxy-modal-blackout").css("width","100%");A.center()}}};
