var switchers=new Array();
var comparableproducts=0;// Anzahl der vergleichbaren Produkte
var show_compare=false;


function do_reveal(what,whatsub,minheight)
{
	if (!switchers[what]) {
	//	alert($(whatsub).getHeight());
//		new Effect.Tween(what, minheight, $(whatsub).getHeight(), "height");
		new Effect.Morph(what,{style:'height:'+$(whatsub).getHeight()+'px'});
		//alert(Effect);
		switchers[what] = true;

	}
	else {
		//Effect.BlindUp(what,{duration:0.5}	);
		new Effect.Morph(what,{style:'height:'+minheight+'px'});
		switchers[what]=false;
	}
	return false;
}

function do_switch(what)
{
	if (!switchers[what]) {
		Effect.BlindDown(what,{duration:0.5});
		switchers[what] = true;

	}
	else {
		Effect.BlindUp(what,{duration:0.5}	);
		switchers[what]=false;
	}
	return false;
}


 function switch_compare()
 {
 	if (show_compare) {
		prepareOverlay();
		Effect.Fade('productcompare_big',{duration:0.5});
		show_compare = false;

	}
	else {
		prepareOverlay();
		Effect.Appear('productcompare_big',{duration:0.5});

		show_compare=true;
	}
	return false;

 }


/* Nach dem Ajax.Reload wird der große Vergleichsbereich wieder angezeigt, wenn er vorher sichtbar war */
function temp_hide_compare()
{
	if(show_compare)
		Effect.Fade('productcompare_big',{duration:0.5});
 }

function prepareOverlay()
{
//	$('productcompare_big').style.position='fixed';

/*	$('productcompare_big').style.position='fixed';
	width:920px;
	background-image:url("grafiken/bg_weiss_transparent.png");
	background-repeat:repeat-y;
	left:10px;
	top:10px;
	padding:20px;
	overflow: auto;*/



}
function refresh_compare()
{

	if (show_compare) {
		prepareOverlay();
		Effect.Appear('productcompare_big',{duration:0.5});

	}
 }


function show_bcompare()
{
	if(document.getElementById('b_showcompare').style.display=='none')
		Effect.SlideDown('b_showcompare',{duration:0.5});
	 	//Effect.Appear('b_showcompare',{duration:0.5});
 }

function hide_bcompare()
{
		Effect.SlideUp('b_showcompare',{duration:0.5});
		//Effect.Fade('b_showcompare',{duration:0.5});
}


function do_uncheck(uid)
{
	var uncheck=document.getElementById("tx_chproducts_pi1_cmp_"+uid+"");
	if(uncheck)
		uncheck.checked=!uncheck.checked;
}

