function mOvr(src,clrOver) {
  if (!src.contains(event.fromElement)) {
    src.style.cursor = 'hand'; src.bgColor = clrOver;
  }
}

function mOut(src,clrIn) {
  if (!src.contains(event.toElement)) {
    src.style.cursor = 'default';
    src.bgColor = clrIn;
  }
}

var win=null;

function openWin(strURL, dWidth, dHeight){
	var popLeft = 0, popTop = 0;
	if(screen.width) popLeft = (screen.width - dWidth) / 2;
	if(screen.height) popTop = (screen.height - dHeight) / 2;

	newapp = open(strURL,"What_it_is","resizable=1,status=350,location=0,scrollbars=1,width=" + dWidth + ",height=" + dHeight + ",left=" + popLeft + ",top=" + popTop);
	if(navigator.appName == "Netscape")
		newapp.focus();
}

function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) // if too long...this trims it!
	field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else
	countfield.value = maxlimit - field.value.length;
}

function Login_focus(e,o){
if(o.firstTime){return}
o.firstTime=true
o.value=""
}

var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
 if (newWin != null && !newWin.closed)
   newWin.close();
 var strOptions="";
 if (strType=="console")
   strOptions="resizable,height="+
     strHeight+",width="+strWidth;
 if (strType=="fixed")
   strOptions="status,height="+
     strHeight+",width="+strWidth;
 if (strType=="elastic")
   strOptions="toolbar,menubar,scrollbars,"+
     "resizable,location,height="+
     strHeight+",width="+strWidth;
 newWin = window.open(strURL, 'newWin', strOptions);
 newWin.focus();
}

function switchto(q){
    if (q){
        document.getElementById('RPasswordtext').style.display="none";
        document.getElementById('RPassword').style.display="inline";
        document.getElementById('RPassword').focus();
    } else {
        document.getElementById('RPassword').style.display="none";
        document.getElementById('RPasswordtext').style.display="inline";
    }
}

function switchMenu(obj) {
	var lay = document.getElementById(obj);
	if ( lay.style.display != "none" ) {
		lay.style.display = 'none';
	}
	else {
		lay.style.display = '';
	}
}


  var geocoder;
  var map;
  function initialize() {
    geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 15,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  }

  function codeAddress() {
    var address = document.getElementById("address").value;
    if (geocoder) {
      geocoder.geocode( { 'address': address}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
          map.setCenter(results[0].geometry.location);
          var marker = new google.maps.Marker({
              map: map,
              position: results[0].geometry.location
          });
        } else {
          alert("Geocode was not successful for the following reason: " + status);
        }
      });
    }
  }