
var thisVentasHome = 0;
var thisOfertaHome = 0;
	
function openVentasHome(thisPosition)
{
	switch(thisPosition)
	{
		case "+": { if( ($('img_'+(thisVentasHome+2)) != null) && ($('txt_'+(thisVentasHome+2)) != null) ) { thisVentasHome++; } break; }
		case "-": { if(thisVentasHome > 0) { thisVentasHome--; } break; }
	}
	
	new Ajax.Updater('content_topVentas','Pages/top_ventas_elements.aspx?first=0', {method:'post',evalScripts:true});
}
	
function openOfertasHome(thisPosition)
{
	switch(thisPosition)
	{
		case "+": { if( ($('o_img_'+(thisOfertaHome+2)) != null) && ($('o_txt_'+(thisOfertaHome+2)) != null) ) { thisOfertaHome++; } break; }
		case "-": { if(thisOfertaHome > 0) { thisOfertaHome--; } break; }
	}
	
	new Ajax.Updater('content_Ofertas','Pages/Ofertas_elements.aspx?first=0', {method:'post',evalScripts:true});
}

function FixPng()
{
	var _Png = document.getElementsByTagName('img');

	for (Inx=0; Inx < _Png.length; Inx++)
{
		var imgparts = _Png[Inx].src.split(".");
		if( imgparts [imgparts .length -1] == "png" )
		{
			if(navigator.appName == 'Microsoft Internet Explorer')
			{
				_Png[Inx].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_Png[Inx].src+"', sizingMethod='scale')";
				_Png[Inx].src = "/virtualHost/imagesRoot/images/RMD/media/images/null.gif";
			}
		}
	}
}



