<!--


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;}

function popUpWindow(URL,windowName,w,h,controlwindow,params){if(!w)w=screen.availWidth-30;if(!h)h=screen.availHeight-30;var aw=screen.availWidth,ah=screen.availHeight,l=Math.round((aw-w)/2),t=Math.round((h-ah)/2),defaults='scrollbars,resizable,toolbar=no,location=no,menubar=no,status=no,';if(typeof(params)=='string')defaults=params;var centerOnScreen="top="+t+",left="+l+",width="+w+",height="+h;var options=defaults+centerOnScreen+",";if(!windowName)windowName="p"+new Date().getTime().toString();var msgWindow=window.open(URL,windowName,options);if(controlwindow!=null){try{msgWindow.creator=self;msgWindow.focus();}catch(e){document.location.href=URL;}}}


// --- CLIENTCHECK ---

function getClient() {
    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();
    var apv=navigator.appVersion.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    // browserversion
    this.ns  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)));
    this.ns4 = (this.ns && (this.minor >= 4.03) && (this.major < 5));
	this.ns6 = (this.ns && (this.major == 5));
	this.gecko = (this.ns && (this.major >= 5));
    this.ie   = (agt.indexOf("msie") != -1);
    this.ie4  = (this.ie && (this.major == 3));
	this.ie45 = (agt.indexOf('msie 4.5') != -1);
    this.ie5  = (this.ie && (this.major == 4) && agt.indexOf('msie 6.0') == -1);
    this.ie6  = (agt.indexOf('msie 6.0') != -1);
    // platform
	this.mac = (apv.indexOf("macintosh")>0);
	this.win = (apv.indexOf("win")>0);	
    // compatible browsers
	this.ie4comp = ((this.ie4 && !this.mac) || this.ie45 || this.ie5);
	this.ns4comp = (this.ns4);
	this.ns6comp = (this.gecko || this.ns6 || this.ie6);
	
	// 22/11/2002 -- MZ: Opera 7.x support
	this.opera   = (agt.indexOf("opera") != -1);
	this.opera7comp   = ((this.opera) && (agt.indexOf("opera 7") != -1));
	
	this.comp = (this.ie4comp || this.ns4comp || this.ns6comp || this.opera7comp);
	
	return (this)
}

var is = new getClient();

// --- GET ELEMENT(LAYERREFERENCE) ---



function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}



function getElt () {
	if (is.ns4comp) {
	    var currentLayer = document.layers[getElt.arguments[0]];
	    for (var i=1; i<getElt.arguments.length && currentLayer; i++)
	    { currentLayer = currentLayer.document.layers[getElt.arguments[i]];
	    }
	    return currentLayer;
	} 
	else if (is.ie4comp) {
	    var elt = eval('document.all.' + getElt.arguments[getElt.arguments.length-1]);
	    return(elt);
	}
	else if (is.ns6comp) {
		var elt = document.getElementById(getElt.arguments[getElt.arguments.length-1]);
		return(elt);
	}
}


// --- VISIBILITY ---

function setEltVisibility (elt, value)
{  if (is.ns4comp) elt.visibility = value;
   else if (is.ie4comp) elt.style.visibility = value;
   else if (is.ns6comp) elt.style.visibility = value;
}

function getEltVisibility (elt)
{  if (is.ns4comp) 
   {  var value = elt.visibility;
      if (value == "show") return "visible";
      else if (value == "hide") return "hidden";
      else return value;
   }
   else if (is.ie4comp) return elt.style.visibility;
   else if (is.ns6comp) return elt.style.visibility;
}

function setEltDisplay (elt, value)
{  if (is.ns4comp) elt.display = value;
   else if (is.ie4comp) elt.style.display = value;
   else if (is.ns6comp) elt.style.display = value;
}

function getEltDisplay (elt)
{  if (is.ns4comp) 
   {  var value = elt.display;
      if (value == "show") return "visible";
      else if (value == "hide") return "hidden";
      else return value;
   }
   else if (is.ie4comp) return elt.style.display;
   else if (is.ns6comp) return elt.style.display;
}









