// JavaScript Document
function open_pdf_win(file)
{
	var width=window.getWidth();
	var winHeight=window.getHeight();
	var height=winHeight-100;

	open(file,"","left=0,top="+winHeight/3+",height="+height+",width="+width+",scrollbars=yes,resizable=yes")	;
}


var all_selected=false;
			
function setCheckedValue(prefix,max,val)
	{
		for (i=0;i<max;i++)
			{
					$(prefix+i).checked=val;
				}
				all_selected = val;
				if (val)
					$("select_all").value = "Auswahl aufheben";
				else
					$("select_all").value = "alle auswählen";
				
				
			}
			
function toggleSelection(prefix,max)
			{
				if (all_selected) 
					setCheckedValue(prefix,max,false);
				else
					setCheckedValue(prefix,max,true);
			}



/* Select Toggle für Prospekte */
var p_all_selected = Array();

function pSetCheckedValue(prefix,btn,max,val)
{
	for (i=0;i<max;i++)
	{
		$(prefix+i).checked=val;
	}
	
	p_all_selected[prefix] = val;
	
	/*if (val)
		$("all_"+btn).firstChild.nodeValue = "keine";
	else
		$("all_"+btn).firstChild.nodeValue = "alle";*/
}

function pToggleSelection(prefix,btn,max)
{
	if (p_all_selected[prefix]) 
		pSetCheckedValue(prefix,btn,max,false);
	else
		pSetCheckedValue(prefix,btn,max,true);
}