

var ie4 = false;

if(document.all) {
	ie4 = true;
}

function getObject(id){
	if (ie4){
		return document.all[id];
	}else{
		return document.getElementById(id);
	}
}

function toggle(divId){
	var d = getObject(divId);
	if (d.style.display == 'block')
		d.style.display = 'none';
	else
		d.style.display = 'block';

}



//The browser detection code below is courtesy of
//Harald Hope, Tapio Markula, Websites: http://techpatterns.com/
//It is released under the terms of the LGPL
var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;
d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );

if ( !d.layers ){
  dom = ( d.getElementById );
  op = ( nua.indexOf( 'Opera' ) != -1 );
  konq = ( nua.indexOf( 'Konqueror' ) != -1 );
  saf = ( nua.indexOf( 'Safari' ) != -1 );
  moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
  ie = ( d.all && !op );
  ie4 = ( ie && !dom );
  /*ie5x tests only for functionality. ( dom||ie5x ) would be default settings.
  Opera will register true in this test if set to identify as IE 5*/
  ie5x = ( d.all && dom );
  ie5mac = ( mac && ie5x );
  ie5xwin = ( win && ie5x );
}


function showhideElements(nID){

	var y = document.getElementById(nID);

     //Set the object to table-cell if the browser is
     //moz (see above) and block if it's anything else.
/*     if(moz){
        if(y.style.display == "table-cell") {
           y.style.display = "none";
        }else{
           y.style.display = "table-cell";
        }
     }else{ */
        if(y.style.display == "block") {
           y.style.display = "none";
        }else{
           y.style.display = "block";
        }
//     }
}


