<!--
	function getByID(n) {
		var d = window.document;
		if (d.getElementById)
			return d.getElementById(n);
		else if (d.all)
			return d.all[n];
	}
	
	function confirmDeleteArticle(n) {
		var exp = getByID('delete_article');
		var articles_empty = true;
		var confirmed = false;
		var i = 0;
		
		// iterates through the checkboxes.
		while (i <= n) {
			if (exp.elements[i].checked == true) { 
				articles_empty = false;
			}
			i++;
		}
			
		// if no articles are chosen, notifies the user.
		if (articles_empty) {
			confirm ("No articles were selected.");
		} else {
			confirmed = confirm ("Are you sure you want to delete the selected article(s)?");
			if (confirmed)  {
				exp.submit();
			}
		}
	}
	
	function confirmDeleteStat(n) {
		var exp = getByID('delete_stat');
		var stats_empty = true;
		var confirmed = false;
		var i = 0;
		
		// iterates through the checkboxes.
		while (i <= n) {
			if (exp.elements[i].checked == true) { 
				stats_empty = false;
			}
			i++;
		}
			
		// if no articles are chosen, notifies the user.
		if (stats_empty) {
			confirm ("No statistics were selected.");
		} else {
			confirmed = confirm ("Are you sure you want to delete the selected statistic(s)?");
			if (confirmed)  {
				exp.submit();
			}
		}
	}

	function confirmDeleteSpeaker(n) {
		var exp = getByID('delete_speaker');
		var speakers_empty = true;
		var confirmed = false;
		var i = 0;
		
		// iterates through the checkboxes.
		while (i <= n) {
			if (exp.elements[i].checked == true) { 
				speakers_empty = false;
			}
			i++;
		}
			
		// if no articles are chosen, notifies the user.
		if (speakers_empty) {
			confirm ("No speakers were selected.");
		} else {
			confirmed = confirm ("Are you sure you want to delete the selected speaker(s)?");
			if (confirmed)  {
				exp.submit();
			}
		}
	}

	function is_numeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
	
	function checkRequest(count) {
		var exp = getByID('request_brochure');
		var brochures_empty = true;
		var address_error = false;
		var member_error = false;

		// checks member fields.
		if ((exp.elements['0'].checked) && (
			exp.elements['member_number'].value == "" || 
			exp.elements['member_number'].value.length!=8 ||
			!is_numeric(exp.elements['member_number'].value)
		)) {
				member_error = true;
		}
		// iterates through selects.
		for (i=1;i<=count;i++) {
			if (exp2 = getByID('qty50_'+i)) {
				var val2 = exp2.value;
				//window.alert(i+':'+count+':'+val2);
					if (exp2.value != '0') {
					brochures_empty = false;
				}
			}
			if (exp2 = getByID('qty100_'+i)) {
				var val2 = exp2.value;
				//window.alert(i+':'+count+':'+val2);
					if (exp2.value != '0') {
					brochures_empty = false;
				}
			}
		}
		
		// checks address fields.
		if ((exp.elements['first_name'].value == "") ||
		(exp.elements['last_name'].value == "") ||
		(exp.elements['address'].value == "") ||
		(exp.elements['city'].value == "") ||
		(exp.elements['state'].value == "") ||
		(exp.elements['zip'].value == "")) { address_error = true; }
		
		// if no brochures are chosen, notifies user. if brochures are selected, then checks address. if address is empty, notifies user.
		if (member_error) {
			confirm ("Please enter a valid member number.");
		} else {
			if (brochures_empty) {
				confirm ("Please select one or more brochures.");
			} else {
				if (address_error) {
					confirm ("Please complete address information.");
				} else {
					exp.submit();
				}
			}
		}
	}

	function checkSend() {
		var exp = getByID('send_article');
		var form_error = false;
		var i = 0;
		
		// checks address fields.
		if ((exp.elements['tw0'].value == "") ||
		(exp.elements['to_name'].value == "") ||
		(exp.elements['fr0m'].value == "") ||
		(exp.elements['from_name'].value == "")) { form_error = true; }
			
		// if no information is provided, notifies user.
		if (form_error) {
			confirm ("Please complete form information.");
		} else {
			exp.submit();
		}
	}

	function anatomyOpen(obj) {
		var features = "width=640,height=530,toolbar=no,location=no,status=no,scrollbars=no,resizable=no";
		window.open(obj.href,'mind_body_health',features);
		return false; 
	}

	function updateSelectList(source,filter,target) {
		//alert(target);
		//alert(source+filter);
		var objTarget = document.getElementById(target);
		var objSource = document.getElementById(source+filter);
		while(objTarget.length > 0) {
			objTarget[0] = null;
		}
		for(var i=0;i<objSource.length;i++) {
				objTarget[objTarget.length] = new Option(objSource[i].text,objSource[i].value);
		}
	}
	
	function updateMember(flip,count) {
		var mod = '';
		
		// iterates through selects.
		if (flip.value=='yes') {
			mod = 'on';
			document.getElementById('memberNumberInput').style.display='block';
		} else {
			document.getElementById('memberNumberInput').style.display='none';
		}
		for (i=1;i<=count;i++) {
			if (document.getElementById('qty50_'+i)) {
				updateSelectList('qty50_list_',mod,'qty50_'+i);
			}			
		}
		for (i=1;i<=count;i++) {
			if (document.getElementById('qty100_'+i)) {
				updateSelectList('qty100_list_',mod,'qty100_'+i);
			}			
		}		
	}	

//-->