if (largeImg !== undefined) { $pc("#mainimg").attr('src', img); if (pcv_strUseEnhancedViews) { $pc("#mainimg").attr("href", largeImg); $pc("#mainimg").parent().attr("href", largeImg); } else { $pc("#mainimg").parent().attr("href", largeImg); $pc("#zoombutton").attr("href", largeImg); } if (pcv_strIsMojoZoomEnabled) { mainImgMakeZoomable(largeImg); } } else { $pc("#mainimg").attr('src', img); mainImgMakeZoomable(img); } } function mainImgMakeZoomable(setLink) { var tmpimg = new Image(); tmpimg.src=document.getElementById("mainimg").src; tmpimg.onload = function(){ var defaultWidth = 256; var defaultHeight = 256; var imageWidth = $pc("#mainimg").outerWidth(); var imageHeight = $pc("#mainimg").outerHeight(); zoomWidth = defaultWidth; zoomHeight = defaultHeight; if (imageWidth < defaultWidth && imageHeight < defaultHeight && imageWidth > 0 && imageHeight > 0) { if (imageWidth < imageHeight) { zoomWidth = imageWidth; zoomHeight = imageWidth; } else { zoomWidth = imageHeight; zoomHeight = imageHeight; } } MojoZoom.makeZoomable(document.getElementById("mainimg"), setLink, '', zoomWidth, zoomHeight, false); } } function New_FormatNumber(tmpvalue) { var DifferenceTotal = new NumberFormat(); DifferenceTotal.setNumber(tmpvalue); if (scDecSign==",") { DifferenceTotal.setSeparators(true,DifferenceTotal.PERIOD); } else { DifferenceTotal.setCommas(true); } DifferenceTotal.setPlaces(2); DifferenceTotal.setCurrency(true); DifferenceTotal.setCurrencyPrefix(scCurSign); return(DifferenceTotal.toFormatted()); } function RmvComma(tmpNum) { var tmp1=tmpNum + ""; if (CommaSign==1) { tmp1=tmp1.replace(/\./gi,""); tmp1=tmp1.replace(/\,/gi,"."); } else { tmp1=tmp1.replace(/\,/gi,""); } tmp1=tmp1.replace(/\$/gi,""); return(Number(tmp1)); } function RepComma(tmpNum) { var tmp1=tmpNum + ""; if (CommaSign==1) { tmp1=tmp1.replace(/\,/gi,"!"); tmp1=tmp1.replace(/\./gi,","); tmp1=tmp1.replace(/\!/gi,"."); } return(tmp1); } var scDecSign="."; var scCurSign="$"; var MyAccept=0; var LowStock=0; var LowPrdName=""; var LowPrdStock=0; var DefaultVAT="$0.00"; var DefaultSku="PRD-KPWPL237-HRT"; var DefaultWeight1=0; var DefaultWeight2=0; var DefaultPrice="$34.30"; var DefaultBackPrice="$0.00"; var DefaultWPrice="$17.15"; var CommaSign=0; var DefaultLPrice=49; var DefaultSavings=14.7; var DefaultSavingsP=30; var DefaultIDPrd=203247; var SelectedSP=0; var SaveList=new Array(); var SaveSKUList=new Array(); var SaveDescList=new Array(); var SaveQtyList=new Array(); var SavedCount=0; var subprd_InActive=0; var subprd_NotAvailablePrd=0; var subprd_OOS=0; var subprd_PrdPrice=0; function makeGrpLevel() { var c=this; c.opt=new Array(); c.name=new Array(); return c } function makeGrp() { var c=this; c.grp=new Array(); c.count=new Array(); return this } function checkSPList() { if (LowPrdStock