function showPLmenu(){
	var _html = 
		'<table class="pl_menu" width="100%" border="0" cellpadding="0" cellspacing="0">' + 
		  '<tr>' + 
		  '<td class="pl_menu_left">&nbsp;</td>' + 
		  '<td width="160">' + pl_label['SORT'] + ' ' + 
			'<select id="pl_sort" class="pl_sort" name="sort_by" size="1">' + getSortValue() + '</select>&nbsp;&nbsp;&nbsp;' + 
			'<a id="pl_sortdir" class="pl_sortdir"" href="javascript:void(0)" title="'+pl.sort_dir+'"><img src="'+pl.pl_imgpath+pl.sort_dir+'.gif" border="0"></a>' + 
			'</td>' + 
			'<td class="pl_sep"></td>' + 
			'<td width="130" id="pl_viewnum" class="pl_viewnum">' + 
			'<a href="javascript:void(0)" title="small">' + view['small'][0] + '</a>&nbsp;&nbsp;' + 
			'<a href="javascript:void(0)" title="med">' + view['med'][0] + '</a>&nbsp;&nbsp;' + 
			'<a href="javascript:void(0)" title="large">' + view['large'][0] + '</a>&nbsp;&nbsp;&nbsp;' + pl_label['ITEMS_PER_PAGE'] + 
			'</td>' + 
			'<td class="pl_sep"></td>' + 
			'<td width="130" id="pl_viewbuttons" class="pl_viewbuttons">' + 
			'<a href="javascript:void(0)" title="small"><img src="'+pl.pl_imgpath+'az_pl_button_small.png" border="0" align="middle" width="28px" height="26px" alt="Small"></a> ' + 
			'<a href="javascript:void(0)" title="med"><img src="'+pl.pl_imgpath+'az_pl_button_med.png" border="0" align="middle" width="28px" height="26px" alt="Medium"></a> ' + 
			'<a href="javascript:void(0)" title="large"><img src="'+pl.pl_imgpath+'az_pl_button_large.png" border="0" align="middle" width="28px" height="26px" alt="large"></a>' + 
			'</td>' + 
			'<td class="pl_sep"></td>' +
			'<td width="170">' +
			'<div class="pl_slider_container">' + 
			'<div id="pl_prev" class="pl_prev" title="' + pl_label['PREVIOUS'] + '"></div>' + 
			'<div id="pl_slider" class="pl_slider"><div class="pl_handle"></div></div>' + 
			'<div id="pl_next" class="pl_next" title="' + pl_label['NEXT'] + '"></div></div> ' + 
			'</td>' + 
			'<td><span id="page_result" class="page_result">&nbsp;</span></td>' +
			'<td class="pl_menu_right">&nbsp;</td>' +
		  '</tr>' +
		'</table>';
	return _html;

}

function showPLcontent(pl_data){
	var _html = '';

	switch(pl.view){
		case "med":
		$(pl_data).each(function(){
			_html += '<div id="pro_pro_med"><div id="img"><a href="'+this.link+'" title="'+this.name+'"><img src="'+this.img+'" alt="'+this.name+'" height="120px" width="120px" /></a></div>';
			_html += '<div id="desc"><h3 id="name"><a href="'+this.link+'" title="'+this.name+'">'+this.name+'</a></h3><ul><li id="con"><p>'+this.desc+'</p></li></ul></div><div id="blockbutton"></div>';
			_html += '<div id="button_box"><a class="button" title="View" href="'+this.link+'">View</a>';
			if(this.wishlist)
			_html += '<a href="javascript:;" class="button" onclick="javascript:WishlistCart(\'wishlist_block_list\', \'add\', '+this.id+', \'\', \'1\')">Add to wishlist</a>';
			_html += '</div>';
			
			_html += '</div>';
		});
		break;
		case "large":
		$(pl_data).each(function(){
			_html += '<div id="pro_pro"><div id="img"><a href="'+this.link+'" title="'+this.name+'"><img src="'+this.img+'" alt="'+this.name+'" height="120px" width="120px" /></a></div>';
			_html += '<div id="desc"><h3 id="name"><a href="'+this.link+'" title="'+this.name+'">'+this.name+'</a></h3><ul><li id="con"><p>'+this.desc+'</p></li></ul></div><div id="blockbutton"></div>';
			_html += '<div id="button_box"><a class="button" title="View" href="'+this.link+'">View</a>';
			if(this.wishlist)
			_html += '<a href="javascript:;" class="button" onclick="javascript:WishlistCart(\'wishlist_block_list\', \'add\', '+this.id+', \'\', \'1\')">Add to wishlist</a>';
			_html += '</div>';
			
			_html += '</div>';
		});
		break;
		case "small":
		$(pl_data).each(function(){
			_html += '<div id="pro_pro_small"><div id="img"><h3 id="name"><a href="'+this.link+'"  title="'+this.name+'">'+this.name+'</a></h3><a href="'+this.link+'"  title="'+this.name+'"><img src="'+this.img+'" alt="'+this.name+'" height="120px" width="120px" /></a><div id="button_box"><a class="button" title="View" href="'+this.link+'">View</a>';

			if(this.wishlist)
			_html += '<a href="javascript:;" class="button" onclick="javascript:WishlistCart(\'wishlist_block_list\', \'add\', '+this.id+', \'\', \'1\')">Add to wishlist</a>';
			_html += '</div></div><div id="desc"></div><div id="blockbutton"></div>';
			_html += '</div>';
		});
		break;
	}
	$("#pl_content").html(_html);
}

function getSortValue(){
	var opt = "";
	opt += '<option value="id_product"'+(pl.sortby=="id_product" ? ' selected="selected"' : '' )+'>'+pl_label['LATEST']+'</option>' +
		 '<option value="num"'+(pl.sortby=="num" ? ' selected="selected"' : '' )+'>Popular</option>' +
	'<option value="name"'+(pl.sortby=="name" ? ' selected="selected"' : '' )+'>'+pl_label['NAME']+'</option>';

	return opt;
}

