var contentheight;

window.onload = function () { setup_ie () }

function setup_ie () { 
    if ( navigator.appName != 'Microsoft Internet Explorer' ) { return }
    /* if ( document.getElementById ) {
	var content = document.getElementById( 'primary' );
	contentheight = content.clientHeight;
	if ( content && contentheight && document.body.clientHeight ) {
	    window.onresize = function () { centre( content ); }
	    centre( content );
	}
    } */
    mand_before();
}

function centre( content ) {
    var height = document.body.clientHeight;
    var top = ( height - contentheight ) / 2;
    if ( top > 0 ) {
	content.style.top = top;
    }
    else {
	content.style.top = 0;
    }
}

function mand_before() {
	if ( !document.createTextNode || !document.getElementsByTagName ) { return } 
	var body = document.getElementsByTagName( 'body' )[0];
	if ( !body || !body.firstChild || !body.firstChild.parentNode || !body.firstChild.insertBefore ) { return }
	var labels = document.getElementsByTagName( 'label' );	
	for ( var i = 0; i < labels.length; i++ ) {
	    var label = labels[ i ];
	    if ( label.getAttribute( 'class' ) || label.className ) {
		var cl;
		if ( label.className ) { cl = label.className }
		else { cl = label.getAttribute( 'class' ) }
		if ( cl == 'mand' ) {
		    var star = document.createTextNode( '* ' );
		    label.parentNode.insertBefore( star, label );
		}
	    }
	}
	
}

