function fin_set_cookies(form_id) {

	// process if there is a form as passed
	if (document.getElementById(form_id).elements) {
		// loop through the form elements
		for (i = 0; i < document.getElementById(form_id).elements.length; i++) {
			// store the type in an easier to use variable
			var form_type = document.getElementById(form_id).elements[i].type;
			
			// only process text information
			if (form_type == "text") {
				// write the cookie
				writeSessionCookie(document.getElementById(form_id).elements[i].name, document.getElementById(form_id).elements[i].value);
			}
			
		} // end for
		
	} // end if form elements exist
}

function fin_get_cookies(form_id) {

	// process if there is a form as passed
	if (document.getElementById(form_id).elements) {

		// process if cookies exist
		if (document.cookie) {

			// loop through the form elements
			for (i = 0; i < document.getElementById(form_id).elements.length; i++) {
				var cookie_value = getCookieValue(document.getElementById(form_id).elements[i].name);
				if (cookie_value) {
					document.getElementById(form_id).elements[i].value = cookie_value;

				}
			}

		}
		
	} // end if form elements exist
}
