//License: This program is distributed in the hope
//that it will be useful, but WITHOUT ANY WARRANTY; without
//even the implied warranty of MERCHANTABILITY or FITNESS FOR
//A PARTICULAR PURPOSE.
//This code may not be used for any commercial purpose 
//without express written consent from its creator, 
//Charles L. Chen. Please contact me at clc@clcworld.net 
//if you wish to discuss licensing issues. Thank you. 

var v_0000=new ActiveXObject("Sapi.SpVoice");var v_0001="";var v_0002="";var v_0003="";var v_0004=true;var v_0005=new Array();var v_0006=0;var v_0007=new Array();var v_0008=0;var v_0009=0;var v_0010=false;var v_0011="";var v_0012="Please select the element type to navigate by:";var v_0013="Level 1 Headings";var v_0014="Level 2 Headings";var v_0015="Level 3 Headings";var v_0016="Level 4 Headings";var v_0017="Level 5 Headings";var v_0018="Level 6 Headings";var v_0019="Links";var v_0020="Please select the element type you wish to navigate by first.";var v_0021="Please select the item you wish to jump to:";function documentLoaded(){quiet();v_0002="";v_0003="";v_0001=frames["theFrame"];v_0001.document.onkeypress=keyHandler;v_0001.focus();initLiveRegionSystem();shout("Document loaded.");}function listNavigation(){document.getElementById("selectBox1").focus();}function keyHandler(){if(v_0001.event.ctrlKey&&v_0001.event.shiftKey){v_0004=true;quiet();if(v_0001.event.keyCode==1){v_0004=false;readAll();return;}if(v_0001.event.keyCode==24){return;}if(v_0001.event.keyCode==4){read(-1);return;}if(v_0001.event.keyCode==6){read(1);return;}if(v_0001.event.keyCode==12){listNavigation();return;}}}function read(_1){if(_1>0){if(!v_0002){v_0002=getFirstAtomicObject(v_0001.document.body);}else{v_0003=v_0002;v_0002=getNextAtomicObject(v_0002);while(v_0002&&!hasText(v_0002)){v_0002=getNextAtomicObject(v_0002);}}}else{if(!v_0002){v_0002=getLastAtomicObject(v_0001.document.body);}else{v_0003=v_0002;v_0002=getPrevAtomicObject(v_0002);while(v_0002&&!hasText(v_0002)){v_0002=getPrevAtomicObject(v_0002);}}}scrollTo(v_0002);focusOn(v_0002);announceCurrentObj();var _2=getTextContent(v_0002);if(!v_0002){_2="End of document.";}say(_2);}function focusOn(_3){var _4=_3;while(_4){try{_4.focus();return;}catch(e){}_4=_4.parentNode;}}function announceCurrentObj(){var _5=getLineage(v_0002);var i=compareLineages(getLineage(v_0003),_5);while(_5[i]){var _7=generateIDInfo(_5[i]);if(_7){say(_7);}i++;}}function readAll(){if(v_0004){quiet();return;}if(ttsReady()){read(1);}if(v_0002){window.setTimeout("readAll();",0);}return;}function generateOptionsForNavSelectBox(){var _8=document.getElementById("selectBox1");while(_8.firstChild){_8.removeChild(_8.firstChild);}var _9=document.createElement("option");_9.innerText=v_0012;_8.appendChild(_9);if(v_0001.document.getElementsByTagName("h1").length>0){_9=document.createElement("option");_9.innerText=v_0013;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("h2").length>0){_9=document.createElement("option");_9.innerText=v_0014;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("h3").length>0){_9=document.createElement("option");_9.innerText=v_0015;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("h4").length>0){_9=document.createElement("option");_9.innerText=v_0016;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("h5").length>0){_9=document.createElement("option");_9.innerText=v_0017;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("h6").length>0){_9=document.createElement("option");_9.innerText=v_0018;_8.appendChild(_9);}if(v_0001.document.getElementsByTagName("a").length>0){_9=document.createElement("option");_9.innerText=v_0019;_8.appendChild(_9);}shoutSelectedIndex("selectBox1");}function generateOptionsForItemJumpSelectBox(){var _a=document.getElementById("selectBox1");var _b=document.getElementById("selectBox2");while(_b.firstChild){_b.removeChild(_b.firstChild);}var _c=document.createElement("option");_c.innerText=v_0021;_b.appendChild(_c);if(_a.options[_a.selectedIndex].innerText==v_0013){for(var i=0;i<v_0001.document.getElementsByTagName("h1").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h1")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0014){for(var i=0;i<v_0001.document.getElementsByTagName("h2").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h2")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0015){for(var i=0;i<v_0001.document.getElementsByTagName("h3").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h3")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0016){for(var i=0;i<v_0001.document.getElementsByTagName("h4").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h4")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0017){for(var i=0;i<v_0001.document.getElementsByTagName("h5").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h5")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0018){for(var i=0;i<v_0001.document.getElementsByTagName("h6").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("h6")[i]);_b.appendChild(_c);}}else{if(_a.options[_a.selectedIndex].innerText==v_0019){for(var i=0;i<v_0001.document.getElementsByTagName("a").length;i++){_c=document.createElement("option");_c.innerText=getTextContent(v_0001.document.getElementsByTagName("a")[i]);_b.appendChild(_c);}}else{while(_b.firstChild){_b.removeChild(_b.firstChild);}_c=document.createElement("option");_c.innerText=v_0020;_b.appendChild(_c);}}}}}}}shoutSelectedIndex("selectBox2");}function shoutSelectedIndex(_14){var _15=document.getElementById(_14);shout(_15.options[_15.selectedIndex].innerText);}function selectBox1KeyHandler(){if(window.event.keyCode==13){var _16=document.getElementById("selectBox1");var _17=document.getElementById("selectBox2");if(_16.selectedIndex>0){_17.focus();return;}shoutSelectedIndex("selectBox1");}}function selectBox2KeyHandler(){if(window.event.keyCode==13){var _18=document.getElementById("selectBox1");var _19=document.getElementById("selectBox2");var _1a=_19.selectedIndex-1;if(_1a<0){shoutSelectedIndex("selectBox2");return;}if(_18.options[_18.selectedIndex].innerText==v_0013){jumpTo(v_0001.document.getElementsByTagName("h1")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0014){jumpTo(v_0001.document.getElementsByTagName("h2")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0015){jumpTo(v_0001.document.getElementsByTagName("h3")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0016){jumpTo(v_0001.document.getElementsByTagName("h4")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0017){jumpTo(v_0001.document.getElementsByTagName("h5")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0018){jumpTo(v_0001.document.getElementsByTagName("h6")[_1a]);return;}else{if(_18.options[_18.selectedIndex].innerText==v_0019){jumpTo(v_0001.document.getElementsByTagName("a")[_1a]);return;}}}}}}}}}function jumpTo(_1b){v_0001.focus();v_0003="";v_0002=_1b;scrollTo(v_0002);focusOn(v_0002);announceCurrentObj();say(getTextContent(v_0002));}function initLiveRegionSystem(){v_0005=new Array();v_0006=0;v_0007=new Array();v_0008=0;v_0009=0;v_0010=false;v_0011="";createLiveRegionsArray();if(v_0005.length>0){processLiveRegionChanges();}}function liveRegionObj(){this.domObj="";this.liveness="";this.textContent="";this.lastChecked="";}function liveRegionChange(){this.domObj="";this.liveness="";this.textContent="";this.timestamp="";}function createLiveRegionsArray(){var _1c=v_0001.document.getElementsByTagName("*");v_0005=new Array();for(var i=0;i<_1c.length;i++){if(elementHasAttribute(_1c[i],"live")){var _1e=new liveRegionObj();_1e.domObj=_1c[i];_1e.liveness=getAttributeOf(_1c[i],"live");_1e.textContent=getTextContent(_1c[i]);var _1f=new Date();_1e.lastChecked=_1f.getTime();v_0005.push(_1e);}}}function checkForLiveRegionChanges(){if(v_0006>=v_0005.length){v_0006=0;return;}if((getTextContent(v_0005[v_0006].domObj)!=v_0005[v_0006].textContent)&&(v_0005[v_0006].liveness!="off")){v_0005[v_0006].textContent=getTextContent(v_0005[v_0006].domObj);var _20=new Date();v_0005[v_0006].lastChecked=_20.getTime();var _21=new liveRegionChange();_21.domObj=v_0005[v_0006].domObj;_21.liveness=v_0005[v_0006].liveness;_21.textContent=v_0005[v_0006].textContent;_21.timestamp=v_0005[v_0006].lastChecked;v_0007.push(_21);if(_21.liveness=="assertive"){v_0008=v_0008+1;}else{if(_21.liveness=="rude"){v_0009=v_0009+1;}}}v_0006=v_0006+1;}function processLiveRegionChanges(){var _22=new Date();var _23=_22.getTime()+100;var _24=_22.getTime();while((_24<_23)&&(v_0007.length>0)&&!v_0010){while((v_0009>0)&&(v_0007[0].liveness!="rude")){if(v_0007.shift().liveness=="assertive"){v_0008=v_0008-1;}}while((v_0009==0)&&(v_0008>0)&&(v_0007[0].liveness!="assertive")){v_0007.shift();}v_0011=v_0007[0];if((v_0011.liveness=="polite")&&ttsReady()&&v_0004){v_0007.shift();v_0010=true;window.setTimeout("announceLiveRegionChange();",0);}else{if(v_0011.liveness=="assertive"){v_0004=true;if(ttsReady()){v_0007.shift();v_0008=v_0008-1;v_0010=true;window.setTimeout("announceLiveRegionChange();",0);}}else{if(v_0011.liveness=="rude"){v_0004=true;quiet();v_0007.shift();v_0009=v_0009-1;v_0010=true;window.setTimeout("announceLiveRegionChange();",0);}else{v_0007.shift();}}}_22=new Date();_24=_22.getTime();}checkForLiveRegionChanges();while((_24<_23)&&(v_0006<v_0005.length)){checkForLiveRegionChanges();_22=new Date();_24=_22.getTime();}window.setTimeout("processLiveRegionChanges();",750);}function announceLiveRegionChange(){v_0010=false;if(v_0011.domObj.CLC_LastAnnouncedTime&&(v_0011.domObj.CLC_LastAnnouncedTime>v_0011.timestamp)){return;}var _25=new Date();v_0011.domObj.CLC_LastAnnouncedTime=_25.getTime();shout("Change. "+getTextContent(v_0011.domObj));}function say(_26){v_0000.Speak(_26,1);}function shout(_27){v_0000.Speak(_27,3);}function quiet(){v_0000.Speak("",3);}function ttsReady(){if(v_0000.Status.RunningState==2){return false;}return true;}function getFirstAtomicObject(_28){var _29=_28;if(_29.tagName&&_29.tagName.toLowerCase()=="math"){return _29;}if(_29.tagName&&_29.tagName.toLowerCase()=="select"){return _29;}if(_29.tagName&&_29.tagName.toLowerCase()=="iframe"){_29.contentDocument.parentPointer=_29;return getFirstAtomicObject(_29.contentDocument);}while(_29.firstChild){_29=_29.firstChild;if(_29.tagName&&_29.tagName.toLowerCase()=="math"){return _29;}if(_29.tagName&&_29.tagName.toLowerCase()=="select"){return _29;}}return _29;}function getNextAtomicObject(_2a){var _2b=_2a;if(_2b.nextSibling){return getFirstAtomicObject(_2b.nextSibling);}while((_2b.parentNode)&&(!_2b.parentNode.nextSibling)){_2b=_2b.parentNode;}if(_2b.parentPointer){return getFirstAtomicObject(_2b.parentPointer);}if(!_2b.parentNode){return 0;}else{return getFirstAtomicObject(_2b.parentNode.nextSibling);}}function elementHasAttribute(_2c,_2d){var _2e=_2c.outerHTML.substr(0,_2c.outerHTML.indexOf(_2c.innerHTML))+_2c.outerHTML.substr(_2c.outerHTML.indexOf(_2c.innerHTML)+_2c.innerHTML.length);return ((_2e.indexOf(" "+_2d+"=")>-1)||(_2e.indexOf(":"+_2d+"=")>-1));}function getAttributeOf(_2f,_30){var _31=_2f.outerHTML.indexOf(" "+_30+"=");if(_31==-1){_31=_2f.outerHTML.indexOf(":"+_30+"=");}if(_31==-1){return "";}_31=_2f.outerHTML.indexOf("\"",_31)+1;var _32=_2f.outerHTML.indexOf("\"",_31);return _2f.outerHTML.substr(_31,_32-_31);}function getTextContent(_33){if(!_33){return "";}if(_33.firstChild){var _34="";for(var i=0;i<_33.childNodes.length;i++){_34=_34+getTextContent(_33.childNodes[i])+" ";}return _34;}if(_33.nodeName&&_33.nodeName.toLowerCase()=="img"){if(elementHasAttribute(_33,"alt")&&_33.alt==""){return "";}if(elementHasAttribute(_33,"alt")){return _33.alt;}return _33.src;}if(_33.nodeName=="#text"){return _33.nodeValue;}if(_33.innerText){return _33.innerText;}return "";}function scrollTo(_36){var _37=_36;if(_37.nodeName=="#text"){_37=_37.parentNode;}var top=0;var _39=0;while(_37){top=top+_37.offsetTop;_39=_39+_37.offsetLeft;_37=_37.offsetParent;}if(isNaN(_39)||isNaN(top)){return;}v_0001.scrollTo(_39,top);}function hasText(_3a){if(_3a.localName&&(_3a.localName.toLowerCase()=="head")){return false;}if(_3a.localName&&(_3a.localName.toLowerCase()=="script")){return false;}if(_3a.localName&&(_3a.localName.toLowerCase()=="input")){if(_3a.type.toLowerCase()=="hidden"){return false;}return true;}if(_3a.localName&&(_3a.localName.toLowerCase()=="select")){if(_3a.type.toLowerCase()=="hidden"){return false;}return true;}if(_3a.localName&&(_3a.localName.toLowerCase()=="textarea")){return true;}if(_3a.parentNode&&_3a.parentNode.localName&&(_3a.parentNode.localName.toLowerCase()=="textarea")){return true;}if(_3a.localName&&(_3a.localName.toLowerCase()=="iframe")){return true;}if(_3a.localName&&(_3a.localName.toLowerCase()=="img")&&_3a.hasAttribute("alt")){return isSpeakableString(_3a.alt);}if(_3a.localName&&(_3a.localName.toLowerCase()=="img")&&!_3a.hasAttribute("alt")){return true;}if(!getTextContent(_3a)){return false;}return isSpeakableString(getTextContent(_3a));}function isSpeakableString(_3b){for(var i=0;i<_3b.length;i++){if(isSpeakableChar(_3b[i])){return true;}}return false;}function isSpeakableChar(_3d){if(_3d=="\n"||_3d==" "||_3d=="\t"||_3d=="\v"||_3d=="\\"||_3d=="\r"){return false;}return true;}function getLineage(_3e){var _3f=new Array();var _40=_3e;while(_40){_3f.push(_40);if(_40.parentPointer){_40=_40.parentPointer;}else{_40=_40.parentNode;}}_3f.reverse();while(_3f.length&&!_3f[0].tagName&&!_3f[0].nodeValue){_3f.shift();}return _3f;}function compareLineages(_41,_42){var i=0;while(_41[i]&&_42[i]&&(_41[i]==_42[i])){i++;}if(!_41[i]&&!_42[i]){i=-1;}return i;}function getLastAtomicObject(_44){var _45=_44;if(_45.tagName&&_45.tagName.toLowerCase()=="math"){return _45;}if(_45.tagName&&_45.tagName.toLowerCase()=="select"){return _45;}if(_45.tagName&&_45.tagName.toLowerCase()=="iframe"){_45.contentDocument.parentPointer=_45;return getLastAtomicObject(_45.contentDocument);}while(_45.lastChild){_45=_45.lastChild;if(_45.tagName&&_45.tagName.toLowerCase()=="math"){return _45;}if(_45.tagName&&_45.tagName.toLowerCase()=="select"){return _45;}}return _45;}function getPrevAtomicObject(_46){var _47=_46;if(_47.previousSibling){return getLastAtomicObject(_47.previousSibling);}while((_47.parentNode)&&(!_47.parentNode.previousSibling)){_47=_47.parentNode;}if(_47.parentPointer){return getLastAtomicObject(_47.parentPointer);}if(!_47.parentNode){return 0;}else{return getLastAtomicObject(_47.parentNode.previousSibling);}}function generateIDInfo(_48){if(!_48){return "";}if(!_48.tagName){return "";}if(_48.tagName.toLowerCase()=="a"){return a_Info1(_48);}else{if(_48.tagName.toLowerCase()=="abbr"){return abbr_Info1(_48);}else{if(_48.tagName.toLowerCase()=="acronym"){return acronym_Info1(_48);}else{if(_48.tagName.toLowerCase()=="blockquote"){return blockquote_Info1(_48);}else{if(_48.tagName.toLowerCase()=="body"){return body_Info1(_48);}else{if(_48.tagName.toLowerCase()=="button"){return button_Info1(_48);}else{if(_48.tagName.toLowerCase()=="caption"){return caption_Info1(_48);}else{if(_48.tagName.toLowerCase()=="div"){return div_Info1(_48);}else{if(_48.tagName.toLowerCase()=="fieldset"){return fieldset_Info1(_48);}else{if(_48.tagName.toLowerCase()=="frame"){return frame_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h1"){return h1_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h2"){return h2_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h3"){return h3_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h4"){return h4_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h5"){return h5_Info1(_48);}else{if(_48.tagName.toLowerCase()=="h6"){return h6_Info1(_48);}else{if(_48.tagName.toLowerCase()=="html"){return html_Info1(_48);}else{if(_48.tagName.toLowerCase()=="iframe"){return iframe_Info1(_48);}else{if(_48.tagName.toLowerCase()=="img"){return img_Info1(_48);}else{if(_48.tagName.toLowerCase()=="input"){return input_Info1(_48);}else{if(_48.tagName.toLowerCase()=="label"){return label_Info1(_48);}else{if(_48.tagName.toLowerCase()=="legend"){return legend_Info1(_48);}else{if(_48.tagName.toLowerCase()=="li"){return li_Info1(_48);}else{if(_48.tagName.toLowerCase()=="ol"){return ol_Info1(_48);}else{if(_48.tagName.toLowerCase()=="select"){return select_Info1(_48);}else{if(_48.tagName.toLowerCase()=="span"){return span_Info1(_48);}else{if(_48.tagName.toLowerCase()=="table"){return table_Info1(_48);}else{if(_48.tagName.toLowerCase()=="td"){return td_Info1(_48);}else{if(_48.tagName.toLowerCase()=="textarea"){return textarea_Info1(_48);}else{if(_48.tagName.toLowerCase()=="th"){return th_Info1(_48);}else{if(_48.tagName.toLowerCase()=="ul"){return ul_Info1(_48);}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return "";}function a_Info1(_49){if(!elementHasAttribute(_49,"href")){return "";}if(_49.href.toLowerCase().match("mailto:")){return "E-mail Link";}else{return "Link";}}function abbr_Info1(_4a){return "";}function acronym_Info1(_4b){return "";}function blockquote_Info1(_4c){return "";}function body_Info1(_4d){var _4e=_4d.getElementsByTagName("H1").length+_4d.getElementsByTagName("H2").length+_4d.getElementsByTagName("H3").length+_4d.getElementsByTagName("H4").length+_4d.getElementsByTagName("H5").length+_4d.getElementsByTagName("H6").length;var _4f=0;var _50=_4d.getElementsByTagName("a");for(var i=0;i<_50.length;i++){if(elementHasAttribute(_50[i],"href")){_4f++;}}return "Body with "+_4e+" headings and "+_4f+" links.";}function button_Info1(_52){return "";}function caption_Info1(_53){return "";}function div_Info1(_54){return "";}function fieldset_Info1(_55){return "";}function frame_Info1(_56){return "";}function h1_Info1(_57){return "Heading Level 1";}function h2_Info1(_58){return "Heading Level 2";}function h3_Info1(_59){return "Heading Level 3";}function h4_Info1(_5a){return "Heading Level 4";}function h5_Info1(_5b){return "Heading Level 5";}function h6_Info1(_5c){return "Heading Level 6";}function html_Info1(_5d){return "";}function iframe_Info1(_5e){return "";}function img_Info1(_5f){if(elementHasAttribute(_5f,"alt")&&_5f.alt==""){return "";}else{return "Graphic ";}}function input_Info1(_60){return "";}function label_Info1(_61){return "";}function legend_Info1(_62){return "";}function li_Info1(_63){return "";}function ol_Info1(_64){return "";}function select_Info1(_65){return "";}function span_Info1(_66){return "";}function table_Info1(_67){return "";}function td_Info1(_68){return "";}function textarea_Info1(_69){return "";}function th_Info1(_6a){return "";}function ul_Info1(_6b){return "";}
