function DoSelect(pType)
	{
		CountOfProducts = $("input[type='checkbox']:checked").length;
		if (CountOfProducts == 2 || CountOfProducts == 3)
		{
			var i = 1;
			var param = '';
			$("input[type='checkbox']:checked").each
			(
				function()
				{
					param += '&pid' + i + '=' + this.value;
					i++;
				}
			);

			GetContent(param, pType);
			$(document).attr('printparam', param);
			$(document).attr('printtype', pType);

			$('#auswahl').hide('slow');
			$('#vergleich').show('slow');
			
			$("#t1").removeClass();
			$("#t2").addClass("selected");
			$("#t2").blur();
		}
		else
			alert($(document).attr('MaxProductCompareInfo'));
	}
	
	function DoChange()
	{
		$('#auswahl').show('slow');
		$('#vergleich').hide('slow');
		
		$("#t2").removeClass();
		$("#t1").addClass("selected");
		$("#t1").blur();
	}
	
	function GetContent(pUrl, pType)
	{
		$.ajax
		(
			{
				url: "index.php",
				data: "StoryID=24&websiteLang="+$(document).attr('language')+"&" + pUrl + "&pType=" + pType,
				dataType: "html",
				cache: true,
				success: function(html)
				{
					$("#vergleich").html(html);
				}
			}
		);		
	}

	function PrintDocument()
	{
		var paramurl = "&websiteLang="+$(document).attr('language') + $(document).attr('printparam') + "&pType=" + $(document).attr('printtype') + "&PrintMode=1";
		ShowPopup('index.php?StoryID=49'+paramurl,'width=1064,height=768,dependent=no,resizable=no,location=no,status=no,toolbar=no,scrollbars=yes');
		//alert(paramurl);
	}
	
$('.blockbox .markertitle').live('click', Blockbox.click);

