function showOverlay(overLayParam,storeId,catalogId,catEntryId,childCatEntryId,name,image,currPrice,partNumber,bundleString,bundleFlag){

	var remoteUrl = 'IOwnThisCmd?langId=-1&storeId='+storeId+'&catalogId='+catalogId+'&catentry_id='+catEntryId+'&listType='+overLayParam+'&displayPrice='+currPrice+'&partNumber='+partNumber+bundleString+'&bundleFlag='+bundleFlag;
	request = $.getJSON(remoteUrl,showResponse);  

		function showResponse(jsonResponse){	
				
				var products = jsonResponse.prodList;				
				var prodListLength = products.length;				
				var path = jsonResponse.status;	
				var catEntryId_1 = jsonResponse.childCatentryId;
							
				var prodName = name.replace(/&#39;/g,"'");
				prodName = prodName.replace(/&quot;/g,'"');
				prodName = prodName.replace(/&comma;/g,',');
				
						
			if(path != "FAILURE"){
			
				if(overLayParam == "MyWishlist"){
					
					var overlayWishList =         			
								'<div class="lightboxBody addToolbox">'+
								'<div class="lb_header">'+
								'<span>This Item Has Been Added to Your Wishlist</span>'+
								'<a class="close" onclick="hidebox(\'#lb_addwishlist\');" href="javascript:void(0)">Close</a>'+
								'<div class="clear"/>'+
								'</div>'+
								'</div>'+
								'<div class="lb_content">'+
								'<img height="100" width="110" class="floatLeft" alt="Craftsman 6.75 Torque 22 in. Deck Rear Bag Front Propelled Lawn Mower with High Wheels" src='+image+'>'+
								'</img>'+
								'<div class="itemToolbox">'+
								'<h5>'+prodName+'</h5>'+
								'<div class="buttons">'+
								//START - UNIVERSAL PROFILE CHANGE - UPDATE PAGE FLAG
								'<a class="visitWishlist" href="InterestItemDisplayCmd?langId=-1&storeId='+storeId+'&catalogId='+catalogId+'&listId=.&pageFlag=ToolsIOwn&cmdStoreId=10153" href="#">Visit My Wishlist</a>'+
								//END   - UNIVERSAL PROFILE CHANGE - UPDATE PAGE FLAG
								'<a class="keepShopping" onclick="hidebox(\'#lb_addwishlist\');" href="#">Keep Shopping</a>'+
								'</div>'+
								'</div>'+
								'<div class="clear"></div>';
					}
							
				else{			
				 	
				 	var overlayIOwnThis = 
								'<div class="lightboxBody addToolbox">'+							
								'<div class="lb_header">'+
								'<span>This Item Has Been Added to My Toolbox</span>'+
								'<a class="close" onclick="hidebox(\'#lb_addtoolbox\');" href="javascript:void(0)">Close</a>'+
								'<div class="clear"/>'+
								'</div>'+
								'</div>'+						
								'<div class="lb_content">'+
								'<img height="100" width="110" class="floatLeft" alt="Craftsman 6.75 Torque 22 in. Deck Rear Bag Front Propelled Lawn Mower with High Wheels" src='+image+'>'+
								'</img>'+						
								'<div class="itemToolbox">'+
								'<h5>'+prodName+'</h5>'+									
								'<div class="buttons">'+
								'<a class="visitToolbox" href="InterestItemDisplayCmd?langId=-1&storeId='+storeId+'&catalogId='+catalogId+'&listId=.&pageFlag=ToolsIOwn&cmdStoreId=10153">Visit My Toolbox</a>'+
								'<a class="keepShopping" onclick="hidebox(\'#lb_addtoolbox\');" href="#">Keep Shopping</a>'+
								'</div>'+									
								'</div>'+						
								'<div class="clear"></div>';
				}
			}				
			
			
			if(prodListLength>0){
				
					if(overLayParam == "MyWishlist"){							
		
							overlayWishList = overlayWishList +
							'<div class="lb_sectionHeader">You Might Also Like:</div>'+
							'<ul class="lb_related">';
					
							for(var i=0;i<prodListLength;i++){
								
								var img = products[i].imgURL;
								img = img + '?hei=100&wid=110&op_sharpen=1&qlt=75';
							
								overlayWishList = overlayWishList +
								'<li class="lightbox-item">'+
								'<a href="'+products[i].prodUrl+'"><img  height="100" width="110" src='+img+'>'+
								'</img></a>'+
								'<p>'+
								'<a href="'+products[i].prodUrl+'">'+products[i].title+'</a>'+
								'</p>'+
								'<p class="price">$'+formatCurrency(products[i].currPrice)+'</p>'+
								'</li>';
							}
					
								overlayWishList = overlayWishList +
								'<li class="clear"/>'+
								'</ul>'+
								'<div class="clear"/>'+
								'</div>'+
								'</div>'; 
						
							if(!document.getElementById('lb_addwishlist')){
								var containerDiv = document.createElement('div');
								containerDiv.id = 'lb_addwishlist';
								containerDiv.className = 'lightbox';
						        containerDiv.style.left = '289px';
						        containerDiv.style.top =  '186px';
						        containerDiv.style.display = 'block';
						   		document.body.appendChild(containerDiv); 
					   		}
								
								var thisDIV = document.getElementById('lb_addwishlist');
								thisDIV.innerHTML=overlayWishList;
								showbox('#lb_addwishlist');
								
					}
				
					else{				
					
							overlayIOwnThis = overlayIOwnThis +
							'<div class="lb_sectionHeader">You Might Also Like:</div>'+						
							'<ul class="lb_related">';
							
							if(prodListLength >3){
								prodListLength=3;
							}
							for(var i=0;i<prodListLength;i++){
							
								var img = products[i].imgURL;
								img = img + '?hei=100&wid=110&op_sharpen=1&qlt=75';
						
								overlayIOwnThis = overlayIOwnThis +								
								'<li class="lightbox-item">'+
								'<a href="'+products[i].prodUrl+'"><img  height="100" width="110" src='+img+'>'+
								'</img></a>'+
								'<p>'+
								'<a href="'+products[i].prodUrl+'">'+products[i].title+'</a>'+
								'</p>'+
								'<p class="price">$'+formatCurrency(products[i].currPrice)+'</p>'+
								'</li>';
							}					
						
								overlayIOwnThis = overlayIOwnThis +
								'<li class="clear"/>'+
								'</ul>'+						
								'<div class="clear"/>'+
								'</div>'+
								'</div>';						 
							
							
							if(!document.getElementById('lb_addtoolbox')){
								var containerDiv = document.createElement('div');
								containerDiv.id = 'lb_addtoolbox';
								containerDiv.className = 'lightbox';
					        	containerDiv.style.left = '289px';
					        	containerDiv.style.top =  '186px';
					        	containerDiv.style.display = 'block';
					   			document.body.appendChild(containerDiv); 
							}
							
							var thisDIV = document.getElementById('lb_addtoolbox');
							thisDIV.innerHTML=overlayIOwnThis; 
							showbox('#lb_addtoolbox');							
							
					}
		
			}
			else if(path == "REDIRECT"){
				
					function enCodeUrl(url){
	    
					    var strValue = "";
					    var urlLen = url.length;
					     
					    for(var i=0;i<urlLen;i++){         
					       var ch = url.charAt(i);
					       
					       if(ch=="="){
					            strValue = strValue + "%3d";
					       }
					       else if(ch=="&"){
					            strValue = strValue + "%26";
					       }
					       else{
					            strValue =  strValue + ch;
					       }
					    }
					    return strValue;
					}			
					
					var logonUrl = "LogonForm?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&URL=";
	   				
	   				var addToWishlistUrl = "";
	   				
	   					   				
	   				var prodUrl="p_"+storeId+"_"+catalogId+"_"+partNumber;
	   				
	   				if(bundleFlag == "false"){
	   				
		   				if(overLayParam == "MyWishlist"){
		   				addToWishlistUrl = "AddToWishlist?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&partNumber="+partNumber+"&productURL="+prodUrl+"&guest=1&URL=AddToWishListSuccessView&errorViewName=AddToWishListErrorView&redirectView=AddToWishListRedirectView&catEntryId_1="+catEntryId_1+"&quantity_1=1&pageFrom=0&parentCatId="+catEntryId+"&listType=Wishlist";	   				
		   				}
		   				else{
		   				addToWishlistUrl = "AddToWishlist?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&partNumber="+partNumber+"&productURL="+prodUrl+"&guest=1&URL=AddToWishListSuccessView&errorViewName=AddToWishListErrorView&redirectView=AddToWishListRedirectView&catEntryId_1="+catEntryId_1+"&quantity_1=1&pageFrom=0&parentCatId="+catEntryId+"&listType=ToolsIOwnList";	   				
		   				}
	   				}
	   				else if(bundleFlag == "true"){
	   					if(overLayParam == "MyWishlist"){
							addToWishlistUrl = "AddToWishlist?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&partNumber="+partNumber+"&productURL="+prodUrl+"&guest=1&URL=AddToWishListSuccessView&errorViewName=AddToWishListErrorView&redirectView=AddToWishListRedirectView"+bundleString+"&pageFrom=0&listType=Wishlist&bundleFlag=true";	   					   				
						}
						else{
							addToWishlistUrl = "AddToWishlist?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&partNumber="+partNumber+"&productURL="+prodUrl+"&guest=1&URL=AddToWishListSuccessView&errorViewName=AddToWishListErrorView&redirectView=AddToWishListRedirectView"+bundleString+"&pageFrom=0&listType=ToolsIOwnList&bundleFlag=true";	   					   			
						}	
	   				}
	   				addToWishlistUrl = enCodeUrl(addToWishlistUrl);
	   				window.location = logonUrl+addToWishlistUrl;   				    				 
   				 
	   				 
			}	
			else if(prodListLength == 0 && path == "SUCCESS"){

					if(overLayParam == "MyWishlist"){			
						overlayWishList = overlayWishList +
						'</div>';
						
												
					if(!document.getElementById('lb_addwishlist')){
						var containerDiv = document.createElement('div');
						containerDiv.id = 'lb_addwishlist';
						containerDiv.className = 'lightbox';
				        containerDiv.style.left = '289px';
				        containerDiv.style.top =  '150px';
				        containerDiv.style.display = 'block';
				   		document.body.appendChild(containerDiv); 
				   	}
						
						var thisDIV = document.getElementById('lb_addwishlist');
						thisDIV.innerHTML=overlayWishList;
						showbox('#lb_addwishlist');
			
			}	
				else{
						overlayIOwnThis = overlayIOwnThis +
						'</div>';
						
						if(!document.getElementById('lb_addtoolbox')){
							var containerDiv = document.createElement('div');
							containerDiv.id = 'lb_addtoolbox';
							containerDiv.className = 'lightbox';
				        	containerDiv.style.left = '289px';
				        	containerDiv.style.top =  '150px';
				        	containerDiv.style.display = 'block';
				   			document.body.appendChild(containerDiv); 
						}
							
							var thisDIV = document.getElementById('lb_addtoolbox');
							thisDIV.innerHTML=overlayIOwnThis; 
							showbox('#lb_addtoolbox');							
				}
		
		}
		else if(path == "FAILURE"){
		
			if(overLayParam == "MyWishlist"){
			
				var overlayWishList =         			
							'<div class="lightboxBody addToolbox" style="width:500px;">'+
								'<div class="lb_header">'+
								'<span>This Item Has Not Been Added to Your Wishlist</span>'+
								'<a class="close" onclick="hidebox(\'#lb_addwishlist\');" href="javascript:void(0)">Close</a>'+
								'<div class="clear"/>'+
								'</div>'+
								'</div>'+
								'<div class="lb_content">'+
								'<div class="itemToolbox">'+
								'<h5>'+"An Error occured while adding the item to the WishList"+'</h5>'+
								'<div class="buttons">'+
								'<center>'+
								//START - UNIVERSAL PROFILE CHANGE - UPDATE PAGE FLAG
								'<a class="visitWishlist" href="InterestItemDisplayCmd?langId=-1&storeId='+storeId+'&catalogId='+catalogId+'&listId=.&pageFlag=ToolsIOwn" href="#">Visit My Wishlist</a>'+
								//END   - UNIVERSAL PROFILE CHANGE - UPDATE PAGE FLAG
								'<a class="keepShopping" onclick="hidebox(\'#lb_addwishlist\');" href="#">Keep Shopping</a>'+
								'</center>'+
								'</div>'+
								'</div>'+
								'<div class="clear"></div>'+
								'</div>';		
							
														
							
							if(!document.getElementById('lb_addwishlist')){
								var containerDiv = document.createElement('div');
								containerDiv.id = 'lb_addwishlist';
								containerDiv.className = 'lightbox';
						        containerDiv.style.left = '289px';
						        containerDiv.style.top =  '150px';
						        containerDiv.style.display = 'block';
						   		document.body.appendChild(containerDiv); 
						   	}
						
							var thisDIV = document.getElementById('lb_addwishlist');
							thisDIV.innerHTML=overlayWishList;
							showbox('#lb_addwishlist');		
			
			}
			else{
				
				var overlayIOwnThis = 
								'<div class="lightboxBody addToolbox" style="width:500px;">'+							
								'<div class="lb_header">'+
								'<span>This Item Has Not Been Added to My Toolbox</span>'+
								'<a class="close" onclick="hidebox(\'#lb_addtoolbox\');" href="javascript:void(0)">Close</a>'+
								'<div class="clear"/>'+
								'</div>'+
								'</div>'+						
								'<div class="lb_content">'+														
								'<div class="itemToolbox">'+
								'<h5>'+"An Error occured while adding the item to the Toolbox"+'</h5>'+									
								'<div class="buttons">'+
								'<a class="visitToolbox" href="InterestItemDisplayCmd?langId=-1&storeId='+storeId+'&catalogId='+catalogId+'&listId=.&pageFlag=ToolsIOwn">Visit My Toolbox</a>'+
								'<a class="keepShopping" onclick="hidebox(\'#lb_addtoolbox\');" href="#">Keep Shopping</a>'+
								'</div>'+									
								'</div>'+						
								'<div class="clear"></div>'+
								'</div>';
								
								
								
								if(!document.getElementById('lb_addtoolbox')){
									var containerDiv = document.createElement('div');
									containerDiv.id = 'lb_addtoolbox';
									containerDiv.className = 'lightbox';
						        	containerDiv.style.left = '289px';
						        	containerDiv.style.top =  '150px';
						        	containerDiv.style.display = 'block';
						   			document.body.appendChild(containerDiv); 
								}
							
							var thisDIV = document.getElementById('lb_addtoolbox');
							thisDIV.innerHTML=overlayIOwnThis; 
							showbox('#lb_addtoolbox');	
			
		}
			

	}

}

function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num)) num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10) cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
	num = num.substring(0,num.length-(4*i+3))+','+num.substring(num.length-(4*i+3));
	//alert(num+'.'+cents);
	return (num + '.' + cents);
}

}