Event.onDOMReady(function(){new DropDownSelector($("support-devices-devicetype"),$("support-devices-manufacturer"),$("support-devices-software"),$("support-devices-submit"),null,null)
});DropDownSelector=Class.create();DropDownSelector.prototype={deviceDictionary:null,deviceTypeEl:[],manufacturerEl:[],softwareEl:[],submitButton:false,cookiedDevicetype:false,cookiedManufacturer:false,cookiedSoftware:false,activateButton:false,selectedDeviceTypes:false,selectedManufacturers:false,selectedSoftwares:false,deviceTypeArr:[],manufacturerArr:[],softwareArr:[],isPHP:false,initialize:function(d,c,a,b){var e=window.location.href;
if(e.match(/\.php/)){this.isPHP=true}this.phonePropertyName=(typeof phonePropertyName==="string")?phonePropertyName:"phone";
this.deviceDictionary=compatibilityMatrix;this.deviceTypeEl=d;this.manufacturerEl=c;
this.softwareEl=a;this.submitButton=b;this.populateDevicesWithin();Event.observe(this.deviceTypeEl,"change",this.selectDeviceType.bindAsEventListener(this));
Event.observe(this.manufacturerEl,"change",this.selectManufacturer.bindAsEventListener(this));
Event.observe(this.softwareEl,"change",this.selectSoftware.bindAsEventListener(this))
},selectDeviceType:function(d){var a=this.deviceTypeEl.selectedIndex;var e=this.deviceTypeEl.getElementsByTagName("option")[a];
if(e.value!=="any"&&e.value!==""){this.selectedDeviceTypes=this.deviceDictionary.deviceType[e.value];
this.showManufacturers();this.showSoftwares()}else{if(e.value==="any"||e.value===""){this.selectedDeviceTypes={Manufacturers:[],SoftwareVersions:[]};
for(var c in this.deviceDictionary.Manufacturer){this.selectedDeviceTypes.Manufacturers.push(c)
}for(var b in this.deviceDictionary.SoftwareVersion){this.selectedDeviceTypes.SoftwareVersions.push(b)
}this.showManufacturers();this.showSoftwares()}}},selectManufacturer:function(d){var a=this.manufacturerEl.selectedIndex;
var e=this.manufacturerEl.getElementsByTagName("option")[a];if(e.value!=="any"&&e.value!==""){this.selectedManufacturers=this.deviceDictionary.Manufacturer[e.value];
this.showDeviceTypes();this.showSoftwares()}else{if(e.value==="any"||e.value===""){this.selectedManufacturers={deviceTypes:[],SoftwareVersions:[]};
for(var c in this.deviceDictionary.deviceType){this.selectedManufacturers.deviceTypes.push(c)
}for(var b in this.deviceDictionary.SoftwareVersion){this.selectedManufacturers.SoftwareVersions.push(b)
}this.showDeviceTypes();this.showSoftwares()}}},selectSoftware:function(d){var a=this.softwareEl.selectedIndex;
var e=this.softwareEl.getElementsByTagName("option")[a];if(e.value!=="any"&&e.value!==""){this.selectedSoftwares=this.deviceDictionary.SoftwareVersion[e.value];
this.showDeviceTypes();this.showManufacturers()}else{if(e.value==="any"||e.value===""){this.selectedSoftwares={deviceTypes:[],Manufacturers:[]};
for(var c in this.deviceDictionary.deviceType){this.selectedSoftwares.deviceTypes.push(c)
}for(var b in this.deviceDictionary.Manufacturer){this.selectedSoftwares.Manufacturers.push(b)
}this.showDeviceTypes();this.showManufacturers()}}},populateDeviceTypes:function(a){if(this.isPHP){this.deviceTypeArr=Element.childElements(this.deviceTypeEl);
return}this.deviceTypeEl.innerHTML="";var g=this.createOption("","Device Type",false,""),b=this.createOption("","---------------",false,""),f=this.createOption("any","Any",false,"");
this.deviceTypeEl.appendChild(g);this.deviceTypeEl.appendChild(b);this.deviceTypeEl.appendChild(f);
for(var e in a){var d=(e==this.cookiedDevicetype)?true:false;var c=this.createOption(e,e,d,"");
this.deviceTypeEl.appendChild(c);this.deviceTypeArr.push(c)}},populateManufacturers:function(g){if(this.isPHP){this.manufacturerArr=Element.childElements(this.manufacturerEl);
return}this.manufacturerEl.innerHTML="";var b=this.createOption("","Manufacturer",false,""),c=this.createOption("","---------------",false,""),e=this.createOption("any","Any",false,"");
this.manufacturerEl.appendChild(b);this.manufacturerEl.appendChild(c);this.manufacturerEl.appendChild(e);
for(var f in g){var d=(f==this.cookiedManufacturer)?true:false;var a=this.createOption(f,f,d,"");
this.manufacturerEl.appendChild(a);this.manufacturerArr.push(a)}},populateSoftware:function(g){if(this.isPHP){this.softwareArr=Element.childElements(this.softwareEl);
return}this.softwareEl.innerHTML="";var c=this.createOption("","Software Version",false,""),b=this.createOption("","---------------",false,""),f=this.createOption("any","Any",false,"");
this.softwareEl.appendChild(c);this.softwareEl.appendChild(b);this.softwareEl.appendChild(f);
for(var e in g){var d=(e==this.cookiedSoftware)?true:false;var a=this.createOption(e,e,d,"");
this.softwareEl.appendChild(a);this.softwareArr.push(a)}},populateDevicesWithin:function(){this.populateDeviceTypes(this.deviceDictionary.deviceType);
this.populateManufacturers(this.deviceDictionary.Manufacturer);this.populateSoftware(this.deviceDictionary.SoftwareVersion);
if(this.isPHP){this.selectDeviceType();this.selectManufacturer();this.selectSoftware()
}},enableOptionsForOptionsAndAvailable:function(a,b){a.each(function(d,c){if(b.indexOf(d.value)==-1&&!(this.isPHP&&c<3)){d.disabled=true;
if(!Element.hasClassName(d,"disabled")){Element.addClassName(d,"disabled")}if(d.selected===true){d.parentNode[0].selected=true
}}else{d.disabled=false;if(Element.hasClassName(d,"disabled")){Element.removeClassName(d,"disabled")
}}}.bind(this))},showDeviceTypes:function(){var a=[];if(this.selectedManufacturers!==false&&this.selectedSoftwares===false){a=this.selectedManufacturers.deviceTypes
}else{if(this.selectedManufacturers!==false&&this.selectedSoftwares!==false){a=(this.selectedManufacturers.deviceTypes.length>this.selectedSoftwares.deviceTypes.length)?this.removeOptionsFromLargerArrayForSmallerArray(this.selectedManufacturers.deviceTypes,this.selectedSoftwares.deviceTypes):this.removeOptionsFromLargerArrayForSmallerArray(this.selectedSoftwares.deviceTypes,this.selectedManufacturers.deviceTypes)
}else{if(this.selectedManufacturers===false&&this.selectedSoftwares!==false){a=this.selectedSoftwares.deviceTypes
}}}this.enableOptionsForOptionsAndAvailable(this.deviceTypeArr,a)},showManufacturers:function(){var a=[];
if(this.selectedDeviceTypes!==false&&this.selectedSoftwares===false){a=this.selectedDeviceTypes.Manufacturers
}else{if(this.selectedDeviceTypes!==false&&this.selectedSoftwares!==false){a=(this.selectedDeviceTypes.Manufacturers.length>this.selectedSoftwares.Manufacturers.length)?this.removeOptionsFromLargerArrayForSmallerArray(this.selectedDeviceTypes.Manufacturers,this.selectedSoftwares.Manufacturers):this.removeOptionsFromLargerArrayForSmallerArray(this.selectedSoftwares.Manufacturers,this.selectedDeviceTypes.Manufacturers)
}else{if(this.selectedDeviceTypes===false&&this.selectedSoftwares!==false){a=this.selectedSoftwares.Manufacturers
}}}this.enableOptionsForOptionsAndAvailable(this.manufacturerArr,a)},showSoftwares:function(){var a=[];
if(this.selectedDeviceTypes!==false&&this.selectedManufacturers===false){a=this.selectedDeviceTypes.SoftwareVersions
}else{if(this.selectedDeviceTypes!==false&&this.selectedManufacturers!==false){a=(this.selectedDeviceTypes.SoftwareVersions.length>this.selectedManufacturers.SoftwareVersions.length)?this.removeOptionsFromLargerArrayForSmallerArray(this.selectedDeviceTypes.SoftwareVersions,this.selectedManufacturers.SoftwareVersions):this.removeOptionsFromLargerArrayForSmallerArray(this.selectedManufacturers.SoftwareVersions,this.selectedDeviceTypes.SoftwareVersions)
}else{if(this.selectedDeviceTypes===false&&this.selectedManufacturers!==false){a=this.selectedManufacturers.SoftwareVersions
}}}this.enableOptionsForOptionsAndAvailable(this.softwareArr,a)},removeOptionsFromLargerArrayForSmallerArray:function(c,a){var b=a;
c.each(function(d){if(b.indexOf(d)==-1){b.slice(d)}});return b},createOption:function(e,a,c,d){var b=$(document.createElement("option"));
if(d!=""){b.setAttribute("name",d)}b.setAttribute("value",e);if(c){b.setAttribute("selected","selected")
}b.appendChild(document.createTextNode(a));return b}};var Cookie={set:function(c,e,b){var a="";
if(b!=undefined){var f=new Date();f.setTime(f.getTime()+(86400000*parseFloat(b)));
a="; expires="+f.toGMTString();path="; path=/"}return(document.cookie=escape(c)+"="+escape(e||"")+a+path)
},get:function(a){var b=document.cookie.match(new RegExp("(^|;)\\s*"+escape(a)+"=([^;\\s]*)"));
return(b?unescape(b[2]):null)},erase:function(a){var b=Cookie.get(a)||true;Cookie.set(a,"",-1);
return b},accept:function(){if(typeof navigator.cookieEnabled=="boolean"){return navigator.cookieEnabled
}Cookie.set("_test","1");return(Cookie.erase("_test")==="1")}};