function attachListeners() {
	//loop through input field looking for attribute of type date.  If found attach onchange event
	//to validate and verify date format
	var inputs = document.getElementsByTagName("input");
	for(var x = 0; x<inputs.length; x++) 
	{
		var input = inputs[x];
		if(input.attributes.getNamedItem("date") != null) {
			if(is.ie) {
				input.attachEvent("onchange", validateDate);
			}
			else {
				input.addEventListener("change", validateDate, false);
			}
		}
	}
	//Attach events for the list object
	if(OBJECT == LIST_OBJECT) {
		var input = document.getElementById("distribute");
		//Copy distribute (send to outbox) value to send field
		if(is.ie) {
			input.attachEvent("onchange", function() {populateSend(this);});
		}
		else {
			input.addEventListener("change", function() {populateSend(this);}, false);
		}
	 	input = document.getElementById("distributetime");
		//Copy distributetime (send to outbox time) value to send field
		if(is.ie) {
			input.attachEvent("onchange", function() {populateSendTime(this);});
		}
		else {
			input.addEventListener("change", function() {populateSendTime(this);}, false);
		}
		//If followUp is checked/unchecked, show/hide appropriate fields
		input = document.getElementById("followup");
		if(is.ie) {
			input.attachEvent("onclick", function() {displayFollowUp(this);});
		}
		else {
			input.addEventListener("click", function() {displayFollowUp(this);}, false);
		}
	}
	//Attach events for the event object
	if(OBJECT == EVENT_OBJECT) {
		var input = document.getElementById("distribute");
		//Copy distribute (send to outbox) value to send field
		if(is.ie) {
			input.attachEvent("onchange", function() {populateSend(this);});
		}
		else {
			input.addEventListener("change", function() {populateSend(this);}, false);
		}
	 	input = document.getElementById("distributetime");
		//Copy distributetime (send to outbox time) value to send field
		if(is.ie) {
			input.attachEvent("onchange", function() {populateSendTime(this);});
		}
		else {
			input.addEventListener("change", function() {populateSendTime(this);}, false);
		}
	}
	//Attach events for the contact object
	if(OBJECT == CONTACT_OBJECT) {
		var doNotContactCheckbox = document.getElementById("donotcontact");
		if(is.ie) {
			doNotContactCheckbox.attachEvent("onclick", function() {toggleDelete(this);});
		}
		else {
			doNotContactCheckbox.addEventListener("click", function() {toggleDelete(this);}, false);
		}
	}
	//Attach events for the crmuser object
	if(OBJECT == CRMUSER_OBJECT) {
		var imapserver = document.getElementById("imapserver");
		if(is.ie) {
			imapserver.attachEvent("onchange", function() {toggleTestEmail(this);});
		}
		else {
			imapserver.addEventListener("change", function() {toggleTestEmail(this);}, false);
		}
		var smtpserver = document.getElementById("smtpserver");
		if(is.ie) {
			smtpserver.attachEvent("onchange", function() {toggleTestEmail(this);});
		}
		else {
			smtpserver.addEventListener("change", function() {toggleTestEmail(this);}, false);
		}
	}
}
