var hidemenu=null;var menuitem=null;var currmenuitem=null;function toggleDisplay(b){var a=document.getElementById(b);if(a.style.display=="none"){showElem(b)}else{hideElem(b)}}function toggleVis(b){var a=document.getElementById(b);if(a.style.visibility=="hidden"){showVisElem(b)}else{hideVisElem(b)}}function hideMe(a){currmenuitem=a;menuitem="hideVisMenuElem('"+a+"');";hidemenu=setTimeout(menuitem,200)}function hideVisMenuElem(c){var a=document.getElementById(c);var b=document.getElementById(c+"_pmenu");if(a!=null){a.style.visibility="hidden"}b.style.backgroundColor=""}function showVisMenuElem(id){if(hidemenu&&currmenuitem==id){clearTimeout(hidemenu);hidemenu=null;menuitem=null;currmenuitem=null}var elem=document.getElementById(id);var menuelem=document.getElementById(id+"_pmenu");var elemLeftPos=menuelem.offsetLeft;var elemTopPos=menuelem.offsetTop;var elemParent=menuelem.offsetParent;while(elemParent!=null){elemLeftPos+=elemParent.offsetLeft;elemTopPos+=elemParent.offsetTop;elemParent=elemParent.offsetParent}if(elem!=null){elem.style.left=elemLeftPos+"px";elem.style.top=eval(elemTopPos+menuelem.offsetHeight)+"px";elem.style.visibility="visible"}}function addWarrantyToCart(){var c=document.getElementById("warrantyopt");var b=c.options[c.selectedIndex].value;var a="./updatecart.cfm?type=addwar&mpn="+b;self.location=a}function ValidateReviewForm(){var a="";var b;if(document.getElementById("rating").value==""){a+="Do not forget to rate the product.\n"}if(document.getElementById("ownership").value==""){a+="Tell us how long you have owned this product.\n"}if(document.getElementById("understanding").value==""){a+="Please tell us your technical understanding of this product.\n"}if(document.getElementById("cons").value==""){a+="Please tell us the Cons (bad things) about the product.\n"}if(document.getElementById("pros").value==""){a+="Please tell us the Pros (good things) about the product.\n"}if(document.getElementById("agreement").checked){document.getElementById("agreement").value="1"}else{a+="You must read and agree to abide by the Product Review Guidelines.\n"}if(a!=""){b="____________________________________________________\n\n";b+="The form was not submitted because of the following error(s).\n";b+="Please correct these error(s) and re-submit.\n";b+="____________________________________________________\n\n";b+=a;b+="\n";alert(b);return false}else{return true}}function showElem(a){document.getElementById(a).style.display="inline"}function hideElem(a){document.getElementById(a).style.display="none";document.getElementById(a).style.position="absolute"}var xmlHttp;function findPos(a){var b=curtop=0;if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;while(a=a.offsetParent){b+=a.offsetLeft;curtop+=a.offsetTop}}return[b,curtop]}function fillForm(b){var a=b.parentNode;document.getElementById("submitButton").click()}function ltrim(a){a=a.replace(/^s*/,"");return a}function rtrim(a){a=a.replace(/s*$/,"");return a}function trim(a){return ltrim(rtrim(a))}function showHint(b){var f=b.value;var c;var b=document.getElementById("srchKey");c=document.getElementById("srchKeySuggest");var g;g=findPos(b);posx=g[0];posy=g[1];if(b.value==""){document.getElementById(c.id).style.display="none"}else{}c.style.left=posx;c.style.top=posy+17;if(f.length==0){hideElem(c.id);return}xmlHttp=GetXmlHttpObject();if(!xmlHttp&&typeof XMLHttpRequest!="undefined"){xmlHttp=new XMLHttpRequest()}if(xmlHttp==null){alert("Your browser does not support AJAX!");return}var a=b.getAttribute("suggestPage");a=a+"?q="+f;a=a+"&sid="+Math.random();xmlHttp.onreadystatechange=function(){if((xmlHttp.readyState==4)){var e=trim(xmlHttp.responseText.toString());if(e==""){document.getElementById(c.id).style.display="none"}else{document.getElementById(c.id).style.display="inline";var h=new RegExp(f,"img");var i=xmlHttp.responseText.replace(h,""+f+"");i=xmlHttp.responseText;document.getElementById(c.id).innerHTML=i}b.setAttribute("suggestID","")}};xmlHttp.open("GET",a,true);xmlHttp.send(null)}function GetXmlHttpObject(){var a=null;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP")}}return a}var x=null;var selectedItem=null;function hover(a){a.style.backgroundColor="#99ccff";a.style.cursor="hand";selectItem(a)}function hoverOut(a){a.style.backgroundColor="transparent";a.style.cursor="hand";unSelectItem(a)}function stripHTML(a){return a.replace(/<\/?[^>]+(>|$)/g,"")}function handleClick(b,e){var a=document.getElementById(e);var c=b.getAttribute("suggest");c=stripHTML(c);a.setAttribute("value",c);a.setAttribute("text",c);a.setAttribute("suggestID",b.getAttribute("suggestID"));hideElem(b.id);handleChange(a)}function handleLR(b,c){var a=document.getElementById(c);a.setAttribute("value",b.getAttribute("suggest"));a.setAttribute("text",b.getAttribute("suggest"));a.setAttribute("suggestID",b.getAttribute("suggestID"));hideElem(b.id)}function handleOver(a){if(x){clearTimeout(x);x=null}showElem(a.id)}function handleHoverOut(a){x=setTimeout("hideElem('"+a.id+"');selectedItem=null;",900)}function processKeyDown(a,b,c){if(window.event){key=event.keyCode}else{key=a.which}if((key==37)||(key==39)){var e=document.getElementById(b);if(selectedItem!=null){var f=e.getAttribute("suggest");f=stripHTML(f);c.value=f;c.setAttribute("suggestID",e.getAttribute("suggestID"));selectedItem=null;hideElem(b)}}if(key==40){var e=document.getElementById(b);if(selectedItem==null){selectFirstItem(e)}else{selectNextItem(e)}}if(key==38){var e=document.getElementById(b);if(selectedItem==null){selectLastItem(e)}else{selectPrevItem(e)}}if((key==9)||(key==13)){var e=document.getElementById(b);if(selectedItem!=null){var f=e.getAttribute("suggest");f=stripHTML(f);c.value=f;c.setAttribute("suggestID",e.getAttribute("suggestID"));selectedItem=null;hideElem(b)}window.event.keyCode=9;document.getElementById("submitButton").click()}}function noenter(){return !(window.event&&window.event.keyCode==13)}function selectNextItem(a){var b=a.childNodes[0].firstChild.childNodes[selectedItem];unSelectItem(b);if(selectedItem==a.childNodes[0].firstChild.childNodes.length-1){selectFirstItem(a)}else{selectItem(a.childNodes[0].firstChild.childNodes[selectedItem+1])}}function selectPrevItem(a){var b=a.childNodes[0].firstChild.childNodes[selectedItem-1];unSelectItem(b);if(selectedItem==1){selectLastItem(a)}else{selectItem(b)}}function selectFirstItem(a){var b=a.childNodes[0].firstChild.firstChild.nextSibling;selectItem(b);selectedItem=1}function selectLastItem(a){var b=a.childNodes[a.childNodes.length-1].lastChild.lastChild;selectItem(b)}function selectItem(b){var a=b.firstChild.firstChild.getAttribute("value");b.style.backgroundColor="#ffffcc";b.parentNode.parentNode.parentNode.setAttribute("suggest",a);b.parentNode.parentNode.parentNode.setAttribute("suggestID",b.id);selectedItemx=0;while(b.parentNode.childNodes[selectedItemx]!=b){unSelectItem(b.parentNode.childNodes[selectedItemx]);++selectedItemx}selectedItem=selectedItemx;selectedItemx=b.parentNode.childNodes.length-1;while(b.parentNode.childNodes[selectedItemx]!=b){unSelectItem(b.parentNode.childNodes[selectedItemx]);--selectedItemx}selectedItem=selectedItemx;b.parentNode.parentNode.parentNode.setAttribute("suggest",a);b.parentNode.parentNode.parentNode.setAttribute("suggestID",b.id)}function unSelectItem(a){a.style.backgroundColor="transparent"}function processKeyUp(a,b){if(window.event){key=event.keyCode}else{key=a.which}if((key==40)||(key==38)||(key==9)){}else{showHint(document.getElementById(b))}}function handleChange(b){if(b.id=="srchKey"){fillForm(b)}else{var a=(b.getAttribute("suggestID"));if(a==null){a=""}if(a!=null){}}}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a}function GetSwfVer(){var h=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var g=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+g].description;var f=a.split(" ");var c=f[2].split(".");var i=c[0];var b=c[1];var e=f[3];if(e==""){e=f[4]}if(e[0]=="d"){e=e.substring(1)}else{if(e[0]=="r"){e=e.substring(1);if(e.indexOf("d")>0){e=e.substring(0,e.indexOf("d"))}}}var h=i+"."+b+"."+e}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){h=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){h=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){h=2}else{if(isIE&&isWin&&!isOpera){h=ControlVersion()}}}}}return h}function DetectFlashVer(g,e,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var f=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(f>parseFloat(g)){return true}else{if(f==parseFloat(g)){if(a>parseFloat(e)){return true}else{if(a==parseFloat(e)){if(b>=parseFloat(c)){return true}}}}}return false}}}function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(f,e,a){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var b in f){c+=b+'="'+f[b]+'" '}c+=">";for(var b in e){c+='<param name="'+b+'" value="'+e[b]+'" /> '}c+="</object>"}else{c+="<embed ";for(var b in a){c+=b+'="'+a[b]+'" '}c+="> </embed>"}document.write(c)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(b,f,h,e,j){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var c=0;c<b.length;c=c+2){var g=b[c].toLowerCase();switch(g){case"classid":break;case"pluginspage":a.embedAttrs[b[c]]=b[c+1];break;case"src":case"movie":b[c+1]=AC_AddExtension(b[c+1],f);a.embedAttrs.src=b[c+1];a.params[h]=b[c+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":a.objAttrs[b[c]]=b[c+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.classid=e;if(j){a.embedAttrs.type=j}return a}function filterInStock(b){var g;var a;var f=String(document.location);g=f.replace(/&inStock=[01]/gi,"");var e=document.getElementById("inStock");var c=document.getElementById("inStock2");if(b.id=="inStock"){c.checked=e.checked}else{if(b.id=="inStock2"){e.checked=c.checked}}if((e.checked==true)||(c.checked==true)){a="&inStock=1"}else{a="&inStock=0"}document.location=g+a;return false}function fixedForm(a){a.srchKey.value=a.srchKey.value.toString().replace(/\=/g,"");a.srchKey.value=a.srchKey.value.toString().replace(/\%/g,"");return true}function showPopUp(){var options={scaleFrom:0,scaleTo:100,scaleFromCenter:true};Effect.SlideDown("divTopLeft",options);var theY=eval(document.body.clientHeight-150);JSFX_FloatDiv("divTopLeft",0,theY).floatIt();return false}function checkQuantityAvailable(b,a){var c;c=parseInt(document.forms.cartForm.qty.value);if(c>b){if(confirm("You have requested "+c+" units but only "+b+" are available.\nWould you like to continue with this product on backorder?")){return true}else{if(b>=a){document.forms.cartForm.qty.value=b;return true}else{return false}}}}function JSFX_FloatDiv(f,e,c){var b=d.getElementById?d.getElementById(f):d.all?d.all[f]:d.layers[f];var a=document.layers?"":"px";window[f+"_obj"]=b;if(d.layers){b.style=b}b.cx=b.sx=e;b.cy=b.sy=c;b.sP=function(g,h){this.style.left=g+a;this.style.top=h+a};b.floatIt=function(){var h,g;h=(this.sx>=0)?0:ns?innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;g=ns?pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(this.sy<0){g+=ns?innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight}this.cx+=(h+this.sx-this.cx)/8;this.cy+=(g+this.sy-this.cy)/8;this.sP(this.cx,this.cy);setTimeout(this.id+"_obj.floatIt()",40)};return b}function WSCA_Alert(){alert("Warning: You are now now leaving the WSCA approved website.  Only authorized Products and Peripherals listed on the approved WSCA website are available through the WSCA Agreement.")}function init(a){if(a==""){$("password-clear").style.display="block";$("password").hide();$("password-clear").onfocus=function(){$("password-clear").hide();$("password").style.display="block";$("password").focus()};$("password").onblur=function(){if($("password").value==""){$("password-clear").style.display="block";$("password").hide()}}}}function rmURLAttribute(h,k){var n=new RegExp(k+"=","gi");if((typeof(h)!="string")||(h.match(n)==null)){return h}else{var c=h.split("?");var e=c[0];var m=c[1];var o="";var b=m.split("&");var a=b.length;for(var f=0;f<a;f++){var j=b[f].indexOf("=");if(j==-1){continue}var g=b[f].substring(0,j);var l=b[f].substring(j+1);if(g!=k){if(o==""){o="?"}else{o=o+"&"}o=o+g+"="+l}}return e+o}}function updateURL(a){var f;var c=String(document.location);var b=a.value;f=rmURLAttribute(c,a.id);if(b!=""){if(f.match(/\?/)==null){f=f+"?"}else{f=f+"&"}f=f+a.id+"="+b}document.location=f}function getProtocol(){var c=String(document.location);var a=c.split(":");var b;switch(a[0]){case"http":b="http";break;case"https":b="https";break;default:b="http"}return b};
