// JavaScript Document
/* This script is property of Tanner Naeher, coyote6.com.  It may only be used as a template for others.  Any use of its images or content is strictly forbidden without written consent.*/
/* The purpose of this script is to disable any anchor that has a class of "incomplete". */

// Disable all anchors with a class of incomplete.
function disable_anchors () {
	var classname = "incomplete";
	var all_tags = document.getElementsByTagName("*");
	for (i = 0; i<all_tags.length; i++){
		// If there are more than one class than separate it into an array.
		var class_array = all_tags[i].className.split(" ");
		// Check to see if there are multiple classes in the element.
		if (class_array.length > 0) {
			// Loop through each individual class and check for a match.
			for (counter = 0; counter<class_array.length; counter++) {
				if (class_array[counter]== classname) {
					var incomplete_anchors = all_tags[i].getElementsByTagName('a');
					for (a_counter = 0; a_counter < incomplete_anchors.length; a_counter++) { 
						incomplete_anchors[a_counter].removeAttribute('href');
					}
				}
			}
		}
	}
}