/* * @author Gproxy Design Inc. * @copyright (c) 2009, Gproxy Design Inc. All rights reserved. * @version 2.5 * * Gproxy doesn't allow to copy or change this code without Gproxy authorization. * See http://www.gproxy.com/licenses/license01.pdf for the full license governing this code. */ function rviGetItems(B,C){var A=rviReadCookie("rvi_n"+B);if(A!=null&&A!=""){$j("#rvi_cnt_items").hide();var D="/app/site/hosting/scriptlet.nl?script=customscript_gpr_ss_rvi_getitems&deploy=customdeploy_gpr_ss_rvi_getitems&items="+A+"&sitenumber="+B+"&callback=?";$j.ajax({url:D,type:"GET",dataType:"jsonp",success:function(E){if(E.Errors.length>0){$j.each(E.Errors,function(F,G){rviErrorManager("Show Items",G.code,G.details)})}else{$j.each(E.Results,function(F,G){$j("#rvi_cnt_items").html(unescape(G.html))});intCntItems=E.Items.length;$j.each(E.Items,function(F,G){$j.ajax({url:unescape(G.url),type:"GET",dataType:"html",success:function(K){var I=K;strStart="";intI=I.indexOf(strStart);intF=I.indexOf(strEnd);var J=" ";if(intI!=-1&&intF!=-1){intI+=strStart.length;J=I.substring(intI,intF)}$j("#rvi_price_"+G.internalid).html(unescape(J));strStart="";intI=I.indexOf(strStart);intF=I.indexOf(strEnd);var H=" ";if(intI!=-1&&intF!=-1){intI+=strStart.length;H=I.substring(intI,intF)}$j("#rvi_stkmessage_"+G.internalid).html(unescape(H))},complete:function(H,I){intCntItems--;if(intCntItems<=0){$j.ajax({url:document.location.href,type:"GET",dataType:"html",success:function(J){$j("#rvi_cnt_items").fadeIn(1000)},error:function(J,L,K){rviErrorManager("Get Item Info",L,K)}})}},error:function(H,J,I){rviErrorManager("Get Item Info",J,I)}})})}},error:function(E,G,F){wlpErrorManager("Show Items",G,F)}})}}function rviSaveItemCookie(F,B){var D="";var E="";var C=false;if(F!=""){E=rviReadCookie("rvi_n"+B);if(E==null){D=F}else{items=E.split(",");for(var A=0;A0){c_start=document.cookie.indexOf(A+"=");if(c_start!=-1){c_start=c_start+A.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return null}function rviEraseCookie(A){rviCreateCookie(A,"",10)}function rviErrorManager(B,C,A){$j("#rvi_cnt_msgerror").append("
  • Recently Viewed Items Error, "+B+", code: "+unescape(C)+", details: "+unescape(A)+"
  • ")};