
		// fixPosition() attaches the element named eltname
		// to an image named eltname+'Pos'
		//
		function Is(){ 
		  this.ver=navigator.appVersion;
		  this.agent=navigator.userAgent;
		  this.dom=document.getElementById?1:0;
		  this.opera5=this.agent.indexOf("Opera 5")>-1;
		  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
		  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
		  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
		  this.ie=this.ie4||this.ie5||this.ie6;
		  this.mac=this.agent.indexOf("Mac")>-1;
		  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
		  this.ns4=(document.layers && !this.dom)?1:0;
		  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
		  return this;
			}
		
		var is = new Is();
		
		function fixPosition(divname) {
		 divstyle = getDivStyle(divname);
		 positionerImgName = divname + 'Pos';
		 // hint: try setting isPlacedUnder to false
		 isPlacedUnder = false;
		 if (isPlacedUnder && !(is.mac && is.ie)) {
		  setPosition(divstyle,positionerImgName,true);
		 } else if (!(is.mac && is.ie)){
		  setPosition(divstyle,positionerImgName)
		 }
		}
		
		function toggleDatePicker(eltName,formElt) {
		  var x = formElt.indexOf('.');
		  var formName = formElt.substring(0,x);
		  var formEltName = formElt.substring(x+1);
		  newCalendar(eltName,document.forms[formName].elements[formEltName]);
		  toggleVisible(eltName);
		}
		
		// fixPositions() puts everything back in the right place after a resize.
		function fixPositions()
		{
		 // add a fixPosition call here for every element
		 // you think might get stranded in a resize/reflow.
		 fixPosition('daysOfMonth');
		 fixPosition('daysOfMonthRef');
		}

		function g(o) {
			return document.getElementById(o);
			}

		function pad(number,length) {
    	var str = '' + number;
    	while (str.length < length) {
        str = '0' + str;
    		}
    	return str;
			}

		function getTs(o) {
			if(o) {
				var datebits = o.split('/');
				var year = parseInt(datebits[2]);
				var month = parseInt(datebits[1]);
				var day = parseInt(datebits[0]);
				year = pad(year,4);
				month  = pad(month,2);
				day = pad(day,2);
				return parseInt(year+''+month+''+day);
				}
			else {
				return 0;
				}
			}
		// -->

