// JavaScript Document
// (c) Mag. Andreas Unterhuber
// http://blog.directorgate.com

var menunr = 0;

function dg(obj){return document.getElementById(obj);}

function cMe(obj){obj.style.backgroundColor = '#000000';}
function dMe(obj){if (obj.id != 'sM' + menunr) obj.style.backgroundColor = '#676e74';}

function mainMenu (id) {
    if (dg("mM" + id)) dg("mM" + id).style.color = "#000000";
}

function subMenu(id) {
    if (dg('sM' + id)) {
        menunr = id;
        dg('sM' + id).style.backgroundColor = '#000000';
    }
}

function doMenu(menunr) {if (dg('MenuItem' + menunr)) {dg('MenuItem' + menunr).style.backgroundColor = '#CCCCCC'; dg('MenuItem' + menunr).childNodes[0].style.color = '#000000';}}
function subFunc(obj){
	if (dg('MenuItem' + menunr)) 
	{return dg('MenuItem' + menunr).childNodes[0] != obj;} 
	else return true;}
	

function hideThemAll(){
	Element.hide('partCR');
	Element.hide('partCE');
	Element.hide('partTM');
	Element.hide('partTS');
	Element.hide('partGM');
	Element.hide('partSE');
	}
	
function runHm(objNr){
	if (dg('Hm' + objNr)) {
		dg('Hm' + objNr).style.color = '#ffffff';
	}
}

// ##################################################
// 			Some Code
// ##################################################

function popUp(url) {
	window.open(url,"redRef","height=600,width=550,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0," + "resizable=0,scrollbars=1,status=1,toolbar=0");
}

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}
function checkVersion()
{
  //var msg = "You're not using Internet Explorer.";
  var ver = getInternetExplorerVersion();

  if ( ver > -1 )
  {
    if ( ver >= 7.0 ) 
      msg = "You're using a recent copy of Internet Explorer."
    else {
      msg = "You should upgrade your copy of Internet Explorer.";
	  dg("mainContent").style.marginLeft = "119px";
	  dg("mainContent").style.backgroundImage = "url(Pictures/Background-ShadowIE.png)";
	  dg("footerContent").style.marginLeft = "119px";	  
	}
  }
  //alert( msg );
}