function ConfirmDelete( sText )
{
	sText = sText ? '\n' + sText : '';

	var bResult = confirm( 'Wirklich löschen?' + sText );
    
	return bResult ? true : false;
}

//function PrintHide( sID )
//{
//	var object = document.getElementById( sID );
//	
//	if( object.className ) 
//		object.className = ''; 
//	else 
//		object.className = 'printHide';
//}

//function PrintHideAll( iNumElements, iOffset )
//{
//	for( i = iOffset; i < iNumElements + iOffset; i++ )
//	{
//		PrintHide( 'TR' + i );
//		document.getElementById( 'CheckboxPrintHide' + i ).checked = !document.getElementById( 'CheckboxPrintHide' + i ).checked;
//	}
//}

function CheckboxSelectAll( sName, iNumElements )
{
	for( i = 0; i < iNumElements; i++ )
	{
		if( !document.getElementsByName( sName )[ i ].disabled )
			document.getElementsByName( sName )[ i ].checked = true;
	}	
}


function PrintChecked( sIDPrefix, sNameCondition, bReturn ) 
{
	if( bReturn )
		return true;
	
	var i = 0;

	while( document.getElementById( sIDPrefix + i ) )
	{
		if( !document.getElementsByName( sNameCondition )[ i ].checked )
			document.getElementById( sIDPrefix + i ).className = 'printHide';
		
		i++;
	}
	
	window.print();

	return false;
}

function NewsletterPreview( sURL, pForm )
{
	var action = pForm.action;
	var target = pForm.target;
	
	pForm.action = sURL;
	pForm.target = '_blank';
	pForm.submit();
	
	pForm.action = action;
	pForm.target = target;
}