function iopenmm( span ) {
    displayType = ( document.getElementById( span ).style.display == 'none' ) ? 'block' : 'none';
    document.getElementById( span ).style.display = displayType;
}

function iclosemm( span ) {
    document.getElementById( span ).style.display = 'none';
}

function icloseallmm( total, pre, dont ) {
// for (i=1; i<=total; i++) { if (i != dont) document.getElementById( pre + i ).style.display = 'none'; }
}

function iopenclosemm( span, total ) {
for (i=1; i<=total; i++) { 
if (i==span) 
	{
    displayType = ( document.getElementById( span ).style.display == 'none' ) ? 'block' : 'none';
    document.getElementById( span ).style.display = displayType;	
	}
else document.getElementById( i ).style.display = 'none'; }
}

function avopenmm( span ) {
    displayType = ( document.getElementById( span ).style.display == 'none' ) ? 'block'  : 'none';
    imagesource   = ( document.getElementById( span ).style.display == 'none' ) ? 'url(images/bgh2on.gif)'   : 'url(images/bgh2.gif)';
    // h2style = ( document.getElementById( span ).style.display == 'none' ) ? 'H2on'  : 'H2off';
	
	targeth2 = span + "h";
	document.getElementById( targeth2 ).style.backgroundImage = imagesource;
			
    document.getElementById( span ).style.display = displayType;
	// targetimage = span + "i";
	// document.images[targetimage].src = imagesource;
}

function openallmm( max, ovalue ) {
	// alert (document.getElementById('alleein').innerHTML);
    dojob = ( document.getElementById('alleein').innerHTML == 'Alle Themen einblenden' ) ? 'in'  : 'out';
    document.getElementById('alleein').innerHTML = ( dojob == 'in' ) ? 'Alle Themen ausblenden'  : 'Alle Themen einblenden';
    displayType   = ( dojob == 'in' ) ? 'block'  : 'none';
    imagesource   = ( dojob == 'in' ) ? 'url(images/bgh2on.gif)'   : 'url(images/bgh2.gif)';

	for (x=1;x<=max;x++)
	{
	targetdiv = "more" + x;
	document.getElementById( targetdiv  ).style.display = displayType;
	targeth2 = "more" + x + "h";
	document.getElementById( targeth2 ).style.backgroundImage = imagesource;
	// targetimage = "more" + x + "i";
	// document.images[targetimage].src = 'images/minus.gif';
	} 
}

function nix( span ) {
}

function gloshow(what) {
newwin=window.open('/altersvorsorge/glossar/glossarframe.php?jump='+what,'Glossar','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=510,height=250');
// setTimeout('Glossar.focus();',200); 
}

// Check Printpage
function printcheck() 
{
    var bstring = " " + window.location;
	if (bstring.indexOf("printpage") != -1)
	 {
	 openallmm('10','block');
	 }	 
}

function glkeyshow(what) {
newwin=window.open('/altersvorsorge/glossar/glossarframe.php?filter='+what,'Glossar','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=510,height=250');
// setTimeout('Glossar.focus();',200); 
}

function pload() {
    var d=document;
    if(d.images) {
        if(!d.Pre) { d.Pre=new Array(); }
    }
    var i,j=d.Pre.length,a=pload.arguments;
    for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0) {
            d.Pre[j]=new Image;
            d.Pre[j++].src=a[i];
        }
}


pload('/altersvorsorge/images/bgh2on.gif');
