function RemoveMyList(a){alert(a+document.getElementById(a).style.visibility);document.getElementById(a).style.visibility="hidden"}function AjaxAddList(a,c,e){var d=document.getElementById("tbLINKID").selectedIndex;if(c.length==0){if(d==-1||d==0){alert("error")}else{var f=document.getElementById("tbLINKID")[d].value;var b=document.getElementById("tbLINKID").options[d].text;postAddListData(f,b,c,e)}}else{postAddListData("","",c,e)}}function postAddListData(a,c,b,e){url="Ajax.aspx?CN=971EC8C2B4D4&EN=28CC43CF9478&PRODUCTID="+e+"&LISTNAME="+b+"&LINKID="+a;var d=getFormDataFromElement("AddListContainer");$.ajax({type:"POST",url:url,data:d,success:function(f){if(b.length==0){b=c}$("#SucessMessage").html('<table align="center" height="50"><tr><td> This product is added to your list:'+b+'</td></tr><tr><td align="center" ><input type="button" id="btnOK" onclick="HideWindow();" value="Ok" style="width:40;" /></td></tr></table>');$("#EnterListName").hide();$("#ListDropDown").hide();$("#divButton").hide()}})}function AjaxAddListPopUp(c,b){var a="Ajax.aspx?CN=971EC8C2B4D4&PRODUCTID="+c;AjaxLoad(a,"AddListContainer","Dialog();")}function HideWindow(){$("#AddListContainer").dialog("close")}function Dialog(){$("#AddListContainer").dialog({bgiframe:true,draggable:true,width:500,resizable:false,modal:false,position:"center",closeOnEscape:true});$("#EnterListName").show();$("#AddListContainer").dialog("open");$("#tbLISTNAME").val("");return false}function DeleteOrderSheetItem(c,e,a,b){alert("count"+c);document.getElementById("tbISDELETE").value="1";var d=getFormDataFromElement("dvOrderSheetList"+c);d=d.replace("tbISDELETE=0","tbISDELETE=1");url="Ajax.aspx?CN=4D50DCB54258&EN=AE0515BE2211";$.ajax({type:"POST",url:url,data:d,success:function(f){window.location="Portal.aspx?CN=4D50DCB54258&P1=M&P4="+a+"&P2="+e}})}function AjaxLoadWithScript(Url,Field,JavaFunction){var t=Math.random()+"";Url+="&RND="+t.replace("0.","");var xmlHttp;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){return}xmlHttp.onreadystatechange=function(JavaFunction){return function(){if(xmlHttp.readyState!=4){return}if(xmlHttp.status==200){if(document.getElementById(Field)!=undefined||""){document.getElementById(Field).innerHTML=xmlHttp.responseText}var main=document.getElementById(Field);var scripts=main.getElementsByTagName("script");for(i=0;i<scripts.length;i++){eval(scripts[i].innerHTML)}if(JavaFunction!=undefined){try{eval(JavaFunction)}catch(e){}}}}}(JavaFunction);xmlHttp.open("GET",Url,true);xmlHttp.send(null)};
