/* Copyright 2007 Nuance Communications, Inc. */ 
var TalksAgent={};
TalksAgent.Cursor=function(_1){
this.node=_1;
this.isEntering=true;
this.rootNode=_1;
};
TalksAgent.Cursor.prototype={goTo:function(_2,_3){
this.node=_2;
this.isEntering=_3==null?true:_3;
},clone:function(){
var _4=new TalksAgent.Cursor(this.rootNode);
_4.goTo(this.node,this.isEntering);
return _4;
},getDocumentFrame:function(_5,_6){
var _7=null;
var _8=["frame","iframe"];
for(var j=0;j<_8.length&&_7==null;j++){
var _a;
try{
_a=_5.getElementsByTagName(_8[j]);
}
catch(e){
_a=new Array();
}
for(var i=0;i<_a.length&&_7==null;i++){
if(_a[i].contentDocument==_6){
_7=_a[i];
}else{
_7=this.getDocumentFrame(_a[i].contentDocument,_6);
}
}
}
return _7;
},getParentFrame:function(_c){
return this.getDocumentFrame(window.top.document,_c);
},next:function(){
var _d=this.node;
var _e=this.isEntering;
do{
if(_e&&_d.firstChild){
_d=_d.firstChild;
}else{
if(_e&&_d.contentDocument){
try{
var _f=_d.contentDocument.nodeType;
_d=_d.contentDocument;
}
catch(e){
_e=false;
}
}else{
if(_e&&_d.nodeType==1){
_e=false;
}else{
if(_d.nextSibling&&_d!=this.rootNode){
_d=_d.nextSibling;
_e=true;
}else{
if(_d.parentNode&&_d!=this.rootNode){
_d=_d.parentNode;
_e=false;
}else{
if(_d.nodeType==9){
_d=this.getParentFrame(_d);
_e=false;
}else{
_d=null;
}
}
}
}
}
}
}while(_d!=null&&_d.nodeType!=1&&_d.nodeType!=3);
if(_d!=null){
this.node=_d;
this.isEntering=_e;
}
return (_d!=null);
},prev:function(){
var _10=this.node;
var _11=this.isEntering;
do{
if(!_11&&_10.lastChild){
_10=_10.lastChild;
}else{
if(!_11&&_10.contentDocument){
try{
var _12=_10.contentDocument.nodeType;
_10=_10.contentDocument;
}
catch(e){
_11=true;
}
}else{
if(!_11&&_10.nodeType==1){
_11=true;
}else{
if(_10.previousSibling&&_10!=this.rootNode){
_10=_10.previousSibling;
_11=false;
}else{
if(_10.parentNode&&_10!=this.rootNode){
_10=_10.parentNode;
_11=true;
}else{
if(_10.nodeType==9){
_10=this.getParentFrame(_10);
_11=true;
}else{
_10=null;
}
}
}
}
}
}
}while(_10!=null&&_10.nodeType!=1&&_10.nodeType!=3);
if(_10!=null){
this.node=_10;
this.isEntering=_11;
}
return (_10!=null);
}};
TalksAgent.Reader=function(){
this.cursor=new TalksAgent.Cursor(document.getElementsByTagName("HTML")[0]);
window.addEventListener("keydown",TalksAgent.onKeydownEvent,true);
document.addEventListener("DOMNodeRemoved",TalksAgent.onNodeRemovedEvent,false);
this.focusedNode=null;
this.textLines=null;
this.textLine=0;
this.onSummary=true;
this.listOfLinks=null;
this.listOfHeadings=null;
this.browseMode=this.BROWSE_MODE_LINK;
this.browseLastStop=null;
this.browseFindString="";
this.browseFindStringUC="";
var _13=document.getElementsByTagName("TITLE");
if(_13.length>0){
this.pageTitle=this.renderContent(_13[0]);
}else{
this.pageTitle="$0x638720fe$";
}
var ua=navigator.userAgent;
this.needsEditFix=ua.indexOf("NokiaE51")>=0||ua.indexOf("NokiaN81")>=0||ua.indexOf("NokiaN82")>=0||ua.indexOf("NokiaE90")>=0||ua.indexOf("Nokia6110")>=0||ua.indexOf("Nokia6120")>=0||ua.indexOf("Nokia6121")>=0||ua.indexOf("Nokia6124")>=0||ua.indexOf("BrowserNG/7.1")>=0||ua.indexOf("WicKed/7.1")>=0||ua.indexOf("Series60/5.0")>=0;
this.focusEditors=ua.indexOf("BrowserNG/7.1")>=0||ua.indexOf("WicKed/7.1")>=0;
};
TalksAgent.Reader.prototype={BROWSE_MODE_FIND:0,BROWSE_MODE_FORM:2,BROWSE_MODE_FRAME:3,BROWSE_MODE_HEADING:4,BROWSE_MODE_LINK:5,BROWSE_MODE_NON_LINK:6,BROWSE_MODE_PARA:7,BROWSE_MODE_EDIT:8,BROWSE_MODE_LIST:9,EMPTY_RE:/^[\t\n\r\x20\xA0]*$/,HEADING_RE:/^[hH][1-6]$/,cleanString:function(str){
var _16=-1;
var _17=str.length;
var ch=32;
while((ch<33||ch==160)&&++_16<_17){
ch=str.charCodeAt(_16);
}
ch=32;
while((ch<33||ch==160)&&--_17>=_16){
ch=str.charCodeAt(_17);
}
var cl=32;
for(var i=_16;i<_17+1;i++){
ch=str.charCodeAt(i);
if(cl==32){
if(ch<33||ch==160){
str=str.substr(0,i)+str.substr(i+1);
i--;
_17--;
ch=32;
}
}else{
if(ch<32||ch==160){
str=str.substr(0,i)+" "+str.substr(i+1);
ch=32;
}
}
cl=ch;
}
if(_16==0&&_17+1==str.length){
return str;
}
return str.substr(_16,_17-_16+1);
},nodeName:function(){
return this.cursor.node.nodeName.toUpperCase();
},nodeAttribute:function(_1b,def,_1d){
var val=(_1d?_1d:this.cursor.node).getAttribute(_1b);
if(val==null){
return def!=null?def:null;
}
return this.cleanString(val);
},nodeAttributeLower:function(_1f,def,_21){
var val=this.nodeAttribute(_1f,def,_21);
return val!=null?val.toLowerCase():null;
},childElementCount:function(_23,_24){
var _25=0;
var _26=_24?_24.childNodes:this.cursor.node.childNodes;
if(_26!=null){
for(i=0;i<_26.length;i++){
if(_26[i].nodeType==1&&_26[i].nodeName.toUpperCase()==_23&&!this.isHidden(_26[i])){
_25++;
}
}
}
return _25;
},getTableDimensions:function(_27){
var _28=_27?_27:this.cursor.node;
if(this.childElementCount("TBODY",_28)){
_28=_28.getElementsByTagName("TBODY")[0];
}
rows=this.childElementCount("TR",_28);
cols=this.childElementCount("TD",_28.getElementsByTagName("TR")[0]);
return [cols,rows];
},getImageAltText:function(_29){
var alt=this.nodeAttribute("alt",null,_29);
if(alt==null||alt==""){
var _2b=this.nodeAttribute("title","",_29);
if(_2b==""){
if((_29?_29:this.cursor.node).parentNode.nodeName.toUpperCase()=="A"){
_2b=this.nodeAttribute("src",null,_29);
if(_2b!=null){
var _2c=_2b.split("/");
alt=_2c[_2c.length-1];
}
}
}else{
alt=_2b;
}
}
return alt!=null?alt:"";
},simulateClick:function(_2d){
var _2e=_2d?_2d:this.cursor.node;
var _2f=true;
var _30=document.createEvent("MouseEvents");
if(_30.initMouseEvent){
_30.initMouseEvent("click",true,true,window,1,0,0,0,0,false,false,false,false,0,null);
}else{
_30.initEvent("click",true,true);
_30.view=window;
_30.detail=1;
for(var _2d=_2e;_2d!=null;_2d=_2d.parentNode){
if(_2d.onclick){
_2f&=(_2d.onclick()!=false);
}
}
}
_2f&=(_2e.dispatchEvent(_30)!=false);
return _2f;
},isEmpty:function(){
return this.cursor.node.nodeValue.match(this.EMPTY_RE);
},isInteresting:function(){
return this.cleanString(this.cursor.node.nodeValue).length>1;
},isHidden:function(_31){
_31=_31?_31:this.cursor.node;
if(_31.nodeType!=1){
return false;
}
if(_31.TalxNodeRemoved==true){
return true;
}
var _32=document.defaultView.getComputedStyle(_31,null);
return !_32||(_32.display=="none"||_32.visibility=="hidden");
},isOnLayoutTable:function(_33){
if(this.childElementCount("CAPTION",_33)!=0||this.nodeAttribute("summary","",_33)!=""){
return false;
}
var _34=this.getTableDimensions(_33);
return (_34[0]<2||_34[1]<2);
},isOnCursorStopOpen:function(){
switch(this.nodeName()){
case "BLOCKQUOTE":
case "UL":
case "OL":
case "DL":
case "TEXTAREA":
case "SELECT":
case "H1":
case "H2":
case "H3":
case "H4":
case "H5":
case "H6":
case "HTML":
return true;
case "INPUT":
var _35=this.nodeAttributeLower("type","text");
return _35!="hidden";
case "IMG":
return (this.getImageAltText()!="");
case "A":
return (this.nodeAttribute("href")!=null);
case "TABLE":
return !this.isOnLayoutTable();
}
},isOnCursorStopClose:function(){
switch(this.nodeName()){
case "BLOCKQUOTE":
case "UL":
case "OL":
case "DL":
case "HTML":
return true;
case "TABLE":
return !this.isOnLayoutTable();
}
return false;
},isIgnorableContent:function(){
if(this.cursor.node.nodeType==1){
switch(this.nodeName()){
case "A":
return (this.nodeAttribute("href")!=null);
case "H1":
case "H2":
case "H3":
case "H4":
case "H5":
case "H6":
return true;
case "CAPTION":
case "HEAD":
case "META":
case "NOSCRIPT":
case "OPTION":
case "SCRIPT":
case "STYLE":
return true;
}
}
return false;
},isOnCursorStop:function(){
if(this.cursor.node.nodeType==3){
return !this.isEmpty();
}
if(this.cursor.isEntering){
return this.isOnCursorStopOpen();
}else{
return this.isOnCursorStopClose();
}
},findMatch:function(str){
return str.toUpperCase().indexOf(this.browseFindStringUC);
},isOnBrowsingStop:function(){
if(this.cursor.node.nodeType==3){
if(this.browseMode==this.BROWSE_MODE_FIND){
this.updateTextLines();
return this.textLines&&this.findMatch(this.textLines[this.textLine])>=0;
}
return (this.browseMode==this.BROWSE_MODE_PARA||this.browseMode==this.BROWSE_MODE_NON_LINK)&&this.isInteresting();
}
if(this.cursor.node==this.browseLastStop||!this.cursor.isEntering){
return false;
}
var _37=this.nodeName();
var _38=false;
switch(this.browseMode){
case this.BROWSE_MODE_FIND:
if((_37=="A"&&this.nodeAttribute("href")!=null)||_37=="IMG"||_37.match(this.HEADING_RE)){
_38=this.findMatch(this.renderContent())>=0;
}
break;
case this.BROWSE_MODE_FORM:
_38=(_37=="FORM");
break;
case this.BROWSE_MODE_FRAME:
_38=(_37=="FRAME"||_37=="IFRAME");
break;
case this.BROWSE_MODE_HEADING:
_38=_37.match(this.HEADING_RE);
break;
case this.BROWSE_MODE_LINK:
var _39=this.nodeAttributeLower("type");
_38=((_37=="A"&&this.nodeAttribute("href")!=null)||(_37=="INPUT"&&(_39=="submit"||_39=="reset"||_39=="image"||_39=="button"))||(_37=="BUTTON"));
break;
case this.BROWSE_MODE_NON_LINK:
var _39=this.nodeAttributeLower("type");
_38=!((_37=="A"&&this.nodeAttribute("href")!=null)||(_37=="INPUT"&&(_39=="submit"||_39=="reset"||_39=="image"||_39=="button"))||(_37=="BUTTON"));
if(_38){
_38&=this.isOnCursorStop();
}
break;
case this.BROWSE_MODE_PARA:
break;
case this.BROWSE_MODE_EDIT:
var _39=this.nodeAttributeLower("type","text");
_38=(_37=="TEXTAREA"||(_37=="INPUT"&&(_39=="text"||_39=="password")));
break;
case this.BROWSE_MODE_LIST:
_38=(_37=="UL"||_37=="OL"||_37=="DL"||(_37=="TABLE"&&!this.isOnLayoutTable()));
break;
}
return _38;
},renderHtml:function(){
if(this.cursor.getParentFrame(this.cursor.node.parentNode)!=null){
if(this.cursor.isEntering){
return "$0x638720f2$";
}else{
return "$0x638720f3$";
}
}
if(!this.cursor.isEntering){
return "$0x638720fd$";
}
return this.pageTitle;
},renderContent:function(_3a){
var str="";
var cur=new TalksAgent.Cursor(_3a?_3a:this.cursor.node);
while(cur.next()){
if(cur.node.nodeType==3){
str+=cur.node.nodeValue;
}else{
if(cur.node.nodeType==1&&cur.isEntering){
switch(cur.node.nodeName.toUpperCase()){
case "A":
str+=" "+this.renderLink(cur.node);
cur.goTo(cur.node,false);
break;
case "IMG":
str+=" "+this.renderImage(cur.node);
break;
}
}
}
}
return this.cleanString(str);
},renderLink:function(_3d){
var _3e="";
var _3f=this.nodeAttribute("href",null,_3d);
if(_3f!=null){
_3e="$0x638720c7$";
if(_3f.substring(0,1)=="#"){
_3e="$0x638720ff$";
}
}
return _3e+" "+this.renderContent(_3d);
},renderImage:function(_40){
var alt=this.getImageAltText(_40);
if(alt==null){
alt="";
}else{
alt=" "+alt;
}
return "$0x638720cb$"+alt;
},renderBlockquote:function(){
if(this.cursor.isEntering){
return "$0x63872100$";
}else{
return "$0x63872101$";
}
},renderHeading:function(){
level=this.nodeName().substring(1,2);
return "$0x63872102$"+" "+level+" "+this.renderContent();
},renderInputText:function(){
return "$0x638720c8$"+" "+this.cursor.node.value;
},renderInputPassword:function(){
var val="";
if(this.cursor.node.value!=""){
val="***";
}
return "$0x638720c8$"+" "+val;
},renderInputFile:function(){
return "$0x63872103$"+" "+this.cursor.node.value+" "+"$0x63872104$";
},renderInputButton:function(){
var _43=this.nodeAttribute("title","");
if(_43==""){
_43=this.nodeAttribute("value","");
}
if(_43!=""){
_43+=" ";
}
return _43+"$0x638720c9$";
},renderInputCheckRadio:function(){
var _44=this.nodeAttribute("title","");
if(_44!=""){
_44=" "+_44;
}
var val=(this.cursor.node.checked?"$0x638720ce$":"$0x638720cf$")+" ";
var _46=this.nodeAttributeLower("type");
return val+(_46=="checkbox"?"$0x638720cd$":"$0x638720cc$")+_44;
},renderInputImage:function(){
var alt=this.getImageAltText();
if(alt==null){
alt="";
}else{
alt=" "+alt;
}
return "$0x638720cb$"+" "+"$0x638720c7$"+alt;
},renderInput:function(){
var _48=this.nodeAttributeLower("type","text");
switch(_48){
case "password":
return this.renderInputPassword();
case "text":
return this.renderInputText();
case "file":
return this.renderInputFile();
case "button":
case "submit":
return this.renderInputButton();
case "checkbox":
case "radio":
return this.renderInputCheckRadio();
case "image":
return this.renderInputImage();
}
return "";
},renderTextarea:function(){
var str=this.cleanString(this.cursor.node.value.substr(0,80));
var p=str.lastIndexOf(" ");
if(p>=0){
str=str.substr(0,p);
}
return "$0x63872105$"+" "+str;
},renderSelect:function(){
var _4b=this.nodeAttribute("title","");
if(_4b!=""){
_4b=" "+_4b;
}
var val="";
if(this.cursor.node.options.length>0){
var sel=this.cursor.node.selectedIndex;
if(sel>=0){
val=" "+this.cleanString(this.cursor.node.options[sel].text);
}
}
return "$0x638720d0$"+_4b+val;
},renderList:function(){
if(this.cursor.isEntering){
var _4e=this.childElementCount("LI");
return "$0x63872106$"+" "+_4e+" "+"$0x63872107$";
}else{
return "$0x63872108$";
}
},renderDefList:function(){
if(this.cursor.isEntering){
var _4f=this.childElementCount("DT");
return "$0x63872106$"+" "+_4f+" "+"$0x63872107$";
}else{
return "$0x63872108$";
}
},renderTable:function(){
if(this.cursor.isEntering){
var _50=this.getTableDimensions();
return "$0x63872109$"+" "+_50[0]+" "+"$0x6387210a$"+" "+_50[1]+" "+"$0x6387210b$";
}else{
return "$0x6387210c$";
}
},clickableSuffix:function(){
for(var _51=this.cursor.node;_51!=null;_51=_51.parentNode){
if(_51.nodeType==1&&_51.onclick){
return " "+"$0x6387210e$";
}
}
return "";
},renderLine:function(){
if(this.cursor.node.nodeType==3){
if(this.textLines==null){
this.updateTextLines();
}
return this.textLines[this.textLine]+this.clickableSuffix();
}
switch(this.nodeName()){
case "A":
return this.renderLink();
case "BLOCKQUOTE":
return this.renderBlockquote();
case "H1":
case "H2":
case "H3":
case "H4":
case "H5":
case "H6":
return this.renderHeading();
case "IMG":
return this.renderImage()+this.clickableSuffix();
case "INPUT":
return this.renderInput();
case "TEXTAREA":
return this.renderTextarea();
case "SELECT":
return this.renderSelect();
case "OL":
case "UL":
return this.renderList();
case "DL":
return this.renderDefList();
case "TABLE":
return this.renderTable();
case "HTML":
return this.renderHtml();
}
return "???";
},outputLine:function(_52){
document.title=_52;
},updateLinks:function(){
if(this.listOfLinks){
return;
}
this.listOfLinks=new Array();
for(var i=0;i<document.links.length;i++){
var _54=document.links[i];
if(!this.isHidden(_54)){
var _55=this.nodeAttribute("tabindex",999999+i,_54);
this.listOfLinks.push({node:_54,index:_55});
}
}
},updateHeadings:function(){
if(this.listOfHeadings){
return;
}
this.listOfHeadings=new Array();
var _56=document.getElementsByTagName("*");
for(var i=0;i<_56.length;i++){
var el=_56[i];
if(el.nodeName.match(this.HEADING_RE)&&!this.isHidden(el)){
this.listOfHeadings.push(el);
}
}
},speakCount:function(_59,_5a,_5b,_5c){
if(_59==0){
return _5a;
}else{
if(_59==1){
return _5b;
}
}
return _5c.replace(/%d/g,_59);
},buildSummary:function(){
this.updateLinks();
this.updateHeadings();
var _5d=document.getElementsByTagName("FRAME").length;
_5d+=document.getElementsByTagName("IFRAME").length;
var _5e="$0x638720f4$";
_5e+=this.speakCount(_5d,""," "+"$0x638720f5$"," "+"$0x638720f6$");
_5e+=this.speakCount(this.listOfHeadings.length,""," "+"$0x638720f8$"," "+"$0x638720f9$");
_5e+=" "+this.speakCount(this.listOfLinks.length,"$0x638720fa$","$0x638720fb$","$0x638720fc$");
return _5e;
},updateTextLines:function(){
if(this.cursor.node.nodeType==3){
this.textLines=this.cleanString(this.cursor.node.nodeValue).replace(/([A-Za-z]{2,99}["?!.:]+)\s([A-Z])/g,"$1\n$2").split("\n");
if(this.textLine>=this.textLines.length){
this.textLine=this.textLines.length-1;
}
}else{
this.textLines=null;
}
},getDefaultFocus:function(){
focus=null;
for(var i=0;i<document.links.length&&!focus;i++){
var _60=document.links[i];
if(!this.isHidden(_60)){
focus=_60;
}
}
if(!focus){
inputs=document.getElementsByTagName("INPUT");
for(var j=0;j<inputs.length&&!focus;j++){
var _62=inputs[j];
type=this.nodeAttributeLower("type","text",_62);
if(!this.isHidden(_62)&&(type=="submit"||type=="reset"||type=="button")){
focus=_62;
}
}
}
return focus;
},updateState:function(){
if(this.onSummary){
this.outputLine(this.buildSummary());
tempfocus=this.getDefaultFocus();
if(tempfocus&&tempfocus.focus){
tempfocus.focus();
}
return;
}
var _63=this.cursor.node;
if(_63!=this.focusedNode){
if(this.focusedNode!=null){
this.focusedNode.removeEventListener("change",TalksAgent.onChangeEvent,true);
this.focusedNode.blur();
if(this.focusEditors){
name=this.focusedNode.nodeName.toUpperCase();
if(name=="INPUT"||name=="TEXTAREA"||name=="SELECT"){
tempfocus=this.getDefaultFocus();
if(tempfocus&&tempfocus.focus){
tempfocus.focus();
tempfocus.blur();
tempfocus.focus();
}
}
}
this.focusedNode=null;
}
if(this.cursor.isEntering){
var _64=0;
var top=0;
var obj=_63.offsetParent?_63:_63.parentNode;
while(obj.offsetParent){
_64+=obj.offsetLeft;
top+=obj.offsetTop;
obj=obj.offsetParent;
}
window.scrollTo(_64,top);
}
if(_63.nodeType==1){
name=this.nodeName();
type=this.nodeAttributeLower("type","text",_63);
if((name=="INPUT"&&(type==null||type=="text"||type=="password"))||name=="TEXTAREA"||name=="SELECT"){
_63.addEventListener("change",TalksAgent.onChangeEvent,true);
if(!this.focusEditors||name=="INPUT"){
_63=null;
}
}
if(name=="INPUT"&&type=="image"){
_63=null;
}
}
if(_63&&_63.focus){
_63.focus();
this.focusedNode=_63;
}
}
this.outputLine(this.renderLine());
},lineDown:function(_67){
if(!_67){
if(this.onSummary){
this.onSummary=false;
return true;
}
}else{
this.onSummary=false;
if(this.cursor.node==this.cursor.rootNode&&!this.cursor.isEntering){
this.cursor.isEntering=true;
}
}
var _68=false;
var _69=false;
do{
if(this.textLines&&this.textLine<this.textLines.length-1){
this.textLine++;
}else{
if(this.cursor.isEntering&&(_69||this.isIgnorableContent())){
this.cursor.goTo(this.cursor.node,false);
}else{
if(!this.cursor.next()){
break;
}
this.textLines=null;
this.textLine=0;
_69=this.isHidden();
}
}
if(!_69){
if(_67&&this.isOnBrowsingStop()){
_67=false;
this.browseLastStop=this.cursor.node;
}
_68=!_67&&this.isOnCursorStop();
}
}while(!_68);
if(!_68){
this.cursor.goTo(this.cursor.rootNode,false);
this.browseLastStop=null;
}
return _68;
},lineUp:function(_6a){
if(!_6a){
if(this.onSummary){
this.onSummary=false;
return true;
}
}else{
this.onSummary=false;
}
var _6b=false;
var _6c=false;
do{
if(this.textLines&&this.textLine>0){
this.textLine--;
}else{
if(!this.cursor.isEntering&&(_6c||this.isIgnorableContent())){
this.cursor.goTo(this.cursor.node,true);
}else{
if(!this.cursor.prev()){
break;
}
this.textLines=null;
this.textLine=999999;
_6c=this.isHidden();
}
}
if(!_6c){
_6b=_6a?this.isOnBrowsingStop():this.isOnCursorStop();
}
}while(!_6b);
if(_6b&&_6a){
this.browseLastStop=this.cursor.node;
if(!this.isOnCursorStop()){
_6b=this.lineDown();
}
}
if(!_6b){
this.cursor.goTo(this.cursor.rootNode,true);
this.browseLastStop=null;
}
return _6b;
},gotoAnchor:function(_6d){
var _6e=document.getElementsByName(_6d.substr(1));
if(_6e.length){
this.cursor.goTo(_6e[0]);
this.textLines=null;
this.textLine=0;
if(!this.isOnCursorStop()){
this.lineDown();
}
}
},browseBy:function(_6f){
if(_6f==this.BROWSE_MODE_FIND){
var str=prompt("$0x6387210d$",this.browseFindString);
if(str==null){
return;
}
this.browseFindString=str;
this.browseFindStringUC=str.toUpperCase();
}
this.browseMode=_6f;
this.browseLastStop=null;
this.browseNext();
},browsePrev:function(){
this.lineUp(true);
},browseNext:function(){
this.lineDown(true);
},jumpToDocumentStartEnd:function(){
if(this.cursor.node==this.cursor.rootNode&&this.cursor.isEntering){
this.cursor.goTo(this.cursor.rootNode,false);
this.onSummary=false;
}else{
this.cursor.goTo(this.cursor.rootNode);
this.onSummary=true;
}
},jumpToElementStartEnd:function(){
var _71=null;
for(var _72=this.cursor.node;_72&&_72!=this.cursor.rootNode;_72=_72.parentNode){
var _73=_72.nodeName.toUpperCase();
if(_73=="OL"||_73=="UL"||_73=="DL"||(_73=="TABLE"&&!this.isOnLayoutTable(_72))){
if(this.cursor.node==_72){
this.cursor.goTo(_72,!this.cursor.isEntering);
}else{
if(_71!=null){
if(_71.nextSibling!=null){
this.cursor.goTo(_71.nextSibling);
}else{
this.cursor.goTo(_72,false);
}
}else{
}
}
if(!this.isOnCursorStop()){
this.lineDown();
}
break;
}else{
if(_73=="LI"||_73=="TR"){
_71=_72;
}
}
}
},clickLink:function(_74){
var _75=_74?_74:this.cursor.node;
var _76=_75.getAttribute("href");
if(!_76){
return false;
}
if(_76.substring(0,1)=="#"){
if(this.simulateClick(_75)){
this.gotoAnchor(_75.hash);
}
return true;
}else{
if(_75.click){
_75.click();
return true;
}else{
if(this.simulateClick(_75)){
open(_75.href,_75.target?_75.target:"_self");
}
return true;
}
}
_75.focus();
return false;
},clickText:function(_77){
if(this.needsEditFix){
var ret=window.prompt("$0x638720c8$",_77?"":this.cursor.node.value);
if(ret!=null){
this.cursor.node.value=ret;
}
return true;
}
this.cursor.node.focus();
this.focusedNode=this.cursor.node;
this.cursor.node.click();
return false;
},clickInput:function(){
var _79=this.nodeAttributeLower("type","text");
var _7a=true;
if(_79=="file"||_79=="password"||_79=="text"){
return this.clickText(_79=="password");
}else{
if(_79=="checkbox"){
this.cursor.node.checked=!this.cursor.node.checked;
}else{
this.cursor.node.click();
}
}
return _7a;
},clickLine:function(){
if(this.cursor.node.nodeType==3){
this.simulateClick();
return true;
}
var _7b=true;
switch(this.nodeName()){
case "A":
_7b=this.clickLink();
break;
case "INPUT":
_7b=this.clickInput();
break;
case "SELECT":
case "TEXTAREA":
this.cursor.node.focus();
this.focusedNode=this.cursor.node;
_7b=false;
break;
default:
var _7c=this.cursor.node.getElementsByTagName("A");
if(_7c.length){
for(var i=0;i<_7c.length;i++){
if(_7c[i].href){
return this.clickLink(_7c[i]);
}
}
}
this.simulateClick();
break;
}
return _7b;
},onKeydownEvent:function(evt){
if(window.top!=window.self){
window.top.focus();
return window.top.TalksAgent.onKeydownEvent(evt);
}
if(this.focusEditors&&this.focusedNode&&this.focusedNode.nodeType==1&&((evt.charCode>=63519&&evt.charCode<=63528)||evt.charCode==63513||evt.charCode==63514)){
name=this.nodeName();
type=this.nodeAttributeLower("type","text");
if((name=="INPUT"&&(type==null||type=="text"||type=="password"))||name=="TEXTAREA"||name=="SELECT"){
return true;
}
}
var _7f=false;
try{
switch(evt.charCode){
case 63497:
case 63510:
this.lineUp();
this.updateState();
_7f=true;
break;
case 63498:
case 63511:
this.lineDown();
this.updateState();
_7f=true;
break;
case 63512:
_7f=this.clickLine();
this.updateState();
break;
case 63519:
this.jumpToDocumentStartEnd();
this.updateState();
_7f=true;
break;
case 63520:
this.jumpToElementStartEnd();
this.updateState();
_7f=true;
break;
case 63521:
this.browseBy(this.BROWSE_MODE_FORM);
this.updateState();
_7f=true;
break;
case 63522:
this.browseBy(this.BROWSE_MODE_FRAME);
this.updateState();
_7f=true;
break;
case 63523:
this.browseBy(this.BROWSE_MODE_HEADING);
this.updateState();
_7f=true;
break;
case 63524:
this.browseBy(this.BROWSE_MODE_LINK);
this.updateState();
_7f=true;
break;
case 63525:
this.browseBy(this.BROWSE_MODE_NON_LINK);
this.updateState();
_7f=true;
break;
case 63526:
this.browseBy(this.BROWSE_MODE_PARA);
this.updateState();
_7f=true;
break;
case 63527:
this.browseBy(this.BROWSE_MODE_EDIT);
this.updateState();
_7f=true;
break;
case 63528:
this.browseBy(this.BROWSE_MODE_LIST);
this.updateState();
_7f=true;
break;
case 63513:
this.browsePrev();
this.updateState();
_7f=true;
break;
case 63514:
this.browseNext();
this.updateState();
_7f=true;
break;
case 63515:
this.browseBy(this.BROWSE_MODE_FIND);
this.updateState();
_7f=true;
break;
}
}
catch(evt){
alert(evt);
}
if(_7f){
evt.stopPropagation();
evt.preventDefault();
return false;
}
return true;
},onNodeRemovedEvent:function(evt){
evt.target.TalxNodeRemoved=true;
if(evt.target==this.cursor.node){
this.lineUp();
this.updateState();
}
return true;
},onChangeEvent:function(evt){
this.updateState();
return true;
}};
TalksAgent.onKeydownEvent=function(evt){
if(TalksAgent.reader){
TalksAgent.reader.onKeydownEvent(evt);
}
};
TalksAgent.onNodeRemovedEvent=function(evt){
if(TalksAgent.reader){
TalksAgent.reader.onNodeRemovedEvent(evt);
}
};
TalksAgent.onChangeEvent=function(evt){
if(TalksAgent.reader){
TalksAgent.reader.onChangeEvent();
}
};
TalksAgent.onLoadEvent=function(){
TalksAgent.reader=new TalksAgent.Reader();
if(window.top==window.self){
try{
TalksAgent.reader.updateState();
if(window.location.hash){
TalksAgent.reader.gotoAnchor(window.location.hash);
}
}
catch(evt){
alert(evt);
}
}
};
window.addEventListener("load",TalksAgent.onLoadEvent,true);

