function showPLmenu(){var _html='<a name="productos" /><table class="pl_menu" width="100%" border="0" cellpadding="0" cellspacing="0">'+'<tr>'+'<td class="pl_menu_left">&nbsp;</td>'+'<td width="54" class="pl_viewText">&nbsp;&nbsp;Ver:</td>'+'<td width="46"><a href="javascript:void(0);" class="pl_viewbuttons" title="grid">'+'  <img src="'+pl.pl_imgpath+'az_pl_grid.gif" border="0" /></a></td>'+'<td width="42" class="pl_viewText">Grid</td>'+'<td class="pl_menu_sep"></td>'+'<td width="48"><a href="javascript:void(0);" class="pl_viewbuttons" title="list">'+'  <img src="'+pl.pl_imgpath+'az_pl_list.gif" border="0" /></a></td>'+'<td width="30" class="pl_viewText">Lista</td>'+'<td width="180">Org. por: '+'<select id="pl_sort" name="sort_by" size="1">'+getSortValue()+'</select>&nbsp;&nbsp;&nbsp;'+'<a id="pl_sortdir" href="javascript:void(0);" title="'+pl.sort_dir+'">'+'  <img src="'+pl.pl_imgpath+pl.sort_dir+'.gif" border="0" /></a>'+'</td>'+'<td width="150">Productos x pag.: '+'<select id="pl_result" name="pl_result" size="1">'+getPerPageValue()+'</select>'+'</td>'+'<td width="160" id="pl_pagenav">&nbsp;</td>'+'<td class="pl_menu_right">&nbsp;</td>'+'</tr>'+'</table>';return _html;}
function showPLcontent(pl_data){var _html='';var _pbox='';switch(pl.view){case"list":_html+='<table id="pl_list" align="center" border="0" cellspacing="1" cellpadding="2">';if(pl_data.length>0){_html+='<tr>'+'<th align="center">&nbsp;</th>'+'<th align="left">&nbsp;Nombre Prod.&nbsp;</th>'+'<th align="center">&nbsp;Precio&nbsp;</th>'+'</tr>';}else{_html+='<tr class="pl_list_data"><td><p>No hay productos...</p></td></tr>';}
$(pl_data).each(function(i,data){imgpath=pl.imgpath+data['image'];imgDimension=(view[pl.view][1]?'width="'+view[pl.view][1]+'" ':'')+(view[pl.view][2]?'height="'+view[pl.view][2]+'" ':'');_html+='<tr class="pl_list_data">'+'<td align="center">'+'<a href="product_info.php?products_id='+data['id']+'&'+pl.params+'" title="Ver producto">'+'<img src="'+imgpath+'" border="0" '+imgDimension+' /></a>'+'</td>'+'<td class="pl_title">'+'<div><a href="product_info.php?products_id='+data['id']+'&'+pl.params+'" title="Ver producto">'+data['title']+'</a></div>'+'<div id="cart'+data['id']+'" class="pl_cart">'+(data['cart']>0?'('+data['cart']+') en carrito':'')+'</div>'+'<div id="err'+data['id']+'" class="pl_errorbox"><img src="'+pl.loading1+'" border="0" width="16" /></div>'+'</td>'+'<td class="pl_price">'+getPrice(data['price'],data['sprice'])+'</td>'+'</tr>';});_html+='</table>';break;case"grid":_html+='<table id="pl_grid" align="center" border="0" cellspacing="0" cellpadding="0"><tr>';$(pl_data).each(function(i,data){imgpath=pl.imgpath+data['image'];imgpath_lrg=pl.imgpath+data['imagelrg'];imgDimension=(view[pl.view][1]?'width="'+view[pl.view][1]+'" ':'')+(view[pl.view][2]?'height="'+view[pl.view][2]+'" ':'');ptitle=data['title'].length>25?data['title'].substr(0,25):data['title'];_pbox='<a href="product_info.php?products_id='+data['id']+'&'+pl.params+'" title="Ver producto">'+'<img align="left" src="'+imgpath+'" border="0" width=100 height=150 />'+'</a>'+'<br /><br /><br /><br /><a href="product_info.php?products_id='+data['id']+'&'+pl.params+'" title="Ver producto">'+data['title']+'</a>'+'<div class="pl_price">'+getPrice(data['price'],data['sprice'])+'</div>'+'<div id="cart'+data['id']+'" class="pl_cart">'+(data['cart']>0?'('+data['cart']+') en carrito':'')+'</div>'+'<div id="err'+data['id']+'" class="pl_errorbox"><img src="'+pl.loading1+'" border="0" width="16" /></div>';_html+='<td class="pl_grid_data">'+pl_productBox(_pbox)+'</td>';if(((i+1)%view[pl.view][0])==0&&i<(pl_data.length-1)){_html+='</tr><tr><td class="pl_hor_sep" colspan="'+(view[pl.view][0]+1)+'"><img src="'+pl.pl_imgpath+'spacer.gif" border="0" width="1" height="1" /></td></tr><tr>';}else{_html+='<td class="pl_ver_sep"><img src="'+pl.pl_imgpath+'spacer.gif" border="0" width="1" height="1" /></td>';}});if(pl_data.length<1)_html+='<td><p>No hay productos...</p></td>';_html+='</tr></table>';break;}
$("#pl_content").html(_html);$("div.pl_prod, div.pl_prod_small").mouseover(function(){$(this).toggleClass("pl_prod_hover");}).mouseout(function(){$(this).toggleClass("pl_prod_hover");});$("a.addtocart").click(function(){if($(".pl_errorbox").is(":animated")==false){addtocart(this.title);}});jQuery('a[rel*=facebox]').facebox();$('#facebox').bgiframe();}
function getPerPageValue(){var opt="";$.each(display,function(key,value){opt+='<option value="'+value+'"'+(pl.limit==value?' selected="selected"':'')+'>'+value+'</option>';});return opt;}
function getSortValue(){var opt="";opt+='<option value="latest"'+(pl.sortby=="latest"?' selected="selected"':'')+'>Reciente</option>'+'<option value="name"'+(pl.sortby=="name"?' selected="selected"':'')+'>Nombre</option>'+'<option value="price"'+(pl.sortby=="price"?' selected="selected"':'')+'>Precio</option>'+'<option value="brand"'+(pl.sortby=="brand"?' selected="selected"':'')+'>Marca</option>';return opt;}
function pl_azButton(alt,bnum){var image_button='<nobr><span class="az-button-left'+bnum+'" title="'+alt+'">&nbsp;</span><span class="az-button-middle'+bnum+'" title="'+alt+'">&nbsp;'+alt+'&nbsp;</span><span class="az-button-right'+bnum+'" title="'+alt+'">&nbsp;</span></nobr>';return image_button;}
function pl_productBoxBorder(boxclass){var _html='<table width="100%" border="0" cellspacing="0" cellpadding="0" class="'+boxclass+'"><tr>'+'<td class="'+boxclass+'L"><img src="'+pl.pl_imgpath+'spacer.gif" border="0"></td>'+'<td width="100%" class="'+boxclass+'C">&nbsp;</td>'+'<td class="'+boxclass+'R"><img src="'+pl.pl_imgpath+'spacer.gif" border="0"></td>'+'</tr></table>';return _html;}
function pl_productBox(contents){var _html='<table width="100%" border="0" cellspacing="0" cellpadding="0">'+'<tr><td colspan="3">'+pl_productBoxBorder('pl_prodBoxHeader')+'</td></tr>'+'<tr>'+'<td class="pl_prodBoxL"><img src="'+pl.pl_imgpath+'spacer.gif" border="0" width="1" height="1" /></td>'+'<td width="100%" class="pl_prodBoxC">'+contents+'</td>'+'<td class="pl_prodBoxR"><img src="'+pl.pl_imgpath+'spacer.gif" border="0" width="1" height="1" /></td>'+'</tr>'+'<tr><td colspan="3">'+pl_productBoxBorder('pl_prodBoxFooter')+'</td></tr>'+'</table>';return _html;}
function getPrice(price,sprice){if(!sprice==0){price='<s>'+price+'</s> '+sprice;}
return price;}
function getLoading1(){return'<img src="'+pl.loading1+'" border="0" width="16" height="16" />';}
