function getTranslationLanguage(){if(this.isTranslator())return this.authorType.substring(11,13);else return null;}function isTranslator(){return(this.authorType.length==13)&&(this.authorType.substring(0,11)=="translator_");}function isAuthor(){return(this.authorType=="author");}function getAuthorUrlCode(sourceNode,useImage){code="";if(this.webPage!="none"){if(this.webPage=="track_url")code+="<a rel=\"nofollow\" target=\"_blank\" href=\""+sourceNode.getNodeTrackUrl(this.name)+"\">";else code+="<a href=\""+this.webPage+"\" onclick=\"javascript:window.open('"+sourceNode.getNodeTrackUrl(this.name)+"'); return false;\">";}if(useImage&&this.image)code+="<img src=\""+getRelPathImages(sourceNode.url)+this.image+"\" />";else code+=this.title;if(this.webPage!="none")code+="</a>";return code;}function Author(name,title,authorType,webPage){if(AllAuthors[name]!=null){alert("Cannot create author: name "+name+" already exists");return-1;}this.name=name;this.title=title;if(authorType)this.authorType=authorType;else this.authorType="author";if(webPage)this.webPage=webPage;else this.webPage="track_url";this.language=null;this.image=null;this.extraText=null;this.getTranslationLanguage=getTranslationLanguage;this.isTranslator=isTranslator;this.isAuthor=isAuthor;this.getAuthorUrlCode=getAuthorUrlCode;AllAuthors[name]=this;return 0;}
