/** browsecollection - Mon 05/03/2010 14:38:38.51 */
function isDate($sDDDay,$sDDMonth,$sDDYear){var dDate=new Date($sDDMonth+"/"+$sDDDay+"/"+$sDDYear);if($sDDMonth<1||$sDDMonth>12){return 1}if($sDDDay<1||$sDDDay>31){return 2}if(($sDDMonth==4||$sDDMonth==6||$sDDMonth==9||$sDDMonth==11)&&$sDDDay==31){return 3}if($sDDMonth==2){var isleap=($sDDYear%4==0&&($sDDYear%100!=0||$sDDYear%400==0));if($sDDDay>29||($sDDDay==29&&!isleap)){return 4}}if(dDate.toString()=="NaN"||dDate.toString()=="Invalid Date"){return 5}else{return 6}}function resetCS(){try{document.forms.GProductSearch.iCS.value=""}catch(e){}}$(document).ready(function(){$(".modalBORROW").cluetip({activation:"click",showTitle:false,cursor:"pointer",width:"500px",arrows:true,closePosition:"top",sticky:true,ajaxCache:false,closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".saveandcloseBorrow").click(function(){$("#cluetip-close").click()});$(".sendrequestandclose").click(function(){$iProductUnq=$("#iBProductUnq").val();$iVAU=$("#iBVAU").val();$sBMessageF=$("#sBMessageF").val();if($iProductUnq!=""){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowrequest.php",data:"iProductUnq="+$iProductUnq+"&iVAU="+$iVAU+"&sM="+encodeURIComponent($sBMessageF),success:function(xml){$("response>sData>datanode",xml).each(function(){if($("value",this).text()=="1"){$("#BorrowMsg_"+$iVAU+"_"+$iProductUnq).hide();$("#BorrowMsg_"+$iVAU+"_"+$iProductUnq+"b").show()}});$("#cluetip-close").click()},beforeSend:function(xml){$("#BRStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#BRStat").attr({src:"/images/blank.gif"})}})}$("#cluetip-close").click()})}});jQuery.fn.openTools=function(iProductUnq){$("#toolsLink"+iProductUnq).unbind();$bPublic=$("#toolsLink"+iProductUnq).attr("bPublic");$("#toolsLink"+iProductUnq).attr({rel:"/userarea/lists/products/modaltools.php?iProductUnq="+iProductUnq+"&bPublic="+$bPublic});$("#toolsLink"+iProductUnq).bgiframe().cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"270px",topOffset:-40,arrows:false,closePosition:"top",sticky:true,ajaxCache:false,positionBy:"auto",closeText:'<img src="/images/blank.gif" />',dropShadow:false,onShow:function(ct,c){$("#toolsLink"+iProductUnq).blur();$("#saveandcloseTools").click(function(){$("#cluetip-close").click()});$("#toolHeaderCancel").click(function(){$("#toolMsg").html("");$("#toolBody").html("");$("#toolMenu").show();$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").hide()});$("#showTEdit").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadEdit.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/editIcon.png"});$("#toolHeaderCancel").show();$("#editItem").click(function(){var $sData="iProductUnq="+iProductUnq+"&dOP="+$("#dOPF").val()+"&dP="+$("#sYourPriceF").val()+"&iQ="+$("#iQuantityF").val()+"&sPID="+encodeURIComponent($("#sPersonalIDF").val())+"&iGS="+$("#iGStoreUnqF").val()+"&sUS="+encodeURIComponent($("#sUserStoreF").val())+"&iT="+$("#iTypeF").val()+"&iR="+$("#iRatingF").val()+"&sN="+encodeURIComponent($("#sNoteF").val())+"&iBS="+$("#iBookStatusF").val()+"&iSS="+$("#iSaleStatusF").val()+"&iOS="+$("#iOwnershipStatusF").val()+"&iMUS="+$("#iMusicStatusF").val()+"&iMOS="+$("#iMovieStatusF").val()+"&iWS="+$("#iWineStatusF").val()+"&iSoftS="+$("#iSoftwareStatusF").val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/edititem.php",data:$sData,success:function(xml){$("response>sData>datanode",xml).each(function(){if(bIsManager){$sValue3=$("value3",this).text();if($sValue3!=""){$("#Col4_"+iProductUnq).html("<span id='Col4R_"+iProductUnq+"' rel='/ap/ratepopup.php?iP="+iProductUnq+"'>"+$sValue3+"</span>");$("#Col4R_"+iProductUnq).cluetip({showTitle:false,cursor:"pointer",width:"225px",arrows:false,clickThrough:true})}}$("#toolMsg").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Saved");$("#toolBody").html("");$("#toolMenu").show();$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").hide()})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$(".showTCL").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadCL.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/iconCL.gif"});$("#toolHeaderCancel").show();$(".clAddAUnqW").click(function(){$iSubCollectionUnq=$(this).attr("iSubCollectionUnq");$objInput=$(this).children(".clAddAUnq");$iCLCount=eval($("#clCount"+iProductUnq).attr("iCount"));if($objInput.attr("src").indexOf("/images/checkOn.png")>-1){$objInput.attr({src:"/images/checkOff.png"});$iCLCount=$iCLCount-1;if($iCLCount<=0){$("#showTNotInCL").show();$("#showTInCL").hide()}$("#clCount"+iProductUnq).attr("iCount",$iCLCount)}else{$objInput.attr({src:"/images/checkOn.png"});$("#showTNotInCL").hide();$("#showTInCL").show();$iCLCount=$iCLCount+1;$("#clCount"+iProductUnq).attr("iCount",$iCLCount)}$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/customlist/cl_addto.php",data:"iSubCollectionUnq="+$iSubCollectionUnq+"&iProductUnq="+iProductUnq,beforeSend:function(xml){$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$("#showTGL").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadGL.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/blueGift.gif"});$("#toolHeaderCancel").show();$(".glAddAUnqW").click(function(){$iAccountUnq=$(this).attr("iAccountUnq");$objInput=$(this).children(".glAddAUnq");if($objInput.attr("src").indexOf("/images/checkOn.png")>-1){$objInput.attr({src:"/images/checkOff.png"})}else{$objInput.attr({src:"/images/checkOn.png"})}$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/gift_addto.php",data:"iAccountUnq="+$iAccountUnq+"&iProductUnq="+iProductUnq,beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$(".showTWL").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadWL.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/yellowStar.gif"});$("#toolHeaderCancel").show();$(".wlAddAUnqW").click(function(){$iWishlistUnq=$(this).val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/wish_addto.php",data:"iWishlistUnq="+$iWishlistUnq+"&iProductUnq="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){if($("value",this).text()=="1"){$("#toolMsg").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Added to Wish List");$("#toolBody").html("");$("#showTInWL").show();$("#showTNotInWL").hide();$("#toolMenu").show();$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").hide()}})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$("#showTC").click(function(){$.ajax({type:"GET",dataType:"json",url:"/ap/add_gproduct2.php",data:"iP="+iProductUnq,success:function(json){$.each(json.results,function(k,iAU){if(iAU!="0"){jQuery.noticeAdd({iAU:iAU})}});$("#AddToInventory_"+iProductUnq).hide();$("#AddToInventory_"+iProductUnq+"b").show();$("#cluetip-close").click()}})});$("#showTILoan").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadILoan.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/icons/Borrow.gif"});$("#toolHeaderCancel").show();$iAccountUnq=0;$(".ilClickFriend").click(function(){if($iAccountUnq>0){$("#ilClickFriend"+$iAccountUnq).children(".ilFriend").attr({src:"/images/checkOff.png"})}$iAccountUnq=$(this).attr("iAccountUnq");$(this).children(".ilFriend").attr({src:"/images/checkOn.png"});$("#sNonMemberF").val("")});$("#sNonMemberF").keydown(function(e){$("#ilClickFriend"+$iAccountUnq).children(".ilFriend").attr({src:"/images/checkOff.png"});$iAccountUnq=0});$(".sendandcloseIL").click(function(){$sNonMember=$("#sNonMemberF").val();$sStipulations=$("#sStipulationsF").val();$sDDDay=$("#sDDDay").val();$sDDMonth=$("#sDDMonth").val();$sDDYear=$("#sDDYear").val();$("#toolDateError").hide();switch(isDate($sDDDay,$sDDMonth,$sDDYear)){case 1:$("#toolDateError").html("Month must be between 1 and 12.").show("slow");break;case 2:$("#toolDateError").html("Day must be between 1 and 31.").show("slow");break;case 3:$("#toolDateError").html("Please select a valid date.").show("slow");break;case 4:$("#toolDateError").html("February "+$sDDYear+" doesn't have "+$sDDDay+" days.").show("slow");break;case 5:$("#toolDateError").html("Not a valid Date").show("slow");break;case 6:$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowed/initiateloan.php",data:"iProductUnq="+iProductUnq+"&iAccountUnq="+$iAccountUnq+"&sDDDay="+$sDDDay+"&sDDMonth="+$sDDMonth+"&sDDYear="+$sDDYear+"&sStipulations="+encodeURIComponent($sStipulations)+"&sNonMember="+encodeURIComponent($sNonMember),success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolMsg").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Loan saved");$("#toolBody").html("");$("#showTILoan").hide();$("#showTMLoan").show();$("#toolMenu").show();$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").hide()})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}});break}})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$("#showTMLoan").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/toolsLoadMLoan.php",data:"iPU="+iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#toolBody").html($("value",this).text());$("#toolHeaderImg").attr({src:"/images/redExclaim.gif"});$("#toolHeaderCancel").show();$("#showLoanRM").click(function(){$("#loanRM").toggle("slow");$("#loanRMclose").show("slow");$("#loanReturned1").toggle("slow");$("#loanReturned2").toggle("slow");$("#showLoanRM").hide("slow");$("#iLConditionReturned").val("")});$("#loanRMclose").click(function(){$("#loanRM").toggle("slow");$("#loanRMclose").hide("slow");$("#loanReturned1").toggle("slow");$("#loanReturned2").toggle("slow");$("#showLoanRM").show("slow");$("#sLMessageF").val("")});$(".sendBorandclose").click(function(){$iBorrowedLineItemUnq=$("#iLBorrowedLineItemUnq").val();$sLMessageF=$("#sLMessageF").val();$iConditionReturned=$("#iLConditionReturned").val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowed/modifyloan.php",data:"iProductUnq="+iProductUnq+"&iBorrowedLineItemUnq="+$iBorrowedLineItemUnq+"&iConditionReturned="+$iConditionReturned+"&sM="+encodeURIComponent($sLMessageF),success:function(xml){$("response>sData>datanode",xml).each(function(){$sValue=$("value",this).text();if($sValue=="c"){$("#toolMsg").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Loan cleared");$("#showTILoan").show();$("#showTMLoan").hide();$("#ModLoanDel_"+iProductUnq).hide()}else{$("#toolMsg").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Reminder sent")}$("#toolBody").html("");$("#toolMenu").show();$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").hide()})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})})})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});$("#showTHide").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_makeprivate.php",data:"iProductUnq="+iProductUnq,success:function(xml){$("#toolsLink"+iProductUnq).attr("bPublic","0");$("#divTHide").hide();$("#divTReveal").show()},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})});$("#showTReveal").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_makepublic.php",data:"iProductUnq="+iProductUnq,success:function(xml){$("#toolsLink"+iProductUnq).attr("bPublic","1");$("#divTHide").show();$("#divTReveal").hide()},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"})}})});$("#showTDel").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/del.php",data:"sAction=D&iProductUnq="+iProductUnq+"&iCS="+iCS+"&iVAU="+iVAU+"&sFormName=GProductSearch",success:function(xml){$("response>sData>datanode",xml).each(function(){})},complete:function(xml){$("#DelInventory_"+iProductUnq).hide();$("#DelInventory_"+iProductUnq+"b").show();$("#RDropDown_"+iProductUnq).hide();$("#ModLoanDel_"+iProductUnq).hide();$("#CListDel_"+iProductUnq).hide();$("#cluetip-close").click()}})}).confirm({dialogShow:"fadeIn",dialogSpeed:"slow",msg:"Are you sure?&nbsp;&nbsp;",buttons:{cancel:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[No]</span>',ok:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[Yes]</span>',separator:"&nbsp;&nbsp;"}});$("#showTKeep").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/importmanagement/keepimport.php",data:"iProductUnq="+iProductUnq+"&sFormName=GProductSearch",success:function(xml){$("#toolsLink"+iProductUnq).attr("bPublic","0");$("#divTImports").hide()}})});$("#showTSwap").click(function(){$.ajax({type:"POST",dataType:"html",url:"/userarea/lists/importmanagement/swapmodal.php",data:"iSourceProductUnq="+iProductUnq+"&iImportSource=0&iOriginalCS="+iCS,success:function(html){$("#toolBody").html(html);$("#toolHeaderImg").attr({src:"/images/blank.gif"});$("#toolHeaderCancel").show();$(".saveswapandclose").click(function(){$iImportResultsUnq=$(this).attr("iImportResultsUnq");$iProductUnq=$(this).attr("iProductUnq");$iOriginalCS=$(this).attr("iOriginalCS");$iSourceProductUnq=$(this).attr("iSourceProductUnq");$iImportSource=$(this).attr("iImportSource");if($iProductUnq!=""){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/importmanagement/swap_item.php",data:"iSourceProductUnq="+$iSourceProductUnq+"&iImportResultsUnq="+$iImportResultsUnq+"&iProductUnq="+$iProductUnq+"&iImportSource="+$iImportSource+"&iOriginalCS="+$iOriginalCS,success:function(xml){$("response>sData>datanode",xml).each(function(){if($("value",this).text()=="1"){$("#ModTools_"+iProductUnq).hide();$("#Source_"+iProductUnq).hide();$("#Col4_"+iProductUnq).hide();$("#DelInventory_"+iProductUnq).hide();$("#RDropDown_"+iProductUnq).hide();$("#ModLoanDel_"+iProductUnq).hide()}$("#cluetip-close").click()})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})}})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})});jQuery.fn.nextPG=function(iDirection){$iPN=eval($("#iPN").val())+iDirection;$iCS=$("#iCS").val();$iSourceProductUnq=$("#iSourceProductUnq").val();$iImportSource=$("#iImportSource").val();$iOriginalCS=$("#iOriginalCS").val();$iMaxPage=$("#iMaxPage").val();$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/lists/importmanagement/swapmodal.php",data:"iSourceProductUnq="+$iSourceProductUnq+"&iOriginalCS="+$iOriginalCS+"&iImportSource="+$iImportSource+"&iCS="+$iCS+"&iPN="+$iPN,success:function(sHTML){$("#modalCGBody").html(sHTML);$("#iPN").val($iPN);if($iMaxPage>=$iPN){$("#modalCGpage").html("<span class='bodyCopyBold'>"+$iPN+"</span>")}if($iMaxPage>$iPN){$("#modalCGNextOn").show();$("#modalCGNextOff").hide()}else{$("#modalCGNextOn").hide();$("#modalCGNextOff").show()}if($iPN>1){$("#modalCGBackOn").show();$("#modalCGBackOff").hide()}else{$("#modalCGBackOn").hide();$("#modalCGBackOff").show()}},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide();$(".saveswapandclose").click(function(){$iImportResultsUnq=$(this).attr("iImportResultsUnq");$iProductUnq=$(this).attr("iProductUnq");$iOriginalCS=$(this).attr("iOriginalCS");$iSourceProductUnq=$(this).attr("iSourceProductUnq");$iImportSource=$(this).attr("iImportSource");if($iProductUnq!=""){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/importmanagement/swap_item.php",data:"iSourceProductUnq="+$iSourceProductUnq+"&iImportResultsUnq="+$iImportResultsUnq+"&iProductUnq="+$iProductUnq+"&iImportSource="+$iImportSource+"&iOriginalCS="+$iOriginalCS,success:function(xml){$("response>sData>datanode",xml).each(function(){if($("value",this).text()=="1"){$("#ModTools_"+iProductUnq).hide();$("#Source_"+iProductUnq).hide();$("#Col4_"+iProductUnq).hide();$("#DelInventory_"+iProductUnq).hide();$("#RDropDown_"+iProductUnq).hide();$("#ModLoanDel_"+iProductUnq).hide()}$("#cluetip-close").click()})},beforeSend:function(xml){$("#toolMsg").html("");$("#toolsStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#toolsStat").attr({src:"/images/blank.gif"});$("#toolMenu").hide()}})}})}})}}});if($.browser.msie){var toolsLink=document.getElementById("toolsLink"+iProductUnq);toolsLink.focus()}else{$("#toolsLink"+iProductUnq).focus()}};$(".DEL").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px",clickThrough:true}).click(function(){$iProductUnq=$(this).attr("iProductUnq");$.ajax({type:"POST",dataType:"xml",url:"/ap/del.php",data:"sAction=D&iProductUnq="+$iProductUnq+"&iCS="+iCS+"&iVAU="+iVAU+"&sFormName=GProductSearch",success:function(xml){$("response>sData>datanode",xml).each(function(){$sValue=$("value",this).text();if($sValue!="-1"){$("#Col4_"+$iProductUnq).html("<span id='Col4R_"+$iProductUnq+"' rel='/ap/ratepopup.php?iP="+$iProductUnq+"'>"+$sValue+"</span>");$("#Col4R_"+$iProductUnq).cluetip({showTitle:false,cursor:"pointer",width:"225px",arrows:false,clickThrough:true})}})},beforeSend:function(xml){$("#DelInventory_"+$iProductUnq).hide();$("#DelInventory_"+$iProductUnq+"b").show();$("#statDel"+$iProductUnq).attr({src:"/images/stat.gif"})},complete:function(xml){$("#statDel"+$iProductUnq).attr({src:"/images/tick.gif"});$("#RDropDown_"+$iProductUnq).hide();$("#Keep_"+$iProductUnq).hide();$("#Swap_"+$iProductUnq).hide();$("#ModLoanDel_"+$iProductUnq).hide();$("#CListDel_"+$iProductUnq).hide()}})}).confirm({dialogShow:"fadeIn",dialogSpeed:"slow",msg:"Are&nbsp;you<br>sure?<br>",buttons:{cancel:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[No]</span>',ok:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[Yes]</span>',separator:"&nbsp;"}});$(".ADD").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px",clickThrough:true});$(".LOANIcon").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px"});$(".OUTLOANIcon").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px",clickThrough:true});$(".OUTLOANLAUIcon").cluetip({showTitle:false,local:true,cursor:"pointer",width:"250px"});$(".KEEP").cluetip({showTitle:false,local:true,cursor:"pointer",width:"150px",clickThrough:true});$(".SortHelp").cluetip({showTitle:false,local:true,cursor:"pointer",width:"300px",clickThrough:true});if(bIsManager){$(".OUTLOANOIcon").cluetip({showTitle:false,local:true,cursor:"pointer",width:"250px",clickThrough:true})}$(".AddIt").live("click",function(){var iP=$(this).attr("iP");$.ajax({type:"GET",dataType:"json",url:"/ap/add_gproduct2.php",data:"iP="+iP,success:function(json){$("#AddToInventory_"+iP).hide();$("#AddToInventory_"+iP+"b").show();$.each(json.results,function(k,iAU){if(iAU!="0"){jQuery.noticeAdd({iAU:iAU})}})}})});$("#sGP").live("change",function(){$("#iGP"+C_BOOK+"Div, #iGP"+C_MOVIE+"Div, #iGP"+C_MUSIC+"Div, #iGP"+C_WINE+"Div, #iGP"+C_SOFTWARE+"Div").hide();switch(eval($(this).val())){case C_MOVIE:$("#iGP"+C_MOVIE+"Div").show();break;case C_BOOK:$("#iGP"+C_BOOK+"Div").show();break;case C_MUSIC:$("#iGP"+C_MUSIC+"Div").show();break;case C_SOFTWARE:$("#iGP"+C_SOFTWARE+"Div").show();break;case C_WINE:$("#iGP"+C_WINE+"Div").show();break}})});