function viewdate () {
  var time = new Date();
  var month = time.getMonth() + 1;
  var date = time.getDate();
  var year = time.getYear();

  if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) {
    year = "19" + year; }

  if (navigator.appName == "Netscape") {
    year = 1900 + year; }

  if (month < 10) {
    document.write("0" + month + "."); }
  else {
    document.write(month + "."); }

  if (date < 10) {
    document.write("0" + date + "." + year); }
  else {
    document.write(date + "." + year); }
}

//-----

document.WM = new Object();
document.WM.hirelist = new Object();
document.WM.hirelist.expandos = new Array();
document.WM.hirelist.heights = new Array();
document.WM.hirelist.names = new Array();

function WM_toggle(id) {
  if (document.all){
    if(document.all[id].style.display == 'none'){
      document.all[id].style.display = 'block';
    } else {
      document.all[id].style.display = 'none';
    }
  } else if (document.getElementById){
    if(document.getElementById(id).style.display == 'none'){
      document.getElementById(id).style.display = 'block';
    } else {
      document.getElementById(id).style.display = 'none';
    }
  } else if(document.layers) {
      if(parseInt(id + 1)){
	  ditem = id + 1;
      } else {
	  ditem = document.WM.hirelist.names[id];
      }
      if(document.WM.hirelist.expandos[ditem].clip.bottom == 0) {
	     document.WM.hirelist.expandos[ditem].clip.bottom = document.WM.hirelist.heights[ditem];
      } else {
	  document.WM.hirelist.expandos[ditem].clip.bottom = 0;
      }
      WM_align();
  }
}

function WM_align() {
    var i,j,stupid_netscape_array_infinate_loop_error;
    stupid_netscape_array_infinate_loop_error = document.WM.hirelist.expandos.length;
    for(i=0; i<stupid_netscape_array_infinate_loop_error; i++) {
		j = i + 1;
		if(document.WM.hirelist.expandos[j]){
	    	if(document.layers) {
				document.WM.hirelist.expandos[j].top = document.WM.hirelist.expandos[i].top + document.WM.hirelist.expandos[i].clip.bottom;
	   		}
		}
    }
}

function WM_initialize_toolbar(){
    if(document.layers) {
		for(i=0; i<document.layers['mmenu'].document.layers.length; i++){
	    	document.WM.hirelist.expandos[i] = document.layers['mmenu'].document.layers[i];
	    	document.WM.hirelist.names[document.layers['mmenu'].document.layers[i].name] = i;
	    	document.WM.hirelist.heights[i] = document.WM.hirelist.expandos[i].clip.bottom;
		}
		for (p=0;p<document.WM.hirelist.expandos.length;p=p+2){
	    	WM_toggle(p);
		}
		document.layers['mmenu'].visibility = 'visible';
    } else if (document.all){
		for(i = 0; i < document.all('mmenu').all.length; i++){
		    document.all('mmenu').all[i].style.position = 'relative';
		    if(document.all('mmenu').all[i].className == 'mlist'){
			document.all('mmenu').all[i].style.display = 'none';
		    }
		}
		document.all('mmenu').style.visibility = 'visible';
    } else if (document.getElementsByTagName && document.getElementById){
		var contained = document.getElementById('mmenu').getElementsByTagName('div');
		for(i = 0; i < contained.length; i++){
		    contained[i].style.position = 'relative';
		    if(contained[i].getAttribute('class') == 'menu'){
			contained[i].style.display = 'none';
		    }
		}
		document.getElementById('mmenu').style.visibility = 'visible';
    }
}

//-----

function viewPic (picName, winName, winHW) {
  window.open(picName,winName,winHW);
  return false;
}
//  'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no'
//  fitWindowSize();


//-----

function fitWindowSize() {
  var isNav4, isIE4;
  if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
    isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
    isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
  }
  if (isNav4) {
    window.innerWidth = document.layers[0].document.images[0].width;
    window.innerHeight = document.layers[0].document.images[0].height;
  }
  if (isIE4) {
    window.resizeTo(500, 500);
    width = 500 - (document.body.clientWidth -  document.images[0].width);
    height = 500 - (document.body.clientHeight -  document.images[0].height);
    window.resizeTo(width, height);
  }
}

//-----

function preloadImg() {
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImg = new Array();
    var argLength = preloadImg.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      document.WM.loadedImg[arg] = new Image();
      document.WM.loadedImg[arg].src = preloadImg.arguments[arg];
    }
  }
}