//
//window.addEvent('domready', function() 
//{
//
//		$$(".comparadorChckBox").each(function(ChckBoxEl){
////								 					 
//			ChckBoxEl.addEvents(
//			{
//				'click': function()
//				{
//					var producto_contenedor = ChckBoxEl.getParent().getParent();//
//
//					if(ChckBoxEl.checked){
//						producto_contenedor.setStyle('background-position', 'bottom center');
//					
//						var compAjax = new Ajax('productos_comparador_post.php',
//						{
//							encoding:'iso-8859-1',
//							method: 'get',
//							data:'id_producto='+ChckBoxEl.value+'&option=1',
//						});
//						compAjax.request();
//						//console.log(ChckBoxEl.value);
//					
//					}else{
//						producto_contenedor.setStyle('background-position', 'top center');
//						
//						var compAjax = new Ajax('productos_comparador_post.php',
//						{
//							encoding:'iso-8859-1',
//							method: 'get',
//							data:'id_producto='+ChckBoxEl.value+'&option=2',
//						});
//						compAjax.request();
//						//console.log(ChckBoxEl.value);
//
//					}
//					
//					
//					
//					
//					
//				}
//			});
//		
//		});
//});


var popUpWin = 0;
function popUpWindow(URLStr, left, top, width, height)
{
  left = screen.width/2 - width/2
  top = screen.height/2 - height/2
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin= open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function calcular_cuotas(id_producto,id_tarjeta){
	
	var miAjax = new Ajax('producto_cuotas.php',
	{
		method: 'get',
		encoding:'iso-8859-1',
		data:'id_producto='+id_producto+'&id_tarjeta='+id_tarjeta,
		update:$('submenu_tarjeta_body'),
		evalScripts: true
	});
	miAjax.request(); }




function mostrar_tarjeta(id_producto){
	
	var miAjax = new Ajax('producto_tarjetas.php',
	{
		method: 'get',
		encoding:'iso-8859-1',
		data:'id_producto='+id_producto,
		update:$('submenu_tarjeta_body'),
		evalScripts: true
	});
	miAjax.request();
	
}

