// UNESCO DHTML Scripts
// Based on code developed by Paul Sowden and
// presented at http://www.alistapart.com/articles/alternate/

// Change the style sheet from current to new as defined by "title"
function changeStyleSheet(title) {
	var i, a;
	for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
    	if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if (a.getAttribute("title") == title) { 
				a.disabled = false; 
			}
		}
	}
} // End changeStyleSheet(title)


// Check to see which style sheet is currently in use
function getActiveStyleSheet() {
	var i, a;
	for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
    	if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) {
			return a.getAttribute("title");
		}
	}
	return null;
} // End getActiveStyleSheet()


