function setFieldValue(fieldRef, str) {
	// clears field when user clicks in, 
	// and resets to default str when user clicks out 
	// with no value in the field.
	obj = eval(fieldRef);
	if (obj.value == str) {
		obj.value = "";
	}
	else if (obj.value == "") {
		obj.value = str;
	}
}


// ===============================================
//START ROLLOVER FOR MORE INFO
// ===============================================
function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

// ===============================================
//START POPUP FOR MORE INFO
// ===============================================
function popIt(pageToPop) 
{
	if (document.images)
	{
  	sesame=open( pageToPop + ".html" , "guarantee", "height=500,width=380,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");
	}
}
// ===============================================
//END POPUP FOR MORE INFO
// ===============================================

// ===============================================
// START GEHF SPECIFIC Set HTTP and HTTPS functions
// ===============================================
function MM_SetHttps() {
	alert("pulic: In HTTPS: ");
	// this method should be called on onClick() onClick="MM_SetHttps()"
	var index = document.URL.indexOf(":");
	window.BWF_USE_HTTP = false;
	window.BWF_USE_HTTPS = true;

	if ( index == 4 ) {
		    //window._BS_REALACTIONURL = "https" +document.URL.substring(4);
		    document.forms[0].lnkContact.href="https" +document.URL.substring(4);
		    //document.URL = "https" +document.URL.substring(4);
	}

}

function MM_SetHttp() {
	//alert("public :In HTTP");
	// this one is not really used because the window (once redirected) loses all window.* variables
     var index = document.URL.indexOf(":");
	 window.BWF_USE_HTTP = true;
	 window.BWF_USE_HTTPS = false;
      if ( index == 5 ) {
		      window._BS_REALACTIONURL = "http" + document.URL.substring(5);
	}
}
// ===============================================
// END GEHF SPECIFIC Set HTTP and HTTPS functions
// ===============================================



// ===============================================
// START Function for writing date and time
// ===============================================

			var day="";
			var month="";
			var myweekday="";
			var year="";
			newdate = new Date();
			mydate = new Date();
			dston =  new Date('April 4, 1999 2:59:59');
			dstoff = new Date('october 31, 1999 2:59:59');
			var myzone = newdate.getTimezoneOffset();
			newtime=newdate.getTime();
			
			var zone = 5;  // references your time zone
			
			if (newdate > dston && newdate < dstoff ) {
			zonea = zone - 1 ;
			dst = "  ET";
			}
			else {
			zonea = zone ; dst = "  ET";
			}
			var newzone = (zonea*60*60*1000);
			newtimea = newtime+(myzone*60*1000)-newzone;
			mydate.setTime(newtimea);
			myday = mydate.getDay();
			mymonth = mydate.getMonth();
			myweekday= mydate.getDate();
			myyear= mydate.getYear();
			year = myyear;
			
			if (year < 2000)    // Y2K Fix, Isaac Powell
			year = year + 1900; // http://onyx.idbsu.edu/~ipowell
			myhours = mydate.getHours();
			if (myhours >= 12) {
			myhours = (myhours == 12) ? 12 : myhours - 12; mm = " PM";
			}
			else {
			myhours = (myhours == 0) ? 12 : myhours; mm = " AM";
			}
			myminutes = mydate.getMinutes();
			if (myminutes < 10){
			mytime = ":0" + myminutes;
			}
			else {
			mytime = ":" + myminutes;
			};
			armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
			ardate = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
			var time = (armonth[mymonth] +" "+ardate[myweekday] + ", " + year);

// ===============================================
// END Function for writing date and time
// ===============================================			


function ieW() {
	if (navigator.appName.indexOf('Microsoft Internet Explorer') == 0) {
		var Ps = document.getElementsByTagName('P');
		var TDs = document.getElementsByTagName('TD');
		if (Ps) {
			for (a=0; a<Ps.length; a++) {
				if (Ps[a].firstChild != null) {				
					if (Ps[a].firstChild.nodeName == '#text') {
						var para = Ps[a].firstChild.nodeValue;
						if (para.indexOf('W') == 0) {
						Ps[a].className='fixW';
						}
					}
					else if (Ps[a].firstChild.nodeName == 'EM'){
						var emph = Ps[a].firstChild
						if (emph.firstChild.nodeName == '#text') {
						var emphText = emph.firstChild.nodeValue;
							if (emphText.indexOf('W') == 0) {
							Ps[a].className='fixW';
							}
						}
					}  
				}
			}
		}
		if (TDs) {
			for (a=0; a<TDs.length; a++) {
				if (TDs[a].firstChild != null) {				
					if (TDs[a].firstChild.nodeName == '#text' && TDs[a].className != ''){
						var para = TDs[a].firstChild.nodeValue;
						if (para.indexOf('W') == 0) {
						TDs[a].className='fixW';
						}
					}
				}
			}
		}
	}
}

function getHeights() {

	
	var nav = document.getElementById('nav2');
	var bodyHead = document.getElementById('bodyHead');
	var col1 = document.getElementById('col1');
	if (findElement('col2')) {
		var col2 = document.getElementById('col2');}
	else {
		var col2 = document.getElementById('col1');}

	if (bodyHead && col1 && col2) {
		var navHeight = nav.offsetHeight;
		var bodyHeadHeight = bodyHead.offsetHeight;
		var col1Height = col1.offsetHeight;
		var col2Height = col2.offsetHeight;
		
		
		
		if (col1Height > col2Height) {
		var bodyHeight = col1Height;
		}
		else {
		var bodyHeight = col2Height;
		}
	
		
		var combinedHeight = bodyHeight + bodyHeadHeight;
		if (combinedHeight < navHeight) {
		
		var gap = navHeight - combinedHeight;
			if (col1Height > col2Height) {
				col1.style.height = col1Height + gap + 'px';
			}
			
			if (col1Height < col2Height) {
				col2.style.height = col2Height + gap + 'px';
			}		
			else {
				col2.style.height = col2Height + gap + 'px';
	
			}
		}
	}
}



function findElement(colName) {
	var eleNo = document.getElementsByTagName('DIV');
	for (i=0;i<eleNo;i++) {
		if (document.all[i].id==colName) {
			return true;
		}
	}
	return false;
}