			
function FilterProducts(type)
{			
    var comboBox = document.getElementById("technologylist");
    var val = comboBox.options[comboBox.selectedIndex].value;
    var url = val;
    /*
    if (val != "ProductList.aspx?fprint=yes" && val != "ProductList.aspx?wired=2")	
    url += "&selectedindex=" + comboBox.selectedIndex;
    */
    document.location.href = url; 
}


function Compare(Tech,PrimaryFeature)
{
    //kevin,05/06/2008
    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
        xmlDoc.async = false;
        xmlDoc.load("/uk/hardware/_common/data/js_page_resources.xml");
        var a = xmlDoc.getElementsByTagName("root")[0];
        
        var alertMsg= a.getElementsByTagName("alertMsg")[0].firstChild.nodeValue;
        var alertMsg2= a.getElementsByTagName("alertMsg2")[0].firstChild.nodeValue;
    //end kevin
    
    var controls = document.Form1.elements;
    var amountChecked = 0;
    var newHref = "/uk/hardware/mouseandkeyboard/ProductComparison.aspx?type=" + Tech+"&PrimaryFeature="+PrimaryFeature;
    newHref += "&pid=";

    for (var i=0; i<controls.length; i++)
    {
        if (controls[i].type == "checkbox" && controls[i].name.indexOf("comparechk") != -1 &&  controls[i].checked )
        {
        amountChecked++;
        newHref += "_" + controls[i].value;
        //newHref = newHref +  "&pid" + amountChecked + "=" + controls[i].value;
        }
    }
    if (amountChecked == 0)				
        alert (alertMsg2);
        else if (amountChecked == 1) {
        alert (alertMsg);
        } 
    else
     {
    document.location.href = newHref;
     }

}