var xmlHttp;function compareSelectedItems(){document.compareItemsForm.submit();}function compareSelectedItemsFromSameKeyword(form) {form.submit();}function addOrRemoveCompare(checkboxObj,productId,contextRoot){xmlHttp=GetXmlHttpObject();var contextPath=contextRoot+"/common";var action = "addToCompare";if(!checkboxObj.checked) action = "removeFromCompare";if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=contextPath+"/addOrRemoveCompare.jsp";url=url+"?productId="+productId;url=url+"&action="+action;xmlHttp.onreadystatechange=stateChanged;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChanged(){if (xmlHttp.readyState==4){}}function stateChanged(){if (xmlHttp.readyState==4){document.getElementById("txtHint").innerHTML=xmlHttp.responseText;}}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}var validQuantityIds=new Array();function addMultipleItemsToCartFormSubmit(frmObj){this.getElementsById();var quantities=validQuantityIds;for(var i=0;i<quantities.length;i++){frmObj[quantities[i].name].value=quantities[i].value;}}function getElementsById(){var length=document.getElementById("formCount").value;for(var i=0;i<length;i++){this.validQuantityIds[this.validQuantityIds.length++]=document.getElementById("quantity2"+i);}}
