﻿/* <Top Menu Script> */var menu_speed = 45; //15var menu_initialized = false;var menu_current = new Array();var menu_hide_timeout = 0;var menu_anim_timeout = 0;var menu_anim = new Array();function menu_anim_step(){    menu_anim_timeout = window.setTimeout("menu_anim_step();", 10);    for (var i=0; i<menu_anim.length; i++) {        if (menu_anim[i]==null)continue;        menu_anim[i].height += menu_anim[i].step;        var h = menu_anim[i].height;        var n = menu_anim[i].node;        if (menu_anim[i].step<0) {            if (menu_anim[i].height<=menu_anim[i].limit){                h = menu_anim[i].limit;                menu_anim[i] = null;            }        }        else {            if (menu_anim[i].height>=menu_anim[i].limit){                h = menu_anim[i].limit;                menu_anim[i] = null;            }        }        n.style.height = h+"px";        if (h==0) {            n.style.height = "1px";            n.style.visibility = 'hidden';        }        else {            n.style.visibility = 'visible';        }    }}menu_anim_step();function menu_render(id, items) {    var div = document.createElement("div");    var html = "<table cellpadding='0' cellspacing='0' border='0'><tr><td valign='top'><table id='"+id+"' cellpadding='0' cellspacing='0' border='0'>";	// Place submenus 1-14 in first table	for (var j=0; j<items.items.length&&j<13; j++) {		html += '<tr><td id="'+id+'" onmouseover="this.className=\'over\'; menu_over(this, \''+id+':'+j+'\');" onmouseout="this.className=\'\'; menu_out(this, \''+id+':'+j+'\');" onclick="menu_click(\''+id+':'+j+'\');">'+items.items[j].title+'</td></tr>';	}	html += "</table></td>";	// Place submenus 15-29	if (items.items.length>=14&&j<27) {		html += "<td valign='top'><table cellpadding='0' cellspacing='0' border='0' width='140'>";		for (j>=14; j<items.items.length&&j<27; j++) {			html += '<tr><td onmouseover="this.className=\'over\'; menu_over(this, \''+id+':'+j+'\');" onmouseout="this.className=\'\'; menu_out(this, \''+id+':'+j+'\');" onclick="menu_click(\''+id+':'+j+'\');">'+items.items[j].title+'</td></tr>';		}    	html += "</table></td>";    }	// Place submenus 30-44	if (items.items.length>=28&&j<44) {		html += "<td valign='top'><table cellpadding='0' cellspacing='0' border='0' width='130'>";		for (j>=28; j<items.items.length&&j<44; j++) {			html += '<tr><td onmouseover="this.className=\'over\'; menu_over(this, \''+id+':'+j+'\');" onmouseout="this.className=\'\'; menu_out(this, \''+id+':'+j+'\');" onclick="menu_click(\''+id+':'+j+'\');">'+items.items[j].title+'</td></tr>';		}    	html += "</table></td>";    }    // Place submenus 42+/*    if (items.items.length>=43) {		html += "<td valign='top'><table cellpadding='0' cellspacing='0' border='0' width='130'>";		for (j>=43; j<items.items.length; j++) {			html += '<tr><td onmouseover="this.className=\'over\'; menu_over(this, \''+id+':'+j+'\');" onmouseout="this.className=\'\'; menu_out(this, \''+id+':'+j+'\');" onclick="menu_click(\''+id+':'+j+'\');">'+items.items[j].title+'</td></tr>';		}    	html += "</table></td>";    }*/	else {		html += "</tr></table>";	}    if (items.className) {        div.className = "menu "+items.className;    }    else {        div.className = "menu";    }    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;		var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number		if (ieversion<=6) {			div.style.position = 'absolute';		}		else {			div.style.position = 'fixed';		}	}	else {		div.style.position = 'fixed';	}    div.style.overflow = 'hidden';//    div.style.left = '250px';    div.style.visibility = 'hidden';    if (id.indexOf(':')==-1)        div.style.height = '1px';    div.innerHTML = html;    document.body.appendChild(div);    return div;}function menu_init() {    if (menu_initialized)return;    menu_initialized = true;    if (!menu_data)return;    for (var i in menu_data) {        menu_data[i].node = menu_render(i, menu_data[i]);    }}function menu_node_pos(n) {    if (n.offsetParent) {        var pos = menu_node_pos(n.offsetParent);        pos.x+=n.offsetLeft;        pos.y+=n.offsetTop;        return pos;    }    return {x:n.offsetLeft, y:n.offsetTop};}function menu_click(id) {    var cur = menu_data;    var tmp = id.split(/:/);    var path = new Array();    for (var i=0;i<tmp.length;i++) {        if (!cur||!cur[tmp[i]]){            break;        }        path[i] = cur[tmp[i]];        if (!cur[tmp[i]].items) {            if (cur[tmp[i]].sub)                cur = cur[tmp[i]].sub.items;            else                break;        }        else            cur = cur[tmp[i]].items;    }    if (path.length==0)return;    var item = path[path.length-1];    if (item.url){        window.location = item.url;    }}function menu_over(n, id) {    if (!menu_initialized)return;    var menu_item = null;    var cur = menu_data;    var tmp = id.split(/:/);    var path = new Array();    for (var i=0;i<tmp.length;i++) {        if (!cur||!cur[tmp[i]]){            break;        }        path[i] = cur[tmp[i]];        cur = cur[tmp[i]].items;    }    window.clearTimeout(menu_hide_timeout);    for (var i=path.length; i<menu_current.length; i++ ) {        if (menu_current[i]==null)break;        if (menu_current[i].node){            if (i==0)                menu_hide_first(menu_current[i]);            else                menu_current[i].node.style.visibility = 'hidden';        }        menu_current[i] = null;    }    var i = path.length-1;    while (i>=0) {        if (menu_current[i]) {            if (menu_current[i]==path[i])break;            if (menu_current[i].node){                if (i==0)                    menu_hide_first(menu_current[i]);                else                    menu_current[i].node.style.visibility = 'hidden';            }            menu_current[i] = null;        }        i--;    }    i++;    if (i==path.length)return;    while (i<path.length) {        if (i==path.length-1 && n && path[i].node) {            var pos = menu_node_pos(n);            if (path[i].offsetLeft) {                pos.x+=path[i].offsetLeft;            }            if (i==0) {                path[i].node.style.left = pos.x+'px';//                path[i].node.style.top = pos.y+n.offsetHeight+2+'px'; - original value !!!                path[i].node.style.top = '44px';            }            else {                path[i].node.style.left = pos.x+n.offsetWidth-1+'px';                path[i].node.style.top = pos.y+'px';            }        }        if (path[i].node) {            if (i==0)                menu_show_first(path[i]);            else                path[i].node.style.visibility = 'visible';        }        menu_current[i] = path[i];        i++;    }}function menu_out(n, id) {    if (!menu_initialized)return;    window.clearTimeout(menu_hide_timeout);    menu_hide_timeout = window.setTimeout("menu_hide();", 300);}function menu_hide() {    for (var i=0; i<menu_current.length; i++ ) {        if (menu_current[i]==null)break;        if (menu_current[i].node) {            if (i==0)                menu_hide_first(menu_current[i]);            else                menu_current[i].node.style.visibility = 'hidden';        }        menu_current[i] = null;    }}function menu_hide_first(n) {    var anim = null;    var pos = menu_anim.length;    for (var i=0; i<menu_anim.length; i++) {        if (!menu_anim[i])pos = i;        if (menu_anim[i]&&menu_anim[i].node==n.node) {            anim = menu_anim[i];            break;        }    }    if (anim==null) {        anim = {node: n.node};        menu_anim[pos] = anim;    }    anim.height = n.node.offsetHeight;    n.node.style.height = anim.height+"px";    anim.limit = 0;    anim.step = -menu_speed;}function menu_show_first(n) {    var anim = null;    var pos = menu_anim.length;    for (var i=0; i<menu_anim.length; i++) {        if (!menu_anim[i])pos = i;        if (menu_anim[i]&&menu_anim[i].node==n.node) {            anim = menu_anim[i];            break;        }    }    if (anim==null) {        anim = {node: n.node};        menu_anim[pos] = anim;    }    anim.height = n.node.offsetHeight;    n.node.style.height = anim.height+"px";    anim.limit = n.node.scrollHeight+10;    anim.step = menu_speed;}/* </Top Menu Script> *//* <Top Menu Options> */var menu_data = {    home: {		items: [		]	},	offices: {		items: [			{ title: "Adult Faith",										url: "http://www.arch.pvt.k12.ia.us/AdultFaith/index.html" },			{ title: "Archdiocesan Faith Formation Commission",			url: "http://www.arch.pvt.k12.ia.us/FFCandCSB/index.html" },			{ title: "Archdiocesan Catholic School Board",				url: "http://www.arch.pvt.k12.ia.us/FFCandCSB/index.html" },			{ title: "Archives",										url: "http://www.arch.pvt.k12.ia.us/Archives/index.html" },			{ title: "Catechetical Services",							url: "http://www.arch.pvt.k12.ia.us/CatecheticalServices/index.html" },			{ title: "Catholic Charities",								url: "javascript:CathChar();" },			{ title: "Catholic Schools",								url: "http://www.arch.pvt.k12.ia.us/CathSchools/index.html" },			{ title: "Chancellor",										url: "http://www.arch.pvt.k12.ia.us/Administration/Personnel/chancellor.html" },			{ title: "Continuing Formation of Priests",					url: "http://www.arch.pvt.k12.ia.us/ContFormationPriests/index.html" },			{ title: "Council of Catholic Women",						url: "http://www.arch.pvt.k12.ia.us/ACCW/index.html" },			{ title: "Director",										url: "http://www.arch.pvt.k12.ia.us/Administration/Personnel/director.html" },			{ title: "Disaster Services",								url: "http://www.arch.pvt.k12.ia.us/DisasterServices/index.html" },			{ title: "Education Resource Center",						url: "http://www.arch.pvt.k12.ia.us/EducationResourceCenter/index.html" },			{ title: "Family Life",										url: "http://www.arch.pvt.k12.ia.us/FamilyLIfe/index.html" },			{ title: "Finance",											url: "http://www.arch.pvt.k12.ia.us/Finance/index.html" },			{ title: "Health Care Ethics/Life Issues",					url: "http://www.arch.pvt.k12.ia.us/HealthEthics-LifeIssues/index.html" },			{ title: "Hispanic Ministry",								url: "http://www.arch.pvt.k12.ia.us/HispanicMinistry/index.html" },			{ title: "Human Resources",									url: "http://www.arch.pvt.k12.ia.us/HumanResources/index.html" },			{ title: "Insurance Services",								url: "http://www.arch.pvt.k12.ia.us/InsuranceServices/index.html" },			{ title: "Informaton Technology (IT)",						url: "http://www.arch.pvt.k12.ia.us/InformationTechnology/index.html" },			{ title: "Lay Formation",									url: "http://www.arch.pvt.k12.ia.us/LayFormation/index.html" },			{ title: "Leadership Development & Pastoral Planning",		url: "http://www.arch.pvt.k12.ia.us/LeaderDevPastPlan/index.html" },			{ title: "Metropolitan Tribunal",							url: "http://www.arch.pvt.k12.ia.us/MetroTribunal/index.html" },			{ title: "Missions",										url: "http://www.arch.pvt.k12.ia.us/Missions/index.html" },			{ title: "Office of Communication",							url: "http://www.arch.pvt.k12.ia.us/OfficeCommunications/index.html" },			{ title: "Peace & Justice",									url: "javascript:PeaceJustice();" },			{ title: "Permanent Diaconate",								url: "http://www.arch.pvt.k12.ia.us/PermanentDiaconate/index.html" },			{ title: "Persons with Disabilities",						url: "http://www.arch.pvt.k12.ia.us/PersonsDisabilities/index.html" },			{ title: "Postville Relief",								url: "http://www.arch.pvt.k12.ia.us/PostvilleRelief/index.html" },			{ title: "Protection of Children",							url: "http://www.arch.pvt.k12.ia.us/ProtectionofChildren/index.html" },			{ title: "Respect Life",									url: "http://www.arch.pvt.k12.ia.us/RespectLife/index.html" },			{ title: "Rural Life & Community Development",				url: "http://www.arch.pvt.k12.ia.us/RuralLifeComDev/index.html" },			{ title: "Stewardship",										url: "http://www.arch.pvt.k12.ia.us/Stewardship/index.html" },			{ title: "STO",												url: "javascript:STO();" },			{ title: "Vicar General",									url: "http://www.arch.pvt.k12.ia.us/Administration/Personnel/vicargeneral.html" },			{ title: "Vocations",										url: "javascript:DBQPriesthood();" },			{ title: "Witness Newspaper",								url: "http://www.arch.pvt.k12.ia.us/Witness/index.html" },			{ title: "Worship",											url: "http://www.arch.pvt.k12.ia.us/Worship/index.html" },			{ title: "Young Adult Ministry",							url: "http://www.arch.pvt.k12.ia.us/YAC/YA/index.html" },			{ title: "Youth Evangelization",							url: "http://www.arch.pvt.k12.ia.us/YAC/YouthEvangelization/index.html" }		]	},	religious: {		items: [			{ title: "Religious Order of Women",						url: "http://www.arch.pvt.k12.ia.us/Religious/Religiouswomen.html" },			{ title: "Religious Order of Men",							url: "http://www.arch.pvt.k12.ia.us/Religious/Religiousmen.html" },			{ title: "Retirement Facilities",							url: "http://www.arch.pvt.k12.ia.us/Administration/retirementfacilities.html" }		]	},	schools: {		items: [			{ title: "Colleges/Student Centers",						url: "http://www.arch.pvt.k12.ia.us/CathSchools/colleges-studctrs.html" },			{ title: "Catholic K12 Schools",							url: "http://www.arch.pvt.k12.ia.us/CathSchools/K12Schools.html" },			{ title: "Catholic Seminaries",								url: "http://www.arch.pvt.k12.ia.us/CathSchools/cathseminaries.html" }		]	},	healthcare: {		items: [			{ title: "Health Care Facilities",							url: "http://www.arch.pvt.k12.ia.us/Administration/healthcarefacilities.html" },			{ title: "Houses for the Elderly",							url: "http://www.arch.pvt.k12.ia.us/Administration/homesforelderly.html" }		]	},	priests: {		items: [			{ title: "Active Priests",									url: "http://www.arch.pvt.k12.ia.us/PriestInfo/activepriests.html" },			{ title: "Retired Priests", 								url: "http://www.arch.pvt.k12.ia.us/PriestInfo/retiredpriests.html" },			{ title: "Deceased Priests",    							url: "http://www.arch.pvt.k12.ia.us/PriestInfo/deceasedpriests.html" }		]	},	extras: {		items: [			{ title: "The Vatican",										url: "javascript:Vatican();" },			{ title: "US Conference of Catholic Bishops",				url: "javascript:USCCBMain();" },			{ title: "Iowa Catholic Conference",						url: "javascript:ICC();" },			{ title: "Bishops' Statements",								url: "javascript:USCCBBishop();" },			{ title: "Catholic Extensions",								url: "javascript:CatholicExtension();" },			{ title: "Once Catholic Organization",						url: "javascript:OnceCatholic();" },			{ title: "Language Translation<br>(Babel Fish)",			url: "javascript:BabelFish();" },			{ title: "Active Parishioner",								url: "javascript:ActiveParishioner();" },			{ title: "Catholic Culture",								url: "javascript:CatholicCulture();" },			{ title: "Diocesan Websites",								url: "javascript:CDEducation();" }		]	},	ADS: {		items: [			{ title: "AERES",											url: "javascript:AERES();" },			{ title: "PFRKS",											url: "javascript:PFRKS();" },			{ title: "EOYP1",											url: "javascript:EOYP1();" },			{ title: "ACFRS",											url: "javascript:ACFRS();" },			{ title: "AACDS",											url: "javascript:AACDS();" },			{ title: "AMRHE",											url: "javascript:AMRHE();" }		]	}};/* </Top Menu Options> *//* <External Links in Top Menu> */function PeaceJustice () {	window.open('http://depts.loras.edu/ministry/herman.html');}function Vatican () {	window.open('http://www.vatican.va/');}function USCCBMain () {	window.open('http://www.usccb.org/index.shtml');}function ICC () {	window.open('http://www.iowacatholicconference.org/bins/site/templates/splash.asp?NC=2477X');}function USCCBBishop () {	window.open('http://www.usccb.org/mrs/bshpstatements.shtml');}function CatholicExtension () {	window.open('http://www.catholicextension.org/');}function OnceCatholic () {	window.open('http://www.oncecatholic.org/');}function BabelFish () {	window.open('http://babelfish.yahoo.com/');}function ActiveParishioner () {	window.open('http://www.activeparishioner.com/');}function CatholicCulture () {	window.open('http://www.catholicculture.org/');}function CDEducation () {	window.open('http://www.cdeducation.org/oym/connections/dioceseusmap.htm');}function AERES () {	window.open('http://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=AERES&-startsession');}function PFRKS () {	window.open('http://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=PFRKS&-startsession');}function EOYP1 () {	window.open('http://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=EOYP1&-startsession');}function ACFRS () {	window.open('http://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=ACFRS&-startsession');}function AACDS () {	window.open('http://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=AACDS&-startsession');}function AMRHE () {	window.open('https://www.arch.pvt.k12.ia.us/fmi/iwp/cgi?-db=AMRHE&-startsession');}function STO () {	window.open('http://www.ourfaithsto.org/');}function CathChar () {	window.open('http://www.charitiesdbq.com/');}function DBQPriesthood () {	window.open('http://www.dbqpriesthood.org/');}/* </External Links in Top Menu> *//* <GoToTop, show/hide module> */var position = 0;function startPolling(maxDisplacement){	document.getElementById("scrolldown").style.visibility = "visible";	document.getElementById("gototop").style.visibility = "hidden";	setInterval("poll("+maxDisplacement+")",10);	return;}function poll(maxDisplacement){	if (navigator.appName == "Microsoft Internet Explorer"){var position = document.documentElement.scrollTop;}	else {var position = window.pageYOffset;}	if (position > 100){ document.getElementById("gototop").style.visibility = "visible"; }	else {document.getElementById("gototop").style.visibility = "hidden";}	if (position < maxDisplacement) {		document.getElementById("scrolldown").style.visibility = "visible";	}	else {		document.getElementById("scrolldown").style.visibility = "hidden";	}	return true;}			function findDisplace() {	var maxDisplacement=0;	var winHeight = window.innerHeight;	window.scrollTo(0,10000000);	if( typeof self.pageYOffset!='undefined' ) {		maxDisplacement=self.pageYOffset;//		alert(maxDisplacement);		if (maxDisplacement <= winHeight) {			var contentHeight = winHeight-305;			document.getElementById('content').style.minHeight = contentHeight + "px";		}		else {			document.getElementById('content').style.minHeight = "0px";		}	}	else if( document.compatMode && document.compatMode != 'BackCompat' ) {		maxDisplacement=document.documentElement.scrollTop;		if (maxDisplacement <= winHeight) {			var contentHeight = winHeight-305;			document.getElementById('content').style.minHeight = contentHeight + "px";		}		else {			document.getElementById('content').style.minHeight = "0px";		}	}	else if( document.body && typeof(document.body.scrollTop)!='undefined' ) {		maxDisplacement=document.body.scrollTop;		if (maxDisplacement <= winHeight) {			var contentHeight = winHeight-305;			document.getElementById('content').style.minHeight = contentHeight + "px";		}		else {			document.getElementById('content').style.minHeight = "0px";		}	}	window.scrollTo(0,0);	startPolling(maxDisplacement);		// The above code prevents anchor tags to different pages from working	// The below code corrects that problem and takes viewer to anchored area	var url = window.location.href;	var myAnchor = url.split('#')[1];	myAnchor = myAnchor.replace('#','');	window.location.hash=myAnchor; return false;	//	var myURL = url.replace('#',"");//	myURL = url.replace('html*',"html");//	alert(myAnchor);//	var clickAnchor = "#"+myAnchor;//	document.getElementById(clickAnchor).click();}/* </GoToTop, show/hide module> *//* <Anchor Auto-Scroll Module> */var AMOUNT=10; /* distance to scroll for each time */var TIME=35; /* milliseconds */var timer=null;function scrollIt(v){var direction=v?1:-1;var distance=AMOUNT*direction;window.scrollBy(0,distance);}function down(v){  if(timer) { clearInterval(timer); timer=null; }  if(v)timer=setInterval("scrollIt(true)",TIME);}/* </Anchor Auto-Scroll Module> *//* <Last Modified Module> */function lastMod() {	var x = new Date (document.lastModified);	Modif = new Date(x.toGMTString());	Year = takeYear(Modif);	Month = Modif.getMonth();	Day = Modif.getDate();	Mod = (Date.UTC(Year,Month,Day,0,0,0))/86400000;	x = new Date();	today = new Date(x.toGMTString());	Year2 = takeYear(today);	Month2 = today.getMonth();	Day2 = today.getDate();	now = (Date.UTC(Year2,Month2,Day2,0,0,0))/86400000;	daysago = now - Mod;	if (daysago < 0) return '';	unit = 'days';	if (daysago > 365) 	{		daysago = Math.floor(daysago/365);		unit = 'years';	}	else if (daysago > 60) {		daysago = Math.floor(daysago/30);		unit = 'months';	}	else if (daysago > 14) {		daysago = Math.floor(daysago/7);		unit = 'weeks'	}	if (daysago > 359) {		var towrite = '';	}	else {		towrite = 'This page was last changed ';		if (daysago == 0) towrite += 'today';		else if (daysago == 1) towrite += 'yesterday';		else towrite += daysago + ' ' + unit + ' ago';		return towrite;	}}function takeYear(theDate) {	x = theDate.getYear();	var y = x % 100;	y += (y < 38) ? 2000 : 1900;	return y;}/* </Last Modified Module> *//* <Font Size Change Module> */var countSmall = 0;var countBig = 0;function SmallFontChange() {	countSmall ++;	changeFontSize(-1);	top.frames['archmessage'].changeFontSize(-1);}function BigFontChange() {	countBig ++;	changeFontSize(+1);	top.frames['archmessage'].changeFontSize(+1);}function DefaultFont() {	if (countBig > countSmall) {		var newCountVal = countBig - countSmall;		var newCount = 0 - newCountVal;	}	else if (countBig < countSmall) {		var newCountVal = countSmall - countBig;		var newCount = newCountVal;	}	else {		newCount = 0;	}	countBig = 0;	countSmall = 0;	newCountVal = 0;	changeFontSize(newCount);}function changeFontSize(inc) {	var p = document.getElementsByTagName('p');	for(n=0; n<p.length; n++) {		if(p[n].style.fontSize) {			var size = parseInt(p[n].style.fontSize.replace("px", ""));	    } else {			var size = 12;		}		p[n].style.fontSize = size+inc + 'px';	}	var span = document.getElementsByTagName('span');	for(n=0; n<span.length; n++) {		if(span[n].style.fontSize) {			var size = parseInt(span[n].style.fontSize.replace("px", ""));	    } else {			var size = 12;		}		span[n].style.fontSize = size+inc + 'px';	}	var textarea = document.getElementsByTagName('textarea');	for(n=0; n<textarea.length; n++) {		if(textarea[n].style.fontSize) {			var size = parseInt(textarea[n].style.fontSize.replace("px", ""));	    } else {			var size = 12;		}		textarea[n].style.fontSize = size+inc + 'px';	}	var content = document.getElementById('content')	var contentTD = content.getElementsByTagName('td')	for(n=0; n<contentTD.length; n++) {		if(contentTD[n].style.fontSize) {			var size = parseInt(contentTD[n].style.fontSize.replace("px", ""));	    } else {			var size = 12;		}		contentTD[n].style.fontSize = size+inc + 'px';	}	var gototopDiv = document.getElementById('gototop')	var gototopTD = gototopDiv.getElementsbyTagName('a')	for(n=0; n<gototopTD.length; n++) {		var size = 12;	}}/* </Font Size Change Module> *//* <Min-Height, GoToTop Link Placement Module> *//*<!--	var viewportwidth;	var viewportheight;	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight)	if (typeof window.innerWidth != 'undefined') {		viewportwidth = window.innerWidth,		viewportheight = window.innerHeight	}	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) {		viewportwidth = document.documentElement.clientWidth,		viewportheight = document.documentElement.clientHeight	} 	// older versions of IE 	else {		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,		viewportheight = document.getElementsByTagName('body')[0].clientHeight	}	var minhei = viewportheight-275;	var GTTPlacing = 25;	document.write("<style>#content{min-height:"+minhei+"px;}#gototop{position: fixed;bottom:"+GTTPlacing+"px;padding-top:0px;}</style>")*///-->/* </Min-Height, GoToTop Link Placement Module> *//* <Search Engine Module> */// Google Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/// This notice must stay intact for use//Enter domain of site to search.var domainroot="www.arch.pvt.k12.ia.us"function Gsitesearch(curobj){	curobj.q.value="site:"+domainroot+" "+curobj.qfront.value}/* </Search Engine Module> *//** * jQBrowser v0.2 - Extend jQuery's browser detection capabilities *   * http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/0.2/ * * Dave Cardwell <http://davecardwell.co.uk/> * * Built on the shoulders of giants: *   * John Resig <http://jquery.com/> *   * Peter-Paul Koch <http://www.quirksmode.org/?/js/detect.html> * * * Copyright (c) 2006 Dave Cardwell, dual licensed under the MIT and GPL * licenses: *   * http://www.opensource.org/licenses/mit-license.php *   * http://www.gnu.org/licenses/gpl.txt *//** * For the latest version of this plugin, and a discussion of its usage and * implementation, visit: *   * http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/ */new function() {    /*     * The following functions and attributes form the Public interface of the     * jQBrowser plugin, accessed externally through the $.browser object.     * See the relevant function definition later in the source for further     * information.     *     * $.browser.browser()     * $.browser.version.number()     * $.browser.version.string()     * $.browser.OS()     *     * $.browser.aol()     * $.browser.camino()     * $.browser.firefox()     * $.browser.flock()     * $.browser.icab()     * $.browser.konqueror()     * $.browser.mozilla()     * $.browser.msie()     * $.browser.netscape()     * $.browser.opera()     * $.browser.safari()     *     * $.browser.linux()     * $.browser.mac()     * $.browser.win()     */    var Public = {        // The current browser, its version as a number or a string, and the operating system its running on.          'browser': function() { return Private.browser;   },          'version': {              'number': function() { return Private.version.number; },              'string': function() { return Private.version.string; }          },               'OS': function() { return Private.OS;        },        // A boolean value indicating whether or not the given browser was detected.              'aol': function() { return Private.aol;       },           'camino': function() { return Private.camino;    },          'firefox': function() { return Private.firefox;   },            'flock': function() { return Private.flock;     },             'icab': function() { return Private.icab;      },        'konqueror': function() { return Private.konqueror; },          'mozilla': function() { return Private.mozilla;   },             'msie': function() { return Private.msie;      },         'netscape': function() { return Private.netscape;  },            'opera': function() { return Private.opera;     },           'safari': function() { return Private.safari;    },        // A boolean value indicating whether or not the given OS was detected.            'linux': function() { return Private.linux;     },              'mac': function() { return Private.mac;       },              'win': function() { return Private.win;       }    };    // Allow external access to the 'Public' interface through the $.browser object.    $.browser = Public;    /**     * The following functions and attributes form the internal methods and     * state of the jQBrowser plugin.  See the relevant function definition     * later in the source for further information.     *     * Private.browser     * Private.version     * Private.OS     *     * Private.aol     * Private.camino     * Private.firefox     * Private.flock     * Private.icab     * Private.konqueror     * Private.mozilla     * Private.msie     * Private.netscape     * Private.opera     * Private.safari     *     * Private.linux     * Private.mac     * Private.win     */    var Private = {        // Initially set to 'Unknown', if detected each of these properties will be updated.          'browser': 'Unknown',          'version': {              'number': undefined,              'string': 'Unknown'          },               'OS': 'Unknown',        // Initially set to false, if detected one of the following browsers will be updated.              'aol': false,           'camino': false,          'firefox': false,            'flock': false,             'icab': false,        'konqueror': false,          'mozilla': false,             'msie': false,         'netscape': false,            'opera': false,           'safari': false,        // Initially set to false, if detected one of the following operating systems will be updated.            'linux': false,              'mac': false,              'win': false    };    /*     * Loop over the items in 'data' trying to find a browser match with the     * test in data[i].browser().  Once found, attempt to determine the     * browser version.     *     *       'name': A string containing the full name of the browser.     * 'identifier': By default this is a lowercase version of 'name', but     *               this can be overwritten by explicitly defining an     *               'identifier'.     *    'browser': A function that returns a boolean value indicating     *               whether or not the given browser is detected.     *    'version': An optional function that overwrites the default version     *               testing.  Must return the result of a .match().     *     * Please note that the order of the data array is important, as some     * browsers contain details of others in their navigator.userAgent string.     * For example, Flock's contains 'Firefox' so much come before Firefox's     * test to avoid false positives.     */    for( var  i = 0,                    // counter             ua = navigator.userAgent,  // the navigator's user agent string             ve = navigator.vendor,     // the navigator's vendor string           data = [                     // browser tests and data                { // Safari <http://www.apple.com/safari/>                          'name': 'Safari',                       'browser': function() { return /Apple/.test(ve) }                },                { // Opera <http://www.opera.com/>                          'name': 'Opera',                       'browser': function() {                                      return window.opera != undefined                                  }                },                { // iCab <http://www.icab.de/>                          'name': 'iCab',                       'browser': function() { return /iCab/.test(ve) }                },                { // Konqueror <http://www.konqueror.org/>                          'name': 'Konqueror',                       'browser': function() { return /KDE/.test(ve) }                },                { // AOL Explorer <http://downloads.channel.aol.com/browser>                    'identifier': 'aol',                          'name': 'AOL Explorer',                       'browser': function() {                                      return /America Online Browser/.test(ua)                                  },                       'version': function() {                                      return ua.match(/rev(\d+(?:\.\d+)+)/)                                  }                },                { // Flock <http://www.flock.com/>                          'name': 'Flock',                       'browser': function() { return /Flock/.test(ua) }                },                { // Camino <http://www.caminobrowser.org/>                          'name': 'Camino',                       'browser': function() { return /Camino/.test(ve) }                },                { // Firefox <http://www.mozilla.com/firefox/>                          'name': 'Firefox',                       'browser': function() { return /Firefox/.test(ua) }                },                { // Netscape <http://browser.netscape.com/>                          'name': 'Netscape',                       'browser': function() { return /Netscape/.test(ua) }                },                { // Internet Explorer <http://www.microsoft.com/windows/ie/>                  //                   <http://www.microsoft.com/mac/ie/>                    'identifier': 'msie',                          'name': 'Internet Explorer',                       'browser': function() { return /MSIE/.test(ua) },                       'version': function() {                                      return ua.match(                                          /MSIE (\d+(?:\.\d+)+(?:b\d*)?)/                                      )                                  }                },                { // Mozilla <http://www.mozilla.org/products/mozilla1.x/>                          'name': 'Mozilla',                       'browser': function() {                                      return /Gecko|Mozilla/.test(ua)                                  },                       'version': function() {                                      return ua.match(/rv:(\d+(?:\.\d+)+)/)                                  }                 }             ];         i < data.length;         i++    ) {        if( data[i].browser() ) { // we have a match            // If the identifier is not explicitly set, use a lowercase version of the given name.            var identifier = data[i].identifier ? data[i].identifier                                                : data[i].name.toLowerCase();            // Make a note that this browser was detected.            Private[ identifier ] = true;            // $.browser.browser() will now return the correct browser.            Private.browser = data[i].name;            var result;            if( data[i].version != undefined && (result = data[i].version()) ) {                // Use the explicitly set test for browser version.                Private.version.string = result[1];                Private.version.number = parseFloat( result[1] );            } else {                // Otherwise use the default test which searches for the version number after the browser name in the user agent string.                var re = new RegExp(                    data[i].name + '(?:\\s|\\/)(\\d+(?:\\.\\d+)+(?:(?:a|b)\\d*)?)'                );                result = ua.match(re);                if( result != undefined ) {                    Private.version.string = result[1];                    Private.version.number = parseFloat( result[1] );                }            }            // Once we've detected the browser there is no need to check the others.            break;        }    };    /*     * Loop over the items in 'data' trying to find a operating system match     * with the test in data[i].os().     *     *       'name': A string containing the full name of the operating system.     *                   * 'identifier': By default this is a lowercase version of 'name', but     *               this can be overwritten by explicitly defining an 'identifier'.     *                   *         'OS': A function that returns a boolean value indicating     *               whether or not the given operating system is detected.     */    for( var  i = 0,                  // counter             pl = navigator.platform, // the navigator's platform string           data = [                   // OS data and tests                { // Microsoft Windows <http://www.microsoft.com/windows/>                    'identifier': 'win',                          'name': 'Windows',                            'OS': function() { return /Win/.test(pl) }                },                { // Apple Mac OS <http://www.apple.com/macos/>                          'name': 'Mac',                            'OS': function() { return /Mac/.test(pl) }                },                { // Linux <http://www.linux.org/>                          'name': 'Linux',                            'OS': function() { return /Linux/.test(pl) }                }           ];       i < data.length;       i++    ) {        if( data[i].OS() ) { // we have a match            // If the identifier is not explicitly set, use a lowercase version of the given name.            var identifier = data[i].identifier ? data[i].identifier                                                : data[i].name.toLowerCase();            // Make a note that the OS was detected.            Private[ identifier ] = true;            // $.browser.OS() will now return the correct OS.            Private.OS = data[i].name;            // Once we've detected the browser there is no need to check the others.            break;        }    };}();/* Smooth scrolling   Changes links that link to other parts of this page to scroll   smoothly to those links rather than jump to them directly, which   can be a little disorienting.   sil, http://www.kryogenix.org/   v1.0 2003-11-11   v1.1 2005-06-16 wrap it up in an object*/var ss = {  fixAllLinks: function() {    // Get a list of all links in the page    var allLinks = document.getElementsByTagName('a');    // Walk through the list    for (var i=0;i<allLinks.length;i++) {      var lnk = allLinks[i];      if ((lnk.href && lnk.href.indexOf('#') != -1) &&           ( (lnk.pathname == location.pathname) ||	    ('/'+lnk.pathname == location.pathname) ) &&           (lnk.search == location.search)) {        // If the link is internal to the page (begins in #) then attach the smoothScroll function as an onclick event handler        ss.addEvent(lnk,'click',ss.smoothScroll);      }    }  },  smoothScroll: function(e) {    // This is an event handler; get the clicked on element, in a cross-browser fashion    if (window.event) {      target = window.event.srcElement;    } else if (e) {      target = e.target;    } else return;    // Make sure that the target is an element, not a text node within an element    if (target.nodeType == 3) {      target = target.parentNode;    }    // Paranoia; check this is an A tag    if (target.nodeName.toLowerCase() != 'a') return;    // Find the <a name> tag corresponding to this href    // First strip off the hash (first character)    anchor = target.hash.substr(1);    // Now loop all A tags until we find one with that name    var allLinks = document.getElementsByTagName('a');    var allDivs = document.getElementsByTagName('div');    var all = [allLinks, allDivs];    var destinationLink = null;    for (var j=0; j<all.length; j++) {      for (var i=0;i<all[j].length;i++) {        var lnk = all[j][i];        if (lnk.name && (lnk.name == anchor)) {          destinationLink = lnk;          break;        } else if (lnk.id && (lnk.id == anchor)){	  destinationLink = lnk;          break;	}      }    }    // If we didn't find a destination, give up and let the browser do its thing    if (!destinationLink) return true;    // Find the destination's position    var destx = destinationLink.offsetLeft;     var desty = destinationLink.offsetTop;    var thisNode = destinationLink;    while (thisNode.offsetParent && (thisNode.offsetParent != document.body)) {      thisNode = thisNode.offsetParent;      destx += thisNode.offsetLeft;      desty += thisNode.offsetTop;    }    // Stop any current scrolling    clearInterval(ss.INTERVAL);    cypos = ss.getCurrentYPos();    ss_stepsize = parseInt((desty-cypos)/ss.STEPS);    ss.INTERVAL = setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);    // And stop the actual click happening    if (window.event) {      window.event.cancelBubble = true;      window.event.returnValue = false;    }    if (e && e.preventDefault && e.stopPropagation) {      e.preventDefault();      e.stopPropagation();    }  },  scrollWindow: function(scramount,dest,anchor) {    wascypos = ss.getCurrentYPos();    isAbove = (wascypos < dest);    window.scrollTo(0,wascypos + scramount);    iscypos = ss.getCurrentYPos();    isAboveNow = (iscypos < dest);    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {      // if we've just scrolled past the destination, or      // we haven't moved from the last scroll (i.e., we're at the      // bottom of the page) then scroll exactly to the link      window.scrollTo(0,dest);      // cancel the repeating timer      clearInterval(ss.INTERVAL);      // and jump to the link directly so the URL's right      location.hash = anchor;    }  },  getCurrentYPos: function() {    if (document.body && document.body.scrollTop)      return document.body.scrollTop;    if (document.documentElement && document.documentElement.scrollTop)      return document.documentElement.scrollTop;    if (window.pageYOffset)      return window.pageYOffset;    return 0;  },  addEvent: function(elm, evType, fn, useCapture) {    // addEvent and removeEvent    // cross-browser event handling for IE5+,  NS6 and Mozilla    // By Scott Andrew    if (elm.addEventListener){      elm.addEventListener(evType, fn, useCapture);      return true;    } else if (elm.attachEvent){      var r = elm.attachEvent("on"+evType, fn);      return r;    } else {      alert("Handler could not be removed");    }  } }ss.STEPS = 25;ss.addEvent(window,"load",ss.fixAllLinks);/* </Smooth Scrolling> *//*  SortTable  version 2  7th April 2007  Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/    Instructions:  Download this file  Add <script src="sorttable.js"></script> to your HTML  Add class="sortable" to any table you'd like to make sortable  Click on the headers to sort    Thanks to many, many people for contributions and suggestions.  Licenced as X11: http://www.kryogenix.org/code/browser/licence.html  This basically means: do what you want with it.*/ var stIsIE = /*@cc_on!@*/false;sorttable = {  init: function() {    // quit if this function has already been called    if (arguments.callee.done) return;    // flag this function so we don't do the same thing twice    arguments.callee.done = true;    // kill the timer    if (_timer) clearInterval(_timer);        if (!document.createElement || !document.getElementsByTagName) return;        sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;        forEach(document.getElementsByTagName('table'), function(table) {      if (table.className.search(/\bsortable\b/) != -1) {        sorttable.makeSortable(table);      }    });      },    makeSortable: function(table) {    if (table.getElementsByTagName('thead').length == 0) {      // table doesn't have a tHead. Since it should have, create one and      // put the first table row in it.      the = document.createElement('thead');      the.appendChild(table.rows[0]);      table.insertBefore(the,table.firstChild);    }    // Safari doesn't support table.tHead, sigh    if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];        if (table.tHead.rows.length != 1) return; // can't cope with two header rows        // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as    // "total" rows, for example). This is B&R, since what you're supposed    // to do is put them in a tfoot. So, if there are sortbottom rows,    // for backwards compatibility, move them to tfoot (creating it if needed).    sortbottomrows = [];    for (var i=0; i<table.rows.length; i++) {      if (table.rows[i].className.search(/\bsortbottom\b/) != -1) {        sortbottomrows[sortbottomrows.length] = table.rows[i];      }    }    if (sortbottomrows) {      if (table.tFoot == null) {        // table doesn't have a tfoot. Create one.        tfo = document.createElement('tfoot');        table.appendChild(tfo);      }      for (var i=0; i<sortbottomrows.length; i++) {        tfo.appendChild(sortbottomrows[i]);      }      delete sortbottomrows;    }        // work through each column and calculate its type    headrow = table.tHead.rows[0].cells;    for (var i=0; i<headrow.length; i++) {      // manually override the type with a sorttable_type attribute      if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col        mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);        if (mtch) { override = mtch[1]; }	      if (mtch && typeof sorttable["sort_"+override] == 'function') {	        headrow[i].sorttable_sortfunction = sorttable["sort_"+override];	      } else {	        headrow[i].sorttable_sortfunction = sorttable.guessType(table,i);	      }	      // make it clickable to sort	      headrow[i].sorttable_columnindex = i;	      headrow[i].sorttable_tbody = table.tBodies[0];	      dean_addEvent(headrow[i],"click", function(e) {          if (this.className.search(/\bsorttable_sorted\b/) != -1) {            // if we're already sorted by this column, just             // reverse the table, which is quicker            sorttable.reverse(this.sorttable_tbody);            this.className = this.className.replace('sorttable_sorted',                                                    'sorttable_sorted_reverse');            this.removeChild(document.getElementById('sorttable_sortfwdind'));            sortrevind = document.createElement('span');            sortrevind.id = "sorttable_sortrevind";            sortrevind.innerHTML = stIsIE ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;';            this.appendChild(sortrevind);            return;          }          if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {            // if we're already sorted by this column in reverse, just             // re-reverse the table, which is quicker            sorttable.reverse(this.sorttable_tbody);            this.className = this.className.replace('sorttable_sorted_reverse',                                                    'sorttable_sorted');            this.removeChild(document.getElementById('sorttable_sortrevind'));            sortfwdind = document.createElement('span');            sortfwdind.id = "sorttable_sortfwdind";            sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';            this.appendChild(sortfwdind);            return;          }                    // remove sorttable_sorted classes          theadrow = this.parentNode;          forEach(theadrow.childNodes, function(cell) {            if (cell.nodeType == 1) { // an element              cell.className = cell.className.replace('sorttable_sorted_reverse','');              cell.className = cell.className.replace('sorttable_sorted','');            }          });          sortfwdind = document.getElementById('sorttable_sortfwdind');          if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }          sortrevind = document.getElementById('sorttable_sortrevind');          if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }                    this.className += ' sorttable_sorted';          sortfwdind = document.createElement('span');          sortfwdind.id = "sorttable_sortfwdind";          sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';          this.appendChild(sortfwdind);	        // build an array to sort. This is a Schwartzian transform thing,	        // i.e., we "decorate" each row with the actual sort key,	        // sort based on the sort keys, and then put the rows back in order	        // which is a lot faster because you only do getInnerText once per row	        row_array = [];	        col = this.sorttable_columnindex;	        rows = this.sorttable_tbody.rows;	        for (var j=0; j<rows.length; j++) {	          row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];	        }	        /* If you want a stable sort, uncomment the following line */	        //sorttable.shaker_sort(row_array, this.sorttable_sortfunction);	        /* and comment out this one */	        row_array.sort(this.sorttable_sortfunction);	        	        tb = this.sorttable_tbody;	        for (var j=0; j<row_array.length; j++) {	          tb.appendChild(row_array[j][1]);	        }	        	        delete row_array;	      });	    }    }  },    guessType: function(table, column) {    // guess the type of a column based on its first non-blank row    sortfn = sorttable.sort_alpha;    for (var i=0; i<table.tBodies[0].rows.length; i++) {      text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);      if (text != '') {        if (text.match(/^-?[?$?]?[\d,.]+%?$/)) {          return sorttable.sort_numeric;        }        // check for a date: dd/mm/yyyy or dd/mm/yy         // can have / or . or - as separator        // can be mm/dd as well        possdate = text.match(sorttable.DATE_RE)        if (possdate) {          // looks like a date          first = parseInt(possdate[1]);          second = parseInt(possdate[2]);          if (first > 12) {            // definitely dd/mm            return sorttable.sort_ddmm;          } else if (second > 12) {            return sorttable.sort_mmdd;          } else {            // looks like a date, but we can't tell which, so assume            // that it's dd/mm (English imperialism!) and keep looking            sortfn = sorttable.sort_ddmm;          }        }      }    }    return sortfn;  },    getInnerText: function(node) {    // gets the text we want to use for sorting for a cell.    // strips leading and trailing whitespace.    // this is *not* a generic getInnerText function; it's special to sorttable.    // for example, you can override the cell text with a customkey attribute.    // it also gets .value for <input> fields.        hasInputs = (typeof node.getElementsByTagName == 'function') &&                 node.getElementsByTagName('input').length;        if (node.getAttribute("sorttable_customkey") != null) {      return node.getAttribute("sorttable_customkey");    }    else if (typeof node.textContent != 'undefined' && !hasInputs) {      return node.textContent.replace(/^\s+|\s+$/g, '');    }    else if (typeof node.innerText != 'undefined' && !hasInputs) {      return node.innerText.replace(/^\s+|\s+$/g, '');    }    else if (typeof node.text != 'undefined' && !hasInputs) {      return node.text.replace(/^\s+|\s+$/g, '');    }    else {      switch (node.nodeType) {        case 3:          if (node.nodeName.toLowerCase() == 'input') {            return node.value.replace(/^\s+|\s+$/g, '');          }        case 4:          return node.nodeValue.replace(/^\s+|\s+$/g, '');          break;        case 1:        case 11:          var innerText = '';          for (var i = 0; i < node.childNodes.length; i++) {            innerText += sorttable.getInnerText(node.childNodes[i]);          }          return innerText.replace(/^\s+|\s+$/g, '');          break;        default:          return '';      }    }  },    reverse: function(tbody) {    // reverse the rows in a tbody    newrows = [];    for (var i=0; i<tbody.rows.length; i++) {      newrows[newrows.length] = tbody.rows[i];    }    for (var i=newrows.length-1; i>=0; i--) {       tbody.appendChild(newrows[i]);    }    delete newrows;  },    /* sort functions     each sort function takes two parameters, a and b     you are comparing a[0] and b[0] */  sort_numeric: function(a,b) {    aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));    if (isNaN(aa)) aa = 0;    bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));     if (isNaN(bb)) bb = 0;    return aa-bb;  },  sort_alpha: function(a,b) {    if (a[0]==b[0]) return 0;    if (a[0]<b[0]) return -1;    return 1;  },  sort_ddmm: function(a,b) {    mtch = a[0].match(sorttable.DATE_RE);    y = mtch[3]; m = mtch[2]; d = mtch[1];    if (m.length == 1) m = '0'+m;    if (d.length == 1) d = '0'+d;    dt1 = y+m+d;    mtch = b[0].match(sorttable.DATE_RE);    y = mtch[3]; m = mtch[2]; d = mtch[1];    if (m.length == 1) m = '0'+m;    if (d.length == 1) d = '0'+d;    dt2 = y+m+d;    if (dt1==dt2) return 0;    if (dt1<dt2) return -1;    return 1;  },  sort_mmdd: function(a,b) {    mtch = a[0].match(sorttable.DATE_RE);    y = mtch[3]; d = mtch[2]; m = mtch[1];    if (m.length == 1) m = '0'+m;    if (d.length == 1) d = '0'+d;    dt1 = y+m+d;    mtch = b[0].match(sorttable.DATE_RE);    y = mtch[3]; d = mtch[2]; m = mtch[1];    if (m.length == 1) m = '0'+m;    if (d.length == 1) d = '0'+d;    dt2 = y+m+d;    if (dt1==dt2) return 0;    if (dt1<dt2) return -1;    return 1;  },    shaker_sort: function(list, comp_func) {    // A stable sort function to allow multi-level sorting of data    // see: http://en.wikipedia.org/wiki/Cocktail_sort    // thanks to Joseph Nahmias    var b = 0;    var t = list.length - 1;    var swap = true;    while(swap) {        swap = false;        for(var i = b; i < t; ++i) {            if ( comp_func(list[i], list[i+1]) > 0 ) {                var q = list[i]; list[i] = list[i+1]; list[i+1] = q;                swap = true;            }        } // for        t--;        if (!swap) break;        for(var i = t; i > b; --i) {            if ( comp_func(list[i], list[i-1]) < 0 ) {                var q = list[i]; list[i] = list[i-1]; list[i-1] = q;                swap = true;            }        } // for        b++;    } // while(swap)  }  }/* ******************************************************************   Supporting functions: bundled here to avoid depending on a library   ****************************************************************** */// Dean Edwards/Matthias Miller/John Resig/* for Mozilla/Opera9 */if (document.addEventListener) {    document.addEventListener("DOMContentLoaded", sorttable.init, false);}/* for Internet Explorer *//*@cc_on @*//*@if (@_win32)    document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");    var script = document.getElementById("__ie_onload");    script.onreadystatechange = function() {        if (this.readyState == "complete") {            sorttable.init(); // call the onload handler        }    };/*@end @*//* for Safari */if (/WebKit/i.test(navigator.userAgent)) { // sniff    var _timer = setInterval(function() {        if (/loaded|complete/.test(document.readyState)) {            sorttable.init(); // call the onload handler        }    }, 10);}/* for other browsers */window.onload = sorttable.init;// written by Dean Edwards, 2005// with input from Tino Zijdel, Matthias Miller, Diego Perini// http://dean.edwards.name/weblog/2005/10/add-event/function dean_addEvent(element, type, handler) {	if (element.addEventListener) {		element.addEventListener(type, handler, false);	} else {		// assign each event handler a unique ID		if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;		// create a hash table of event types for the element		if (!element.events) element.events = {};		// create a hash table of event handlers for each element/event pair		var handlers = element.events[type];		if (!handlers) {			handlers = element.events[type] = {};			// store the existing event handler (if there is one)			if (element["on" + type]) {				handlers[0] = element["on" + type];			}		}		// store the event handler in the hash table		handlers[handler.$$guid] = handler;		// assign a global event handler to do all the work		element["on" + type] = handleEvent;	}};// a counter used to create unique IDsdean_addEvent.guid = 1;function removeEvent(element, type, handler) {	if (element.removeEventListener) {		element.removeEventListener(type, handler, false);	} else {		// delete the event handler from the hash table		if (element.events && element.events[type]) {			delete element.events[type][handler.$$guid];		}	}};function handleEvent(event) {	var returnValue = true;	// grab the event object (IE uses a global event object)	event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);	// get a reference to the hash table of event handlers	var handlers = this.events[event.type];	// execute each event handler	for (var i in handlers) {		this.$$handleEvent = handlers[i];		if (this.$$handleEvent(event) === false) {			returnValue = false;		}	}	return returnValue;};function fixEvent(event) {	// add W3C standard event methods	event.preventDefault = fixEvent.preventDefault;	event.stopPropagation = fixEvent.stopPropagation;	return event;};fixEvent.preventDefault = function() {	this.returnValue = false;};fixEvent.stopPropagation = function() {  this.cancelBubble = true;}// Dean's forEach: http://dean.edwards.name/base/forEach.js/*	forEach, version 1.0	Copyright 2006, Dean Edwards	License: http://www.opensource.org/licenses/mit-license.php*/// array-like enumerationif (!Array.forEach) { // mozilla already supports this	Array.forEach = function(array, block, context) {		for (var i = 0; i < array.length; i++) {			block.call(context, array[i], i, array);		}	};}// generic enumerationFunction.prototype.forEach = function(object, block, context) {	for (var key in object) {		if (typeof this.prototype[key] == "undefined") {			block.call(context, object[key], key, object);		}	}};// character enumerationString.forEach = function(string, block, context) {	Array.forEach(string.split(""), function(chr, index) {		block.call(context, chr, index, string);	});};// globally resolve forEach enumerationvar forEach = function(object, block, context) {	if (object) {		var resolve = Object; // default		if (object instanceof Function) {			// functions have a "length" property			resolve = Function;		} else if (object.forEach instanceof Function) {			// the object implements a custom forEach method so use that			object.forEach(block, context);			return;		} else if (typeof object == "string") {			// the object is a string			resolve = String;		} else if (typeof object.length == "number") {			// the object is array-like			resolve = Array;		}		resolve.forEach(object, block, context);	}};/* </Sortable Module> *//* <Breadcrumbs Module> */// breadcrumbs	// Disabled	// To enable, uncomment by removing /* and */ below/*function breadcrumbs(){	sURL = new String;	bits = new Object;	var x = 0;	var stop = 0;	var output = "<a href=\"/\">Home</a>  >  ";	sURL = location.href;	sURL = sURL.slice(8,sURL.length);	chunkStart = sURL.indexOf("/");	sURL = sURL.slice(chunkStart+1,sURL.length)	while(!stop){		chunkStart = sURL.indexOf("/");		if (chunkStart != -1){			bits[x] = sURL.slice(0,chunkStart)			sURL = sURL.slice(chunkStart+1,sURL.length);		}else{			stop = 1;		}		x++;	}	for(var i in bits){		output += "<a href=\"";    	for(y=1;y<x-i;y++){    	  output += "../";    	}	    output += bits[i] + "/\">" + bits[i] + "</a>  >  ";	}  document.write(output.fontsize("1").fontcolor("515151") + document.title.fontsize("1").fontcolor("515151"));}*//* </End Breadcrumbs Module -- currently disabled> *//* <Header Request Module> *//*	// header requests	// This module will return size and last modified information for links. This being configured.	function insertLinkHeaders (link, headerNames, httpRequest) {	var span = document.createElement('span'); 	var headerFound = false;	for (var i = 0; i < headerNames.length; i++) {		var currentHeaderName = headerNames[i];		var currentHeader = httpRequest.getResponseHeader(currentHeaderName);		if (currentHeader) {			headerFound = true;			span.appendChild(document.createTextNode(' [' + currentHeaderName + ': ' + currentHeader + '] '));		}	}	if (headerFound) {		link.appendChild(span);	}}function getLinkHeaders (link, headerNames) {	var httpRequest;	if (typeof XMLHttpRequest != 'undefined') {		httpRequest = new XMLHttpRequest();	}	else if (typeof ActiveXObject != 'undefined') {		httpRequest = new ActiveXObject('Microsoft.XMLHTTP');	}	if (httpRequest) {		httpRequest.open('HEAD', link.href, true);		httpRequest.onreadystatechange = function (evt) {			if (httpRequest.readyState == 4 && httpRequest.status == 200) {				insertLinkHeaders(link, headerNames, httpRequest);			}		};		httpRequest.send(null);	}}function checkLinks (linkArray, headerNames) {	for (var i = 0; i < linkArray.length; i++) {		getLinkHeaders(linkArray[i], headerNames);	}}*//* </End Header Request Module -- Currently Disabled> */
