﻿function escapeSymbol(a){return String(a).replace(/\%/g,"%25").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/\ /g,"%20").replace(/\//g,"%2F").replace(/\#/g,"%23").replace(/\=/g,"%3D")}function jsonToQuery(e,d){var b=[],a,c=d||function(a){return escapeSymbol(a)};$.each(e,function(e,d){if($.isArray(d)){a=d.length;while(a--)b.push(e+"="+c(d[a],e))}else b.push(e+"="+c(d,e))});return b.join("&")}function queryToJson(h){var i=h.substr(h.lastIndexOf("?")+1),f=i.split("&"),j=f.length,c={},e=0,a,d,b,g;for(;e<j;e++){if(!f[e])continue;g=f[e].split("=");a=g[0];d=g[1];a=a.toLowerCase();b=c[a];if("undefined"==typeof b)c[a]=d;else if($.isArray(b))b.push(d);else c[a]=[b,d]}return c}function consolelog(a){if(typeof console!="undefined")console.log(a)}function showAdvancedSearch(){if($("#advancedsearchDiv").length==0)return;if(document.getElementById("advancedsearchDiv").style.display!="block"){document.getElementById("advancedsearchDiv").style.display="block";showAdvanceTab(0);document.getElementById("searchBarRight").style.height=document.getElementById("searchBarLeft").scrollHeight+"px";if(document.getElementById("divYearFilter"))document.getElementById("divYearFilter").style.display="none";$(".input-box-advanced-yearquery").hide();$("#yearSpanText").hide();if($(".input-box-advanced-yearquery").length>0)$(".input-box-advanced-yearquery").eq(0).show()}else hideAdvancedSearch()}function CheckAdvInput(c,b){var a=document.getElementById(c);if(a.value.length>b)a.value=a.value.substring(0,b)}function hideAdvancedSearch(){document.getElementById("advancedsearchDiv").style.display="none";document.getElementById("searchBarRight").style.height=document.getElementById("searchBarLeft").scrollHeight+"px";delCookie("advanceTabIndex");if(document.getElementById("divYearFilter"))document.getElementById("divYearFilter").style.display=""}function hideDiv(a){document.getElementById(a).style.display="none"}function showAdvanceTab(c){var a="";switch(c){case 0:a="Look for results by the following author:";break;case 1:a="Look for results from the following conference:";break;case 2:a="Look for results from the following journal:";break;case 3:a="Look for results from the following organization:";break;case 4:a="Look for results within the following time period:";break;case 5:a="Look for results using the following DOI:";default:a="Look for results that meet for the following criteria:"}$("#tdAdvancedSearchHint").html(a);setCookie("advanceTabIndex",c);setAdvancedText(c,"");j=0;var b=document.getElementById("tdCriteriaTab");for(i=0;i<b.childNodes.length;i++){if(b.childNodes[i].tagName!="SPAN")continue;if(c==j)b.childNodes[i].className="advanced-search-tab";else if(b.childNodes[i].className)b.childNodes[i].className="advanced-search-tab-unfocus";j++}}function showTimeSpanTextbox(a){if(typeof a=="undefined")return;if(typeof window.domYearQuery=="undefined"||typeof window.domYearSpanA=="undefined"||typeof window.domYearSpanB=="undefined"||typeof window.domYearSpanText=="undefined")return;switch(a){case "~":$(window.domYearQuery).hide();$(window.domYearSpanA).show();$(window.domYearSpanB).show();$(window.domYearSpanText).show();break;default:if($(window.domYearSpanA).css("display")=="none")return;$(window.domYearSpanA).hide();$(window.domYearSpanB).hide();$(window.domYearSpanText).hide();$(window.domYearQuery).show()}}function setAdvancedText(e,a){var g=">=";if(a)if(e==4&&a!=""){g=a.substring(0,1);a=a.substring(1,a.length)}var f=0,c=document.getElementById("tdCriteria");for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b].tagName!="DIV")continue;if(e==f){c.childNodes[b].style.display="block";nodes=c.childNodes[b].childNodes;for(var d=0;d<nodes.length;d++)if(nodes[d].tagName=="INPUT");}else c.childNodes[b].style.display="none";f++}}var AddToSearchRefesh=false;function addToSearch(q,p){if(AddToSearchRefesh==true)return;var d=document.getElementById(q),s=document.getElementById(p),f=document.getElementById("tdCriteria"),n=0,a,c="";for(var e=0;e<f.childNodes.length;e++){if(f.childNodes[e].tagName!="DIV")continue;if(f.childNodes[e].style.display=="block")switch(n){case 0:a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT")c=trim(a[b].value);if(c!=""){d.value="author:("+c+") "+d.value;return}break;case 1:a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT")c=trim(a[b].value);if(c!=""){d.value="conf:("+c+") "+d.value;return}break;case 2:a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT")c=trim(a[b].value);if(c!=""){d.value="jour:("+c+") "+d.value;return}break;case 3:a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT")c=trim(a[b].value);if(c!=""){d.value="org:("+c+") "+d.value;return}break;case 4:var l="",k="",m=0,g=0;a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT"||a[b].tagName=="SELECT"){if(trim(a[b].value)==""){c="";break}if(a[b].tagName=="INPUT"&&$(a[b]).css("display")!="none"){var h=/^\d+$/;if(!h.test(trim(a[b].value))){a[b].value="";c="";if($("[id$=yearSpanA]").eq(0).val()==""){$("[id$=yearSpanA]").eq(0).val(2006);g=!0}if($("[id$=yearSpanB]").eq(0).val()==""){$("[id$=yearSpanB]").eq(0).val(2011);g=!0}if($("[id$=yearQuery]").eq(0).val()==""){g=!0;$("[id$=yearQuery]").eq(0).val(2000)}continue}var r=new Number(trim(a[b].value));if(r<=0&&(c=="<"||c=="<="||c=="=")){a[b].value="";c="";if($("[id$=yearSpanA]").eq(0).val()==""){$("[id$=yearSpanA]").eq(0).val(2006);g=!0}if($("[id$=yearSpanB]").eq(0).val()==""){$("[id$=yearSpanB]").eq(0).val(2011);g=!0}if($("[id$=yearQuery]").eq(0).val()==""){g=!0;$("[id$=yearQuery]").eq(0).val(2000)}break}if(m<1)c+=trim(a[b].value);else k+=trim(a[b].value);m+=1}else{if(a[b].tagName!="SELECT")continue;c+=trim(a[b].value);l=trim(a[b].value)}}if(c!=""&&g==0){var h=new RegExp("(year"+l+"\\d+)","g");if(l!="~"){h=new RegExp("(year"+"([><~=]|>=|<=)"+"\\d+)","g");while(h.test(d.value)){d.value=trim(d.value.replace(h,""));d.value=trim(d.value.replace("  "," "))}var o=["year",c," ",d.value];d.value=o.join("")}else{h=new RegExp("(year"+"([><~=]|>=|<=)"+"\\d+)","g");while(h.test(d.value)){d.value=trim(d.value.replace(h,""));d.value=trim(d.value.replace("  "," "))}c=trim(c.replace(/[><~=]|>=|<=/g,""));k=trim(k.replace(/[><~=]|<=|>=/g,""));var i=new Number(c),j=new Number(k);if(i>j){i=i+j;j=i-j;i=i-j}var o=["year>=",i," ","year<=",j," "+d.value];d.value=o.join("")}return}break;case 5:a=f.childNodes[e].childNodes;for(var b=0;b<a.length;b++)if(a[b].tagName=="INPUT")c=trim(a[b].value);if(c!=""){d.value="doi:("+c+") "+d.value;return}}n++}}function setCookie(c,b){var a=new Date;a.setTime(a.getTime()+1800000);document.cookie=c+"="+escape(b)+";expires="+a.toGMTString()+";path=/"}function readCookie(e){var b=document.cookie,d=b.indexOf(e+"=");if(d>=0){var a=b.substring(d,b.length),c=a.indexOf(";");if(c<0)c=a.length;a=a.substring(0,c).split("=");return unescape(a[1])}else return null}function delCookie(b){var a=new Date;a.setTime(a.getTime()-1);document.cookie=b+"=;expires="+a.toGMTString()+";path=/"}var flagUserKeyDown=false;window.onload=function(){if(document.forms[0]&&flagUserKeyDown==false)document.forms[0].reset()};window.onunload=function(){if(AddToSearchRefesh==true);else delCookie("advanceTabIndex")};function trim(a){return a.replace(/^\s+|\s+$/g,"")}function request(e){var a=location.href,d=a.substring(a.indexOf("?")+1,a.length).replace("&&","&").split("&"),c={};for(i=0;j=d[i];i++)c[j.substring(0,j.indexOf("=")).toLowerCase()]=j.substring(j.indexOf("=")+1,j.length);var b=c[e.toLowerCase()];if(typeof b=="undefined")return "";else return b}DropDown={_initFlag:false,_totalNumberHash:{},Init:function(a){var b={};b.data=a;DropDown.Bind(b);$(a.inputId).bind("mousedown",a,DropDown.Bind);$(a.inputId).bind("mouseup",DropDown.Focus);$(a.hiddenId).bind("keydown",a,DropDown.tsKeyDown).keyup(DropDown.tsKeyUp).blur(DropDown.tsBlur);if(!a.suggestionWidth)$(a.tsId).width($(a.inputId).width()-2);else{$(a.tsId).width(a.suggestionWidth);$(a.tsId).width($(a.tsId).width()-4)}},Focus:function(){var a=$(DropDown.hiddenId);if(!$.browser.webkit)a.focus();var b=$(DropDown.tsId);if($(DropDown.tsId+":visible").length<=0&&DropDown._hidden_blur==false){$(" .dropdownlist-content").each(function(){$(this).hide()});$(" .dropdownlist-content-compare").each(function(){$(this).hide()});$(" .typesuggest").each(function(){$(this).hide()});DropDown.showSuggest()}else{$(" .dropdownlist-content").each(function(){$(this).hide()});DropDown.hideSuggest()}DropDown._hidden_blur=false},Bind:function(a){DropDown.inputId=a.data.inputId;DropDown.tsId=a.data.tsId;DropDown.hiddenId=a.data.hiddenId;DropDown.textId=a.data.textId;DropDown.postAction=a.data.postAction;DropDown._initFlag=true;DropDown._hidden_blur=false},tsKeyUp:function(a){if(a.keyCode==40||a.keyCode==38)if($(DropDown.tsId+":visible").length>0)return;if(a.keyCode==13||a.keyCode==37||a.keyCode==39)return},tsKeyDown:function(c){if(DropDown._initFlag==false){DropDown.Bind(c);DropDown._initFlag=true}if(c.keyCode==13){if($(DropDown.tsId).css("display")=="none")return false;var a=$(DropDown.tsId+" .selected");if(a.length>0){$(DropDown.inputId).val(a.find(":visible").first().text());DropDown.postAction();DropDown.hideSuggest()}else DropDown.hideSuggest();return false}if($(DropDown.tsId+":visible").length<=0)return;if(c.keyCode==40){var a=$(DropDown.tsId+" .selected");if(a.length==0)$(this).val($(DropDown.tsId+" div:first").addClass("selected").find(":visible").first().text());else{var d=$(DropDown.tsId+" .suggestItem").index(a[0]),b=d+1;if(b>=DropDown._totalNumberHash[DropDown.tsId])b=0;b++;try{$(DropDown.textId).html($(DropDown.tsId+" div:nth-child("+b+")").addClass("selected").find(":visible").first().text())}catch(e){}a.removeClass("selected")}}else if(c.keyCode==38){var a=$(DropDown.tsId+" .selected");if(a.length==0)$(this).val($(DropDown.tsId+" div:last").addClass("selected").find(".tsAuthorName").first().text());else{var d=$(DropDown.tsId+" .suggestItem").index(a[0]),b=d-1;if(b<0)b=DropDown._totalNumberHash[DropDown.tsId]-1;b++;$(DropDown.textId).html($(DropDown.tsId+" div:nth-child("+b+")").addClass("selected").find(":visible").first().text());a.removeClass("selected")}}return false},tsBlur:function(){if(!$(DropDown.tsId+":visible").length<=0)DropDown._hidden_blur=true;DropDown.hideSuggest()},hideSuggest:function(){$(DropDown.tsId).hide()},showSuggest:function(){DropDown.checkSelectedValue();$(DropDown.tsId).show()},SetOptions:function(b){if(b!=null&&b.length>0){var c=$(DropDown.tsId);c.empty();var a=0;for(a=0;a<b.length;a++){var d,e;d=b[a].Text;e=b[a].Value;c.append($("<div></div>").addClass("suggestItem").append("<span>"+d+'</span><span style="display:none;">'+e+"</span>"));$(c.children()[a]).attr("title",d);if(b[a].Selected&&b[a].Selected=="true")try{$(DropDown.textId).html(b[a].Text)}catch(f){}}c.children().mouseover(DropDown.itemMouseOver).mouseout(DropDown.itemMouseOut).mousedown(DropDown.itemMouseDown);DropDown._totalNumberHash[DropDown.tsId]=a}else DropDown.hideSuggest()},SetDefaultValue:function(c){var b;if(typeof c=="string")for(var a=0;a<=DropDown._totalNumberHash[DropDown.tsId];a++){b=$(DropDown.tsId+" div:nth-child("+a+")").find(":hidden").first().next().text();if(b==c)try{$(DropDown.textId).html($(DropDown.tsId+" div:nth-child("+a+")").find(":hidden").first().text())}catch(d){}}else try{$(DropDown.textId).html($(DropDown.tsId+" div:nth-child("+1+")").find(":hidden").first().text())}catch(d){}},checkSelectedValue:function(){var b,c=$(DropDown.textId).html();for(var a=0;a<DropDown._totalNumberHash[DropDown.tsId];a++){b=$(DropDown.tsId+" div:nth-child("+a+")").find(":hidden").first().text();if(b==c)$(DropDown.tsId+" div:nth-child("+a+")").addClass("selected")}},itemMouseDown:function(){try{siUrl("",DropDown.inputId.toString().replace("#",""))}catch(b){}DropDown.postAction();try{$(DropDown.textId).html($(this).find(":visible").first().text())}catch(b){}DropDown.hideSuggest();var a=$(DropDown.hiddenId);if(!$.browser.webkit)a.focus()},itemMouseOver:function(){$(DropDown.tsId+" .selected").removeClass("selected");$(this).addClass("selected")},itemMouseOut:function(){$(this).removeClass("selected")}};TypeSuggest={_initFlag:false,Init:function(a){$(a.inputId).bind("focus",a,TypeSuggest.Bind).bind("keydown",a,TypeSuggest.tsKeyDown).keyup(TypeSuggest.tsKeyUp).blur(TypeSuggest.tsBlur);$(a.tsId).width($(a.searchboxId).width()+2)},Bind:function(a){TypeSuggest.suggestType=a.data.suggestType;TypeSuggest.inputId=a.data.inputId;TypeSuggest.tsId=a.data.tsId;TypeSuggest.maxNumber=a.data.maxNumber;TypeSuggest.postAction=a.data.postAction;TypeSuggest.totalNumber=0;TypeSuggest.currentPage=0;TypeSuggest.root=a.data.root;TypeSuggest._initFlag=true},tsKeyUp:function(a){$(TypeSuggest.inputId+"nullwarning").hide();if(a.keyCode==40||a.keyCode==38)if($(TypeSuggest.tsId+":visible").length>0)return;if(a.keyCode==13||a.keyCode==37||a.keyCode==39)return;var b=$.trim(this.value);if(b.length<3){TypeSuggest.hideSuggest();return}TypeSuggest.currentPage=0;SiteRoot=TypeSuggest.root;SiteRoot=GetRealSiteRoot();$.getJSON(SiteRoot+"/io.ashx?type="+TypeSuggest.suggestType+"&c="+encodeURIComponent(b)+"&p="+TypeSuggest.currentPage,TypeSuggest.Response)},tsKeyDown:function(c){if(TypeSuggest._initFlag==false){TypeSuggest.Bind(c);TypeSuggest._initFlag=true}if(c.keyCode==13){if($(TypeSuggest.tsId).css("display")=="none")return;var a=$(TypeSuggest.tsId+" .selected");if(a.length>0){$(TypeSuggest.inputId).val(a.find(":visible").first().text());var e=$(TypeSuggest.tsId+" .selected").find(":hidden").text();TypeSuggest.postAction(e);TypeSuggest.hideSuggest()}else TypeSuggest.hideSuggest();return false}if($(TypeSuggest.tsId+":visible").length<=0)return;if(c.keyCode==40){var a=$(TypeSuggest.tsId+" .selected");if(a.length==0)$(this).val($(TypeSuggest.tsId+" div:first").addClass("selected").find(":visible").first().text());else{var d=$(TypeSuggest.tsId+" .suggestItem").index(a[0]),b=d+1;if(b>=TypeSuggest.totalNumber)b=0;b++;$(this).val($(TypeSuggest.tsId+" div:nth-child("+b+")").addClass("selected").find(":visible").first().text());a.removeClass("selected")}}else if(c.keyCode==38){var a=$(TypeSuggest.tsId+" .selected");if(a.length==0)$(this).val($(TypeSuggest.tsId+" div:last").addClass("selected").find(":visible").first().text());else{var d=$(TypeSuggest.tsId+" .suggestItem").index(a[0]),b=d-1;if(b<0)b=TypeSuggest.totalNumber-1;b++;$(this).val($(TypeSuggest.tsId+" div:nth-child("+b+")").addClass("selected").find(":visible").first().text());a.removeClass("selected")}}},tsBlur:function(){TypeSuggest.hideSuggest()},hideSuggest:function(){$(TypeSuggest.tsId).hide();$(TypeSuggest.tsId).empty();if(TypeSuggest.suggestType=="1"||TypeSuggest.suggestType=="2"||TypeSuggest.suggestType=="6")if($.trim($(TypeSuggest.inputId).val())!=""&&$(TypeSuggest.inputId+"Id").val()==0)if($(TypeSuggest.inputId+"warning").is(":hidden"))$(TypeSuggest.inputId+"hint").show();else $(TypeSuggest.inputId+"hint").hide();else $(TypeSuggest.inputId+"hint").hide()},Response:function(b){if(b!=null&&b.length>0){$("#advancedsearchDiv").hide();$("#divDomainPanel").hide();var e=$(TypeSuggest.tsId);e.show();e.empty();var d=$.trim($(TypeSuggest.inputId).val()),a=0;for(a=0;a<b.length;a++){if(TypeSuggest.maxNumber!=-1&&a>=TypeSuggest.maxNumber)break;var c,f;switch(TypeSuggest.suggestType){case 1:c=TypeSuggest.HighlightQueryContent(b[a],d);f="";break;case 7:c=b[a].FullName;f=b[a].LibraID}if(c==d)c=TypeSuggest.HighlightQueryContent(d,d);e.append($("<div></div>").addClass("suggestItem").append("<span>"+c+'</span><span style="display:none;">'+f+"</span>"))}e.children().mouseover(TypeSuggest.itemMouseOver).mouseout(TypeSuggest.itemMouseOut).mousedown(TypeSuggest.itemMouseDown);TypeSuggest.totalNumber=a}else TypeSuggest.hideSuggest()},itemMouseDown:function(){$(TypeSuggest.inputId).val($(this).find(":visible").first().text());if(TypeSuggest.suggestType==3)$("#btnSearchAuthor").click();if(TypeSuggest.suggestType==4)$("#btnSearchPaper").click();var a=$(TypeSuggest.tsId+" .selected").find(":hidden").text();TypeSuggest.postAction(a);TypeSuggest.hideSuggest()},itemMouseOver:function(){$(TypeSuggest.tsId+" .selected").removeClass("selected");$(this).addClass("selected")},itemMouseOut:function(){$(this).removeClass("selected")},HighlightQueryContent:function(a,c){if(a==null)return "";if(c==null)return a;var b=a.toLowerCase().indexOf(c.toLowerCase()),e=c.length,d="";if(b<0)d=a;else{var g=a.substr(0,b),f=a.substr(b,e),h=a.substr(b+e);d=g+"<b>"+f+"</b>"+h}return d}};$(function(){var a=$("#divHomepageIcons"),c=a.children().length-1,e=a.width()/c;a.children().each(function(){$(this).css("width",e+"px")});a.show();if(a.length>0){var d=$(" .homepagecontent").first();Homepage.Bind(d);var b=Math.floor(Math.random()*c);Homepage.Switch(b);Homepage.SwitchContent(b)}});Homepage={Bind:function(a){a.children().first().children().each(function(a){$(this).mouseover(function(){Homepage.Switch(a)});$(this).click(function(){Homepage.SwitchContent(a)});$(this).mouseout(function(){Homepage.Switch(Homepage.CurrentIndex)})})},Switch:function(e){var a,d,c,b=$($(" .homepage-icon-wrapper")[e]).first().children().first();c=b.attr("className");$($(" .homepage-icon-wrapper")[e]).children().each(function(){var a=$(this).attr("className");if(a.indexOf("-hover")<0)$(this).removeClass().addClass(a+"-hover")});b=$($(" .homepage-icon-wrapper")[Homepage.CurrentIndex]).first().children().first();currentIndexClassName=b.attr("className");b=$($(" .homepage-icon-wrapper")[Homepage.CurrentIndex]).first().children().first().next();currentIndexDivClassName=b.attr("className");$(" .homepage-icon-wrapper").each(function(){$(this).children().each(function(){a=$(this).attr("className");d=a.indexOf("-hover");if(d>0&&a!=c+"-hover"&&a!=c&&a!=currentIndexClassName&&a!=currentIndexDivClassName)$(this).removeClass().addClass(a.substring(0,d))})})},SwitchContent:function(a){$(" .content-all").each(function(){$(this).hide()});var d=$($(" .content-all")[a]).first();d.show();var e=$($(" .homepage-icon-wrapper")[a]).first(),b=e.width(),c=$("#divUpArrow"),f=a*b+b/2-c.width()/2;c.css({"left":f+40+"px"});Homepage.CurrentIndex=a;Homepage.Switch(Homepage.CurrentIndex)}};$(function(){ResolvePng()});function AdjustCFP(){if(($("#_sl_historyFrame").length>0||$(".compare-search").length>0)&&$(window).width()<1263){if($.browser.msie&&$.browser.version>6)$(" .container").first().width("1259px");else if($.browser.mozilla&&$.browser.version>="1.8")$(" .container").first().width("1263px")}else if(($("#_sl_historyFrame").length>0||$(".compare-search").length>0)&&$(window).width()>1263)$(" .container").first().width("")}function ResolvePng(){var a=/MSIE ((5\.5)|6)/.test(navigator.userAgent)&&navigator.platform=="Win32";if(a)$("img[src$=.png]:visible").each(function(){if(!this.complete)this.onload=function(){ReplacePng(this)};else ReplacePng(this)})}function ReplacePng(a){var b=new Image;b.src="../Images/blank.gif";var c=a.src;if(!a.style.width)a.style.width=$(a).width();if(!a.style.height)a.style.height=$(a).height();a.onload=function(){};a.src=b.src;a.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"',sizingMethod='scale')"}$(function(){AdjustFooter();AdjustCFP()});$(window).resize(function(){AdjustFooter();AdjustCFP()});function AdjustFooter(){if($("#domain-trend-wrapper").length>0){var c=$(" .header-wrapper").first().outerHeight(true)+$(" .content-header-wrapper-full").first().outerHeight(true),b=$(window).height(),a=$(" .footer-wrapper").first().outerHeight(true),d=b-c-a-10;$("#domain-trend-wrapper").height(d>500?d:500)}var c=$(" .container").first().outerHeight(true),b=$(window).height(),a=$(" .footer-wrapper").first().outerHeight(true);if(b>c+a)$(" .footer").first().height(b-c-10);else $(" .footer").first().height(a-10);$(" .footer-wrapper").first().css("visibility","visible")}$(function(){var a=$(" .left-wrapper .section-wrapper ul li");if(!!a)a.each(function(){$(this).mouseover(function(){$(this).children(" .evidence").show()});$(this).mouseout(function(){$(this).children(" .evidence").hide()})})});$(function(){var a=$(" .left-wrapper .section-wrapper");if(!!a)a.each(function(){var a=$(this).children(" .left-section-header").first(),b=/Related Publications \(\d+\)/;if(a.text().match(b)){$(this).children("ul").children().each(function(){$(this).css("text-indent",12);$(this).css("position","relative");var c=$(this).children().first().text();$(this).children().first().text("");$(this).children().first().prepend('<div class="li-icon"></div>');$(this).children().first().append("<span>"+c+"</span>");var b=$(this).children(" .li-icon").first();b.css("height",11);var a=$(this).children().first().children().first().next();while(a.height()>40)a.text(a.text().substring(0,a.text().length-6)+"...");$(this).mouseover(function(){$(this).children().first().children().first().attr("class","li-icon-hover")});$(this).mouseout(function(){$(this).children().first().children().first().attr("class","li-icon")})});$(this).css("visibility","visible")}})});$(function(){var a=$(" .staticTable tr");if(!!a)a.each(function(){$(this).mouseover(function(){$(this).children().first().children().first().children().first().show()});$(this).mouseout(function(){$(this).children().first().children().first().children().first().hide()})})});var currentHoveredAuthorID,currentHoveredPaperID;function ViewAuthorTooltip(g,e){var c,d,f,a;c=GetEventX(e)-36;d=GetEventY(e)+15;f=$(g).attr("href");var h=/Author\/\d+/;if(a=f.match(h)){a=a[0].replace("Author/","");var b=$("#"+CardName+a);if(b.length>0){b.css("top",d);b.css("left",c);b.show()}else{currentHoveredAuthorID=a;ShowAuthorTooltip(a,c,d)}}}var snippettooltip,showingSnippet=false,paperIDSurfix="-sufix-";function bindsnippettooltip(d){if(typeof d=="undefined")return;if($(d).attr("st")=="1")return;if($(this).attr("o")=="0"){window.snipettooltip&&clearTimeout(window.snipettooltip);$(".abstract_content_preview_tooltip").hide();$(".abstract_content_preview_outer_container").hide();return}if($(window).width()<1025){$(d).attr("st","1");return}var g,a=$(d),c=0,b=$(a).find(".title"),i=70;if(b.length<1){b=$(a).find(".title-fullwidth");i=0}var e="0",h="0";if(typeof b!="undefined"&&b.length>0){g=$(b).find("h3").find("a").attr("href");var k=/Publication\/\d+/,j=/\.\.\/\d+/,f;if(f=g.match(k))e=f[0].replace("Publication/","");else if(f=g.match(j))e=f[0].replace("../","");if($(b).find("h3").find("a").eq(0).attr("o")=="1")h="1"}if(e=="0"){$(d).attr("st","1");window.snipettooltip&&clearTimeout(window.snipettooltip);$(".abstract_content_preview_tooltip").hide();$(".abstract_content_preview_outer_container").hide();return}e=e+paperIDSurfix+Math.random();$(a).attr("o",h);$(a).attr("u",e);if(typeof b!="undefined"&&b.length>0)if(jQuery.browser.msie)c=$(a).find(".title-download").eq(0).width();else c=$(b).eq(0).width()+i;$(a).find(".content").each(function(){var a=0,d=0,b=0;$(this).children().each(function(){var c=$(this).outerWidth();if(c>600){a=c;if(c>b)b=c;a=0;return}if(c+a>730){if(a>b)b=a;a=0;return}a+=c});a=b>a?b:a;$(this).attr("w",a);if(a>c)c=a});$(a).find(".conference").each(function(){var a=0,d=0,b=0;$(this).children().each(function(){var c=$(this).outerWidth();if(c>600){a=c;if(c>b)b=c;a=0;return}if(c+a>730){b=a;a=0;return}a+=c});a=b>a?b:a;$(this).attr("w",b);if(a>c)c=a});$(a).attr("w",c);$(a).hover(function(){var a="0";a=$(this).attr("u");window.snipettooltip&&clearTimeout(window.snipettooltip);$(".abstract_content_preview_tooltip").each(function(){if($(this).attr("id")!=PaperCardArrowName+a)$(this).hide()});$(".abstract_content_preview_outer_container").each(function(){if($(this).attr("id")!=PaperCardName+a)$(this).hide()});if($(window).width()<1025)return;var i,c=$(this);if($(this).attr("o")=="0")return;var g=$(c).position().left+parseInt($(c).attr("w"))+5,e=$(c).position().top,h=$("#"+PaperCardArrowName+a);if(h.length>0){$(h).eq(0).attr("y",e).css("top",e).css("left",g).show();return}var d=[""];d.push('<a class="abstract_content_preview_tooltip" href="javascript:void(0);" style="display:none;">');d.push('<div class="abstract_content_preview_tooltip_inner_cocntainer" style="min-height: 80px; background-color: rgb(242, 242, 242);">');d.push('<div class="abstract_content_preview_tooltip_inner_arrow" style="display: inline;">');d.push("</div></div></a>");$(c).append(d.join(""));var b=$(c).find(".abstract_content_preview_tooltip").eq(0),f=$(c).height();$(b).css("position","absolute").css("top",e).css("left",g);$(b).find(".abstract_content_preview_tooltip_inner_cocntainer").eq(0).css("height",f+"px").css("min-height",f+"px");$(b).find(".abstract_content_preview_tooltip_inner_arrow").eq(0).css("margin-top",Math.floor((f-9)/2)+"px");$(b).attr("id",PaperCardArrowName+a);$(b).attr("u",a).attr("x",g).attr("y",e);$(b).css("display","block");$(b).hover(function(){currentHoveredPaperID=a;var b=$("#"+PaperCardName+a);if(b.length>0){$(b).eq(0).css("top",$(this).attr("y")).show();showingSnippet=true;return}var c=a.substr(0,a.indexOf(paperIDSurfix));ShowPaperTooltip($(this),a,c,$(this).attr("x"),$(this).attr("y"))},function(){showingSnippet=false})},function(f){var c="0";c=$(this).attr("u");var b=sj_mo(f);if(b&&sj_we(b,"paper-item","section-wrapper"))return;var d=$(a).find(".abstract_content_preview_tooltip").eq(0),e=$(a).find(".abstract_content_preview_outer_container").eq(0);snipettooltip=setTimeout(function(){if(showingSnippet==false){$(d).hide();$(e).hide()}},1000)});$(d).attr("st","1");$(d).trigger("mouseenter")}function sj_mo(a){return $.browser.msie?event.toElement:a.relatedTarget}function sj_we(a,c,d){var b=0;while(a&&a!=document.body&&!$(a).hasClass(d)){if($(a).hasClass(c))return !0;a=$(a).parent();b++;if(b>10)return !1}return !1}function HidePaperTooltip(b){return;var a=$("#"+PaperCardName+b);if(a.length>0)a.hide();currentHoveredPaperID=""}function HideAuthorTooltip(b){var d=$(b).attr("href"),c=/Author\/\d+/;if(authorID=d.match(c)){authorID=authorID[0].replace("Author/","");var a=$("#"+CardName+authorID);if(a.length>0)a.hide()}currentHoveredAuthorID=""}function GetEventX(a){var a=a||window.event;return a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft}function GetEventY(a){var a=a||window.event;return a.clientY+document.body.scrollTop+document.documentElement.scrollTop}var CardName="authorTooltipCard",PaperCardName="paperTooltipCard",PaperCardArrowName="PaperTooltipArrow";function ShowAuthorTooltip(a,b,c){SiteRoot=GetRealSiteRoot();$.getJSON(SiteRoot+"/io.ashx?authorID="+a+"&r="+Math.random(),function(f){if($("#"+CardName+a).length>0||!f)return;var e=document.createElement("div");$(e).css("position","absolute");$(e).css("top",c);$(e).css("left",b);$(e).attr("class","author-tooltip-card");$(e).attr("id",CardName+a);var j=f.DisplayName,h="";if(f.Affiliation&&f.Affiliation.FullName)h=f.Affiliation.FullName;var i=f.ImageUrl,k=" (Publication: "+f.PublicationNumber+")",l,d=[""],g=[""];if(h!=""){d.push("<div class='author-tooltip-card-inner'><div class='author-photo'><img src=\""+i);d.push('"></div>');d.push("<div class='content'>");d.push("<div class='inline-text'>"+j);d.push("<span>"+k);d.push("</span></div>");d.push("<div class='inline-text-org'>"+h);d.push("</div></div></div>")}else{d.push("<div class='author-tooltip-card-inner'><div class=author-photo><img src=\""+i);d.push('"></div>');d.push('<div class="content">');d.push('<div class="inline-text-high">'+j);d.push("<span>"+k);d.push("</span></div></div></div>")}g.push("<div class='author-tooltip-card-outer'><table cellpadding='0' cellspacing='0'>");g.push("<tr><td class='tip-left-top'></td><td class='tip-top'></td><td class='tip-right-top'></td></tr>");g.push("<tr><td class='tip-left'></td><td class='tip-center'>");g.push(d.join(""));g.push("</td><td class='tip-right'></td></tr>");g.push("<tr><td class='tip-left-bottom'></td><td class='tip-bottom'></td><td class='tip-right-bottom'></td></tr></table></div>");l=g.join("");$(e).html(l);if(a!=currentHoveredAuthorID)$(e).hide();document.body.appendChild(e)})}function ShowPaperTooltip(e,d,j,f,h){if(typeof e=="undefined")return;SiteRoot=GetRealSiteRoot();if(typeof d=="undefined"||d!=currentHoveredPaperID)return;var a=$(e);while($(a).hasClass("paper-item")==false&&$(a).is("body")==false){var i=$(a).parent();a=i}if($(a).is("body")==true)return;var b=[""];b.push('<div class="abstract_content_preview_outer_container" style="width: 375px; display: none;">');b.push('<div class="abstract_content_preview_inner_container"><div class="abstract_content_preview" style="display: block;">');b.push('<div class="abstract_content_preview_text_container"><div class="abstract_content_preview_text">');b.push("<h4>ABSTRACT</h4>");b.push("Just a moment ...");b.push("</div></div></div></div></div>");$(a).append(b.join(""));var g=$(a).height(),c=$(a).find(".abstract_content_preview_outer_container").eq(0);$(c).css("position","absolute").css("top",h+"px").css("left",parseInt(f)+15+"px");if(parseInt(f)+15+375>$(window).width())$(c).width($(window).width()-parseInt(f)-15-10);$(c).attr("id",PaperCardName+d);$(c).find(".abstract_content_preview_inner_container").eq(0).css("min-height",g+"px");$(c).css("display","block");$.getJSON(SiteRoot+"/io.ashx?id="+j+"&type=6"+"&r="+Math.random(),function(b){if(!b)return;if(typeof d=="undefined")return;var a=$(e);while($(a).hasClass("paper-item")==false&&$(a).is("body")==false){var i=$(a).parent();a=i}if($(a).is("body")==true)return;var h="";if(typeof b.Title=="string")h=b.Title;var c="";if(typeof b.Abstract=="string")c=b.Abstract;if(c=="")c="The abstract for this publication is now unavailable.";var g=$(a).find(".abstract_content_preview_outer_container").eq(0).find(".abstract_content_preview_text");if(g.length>0){var f=[""];f.push("<h4>ABSTRACT</h4>");f.push(c);$(g).eq(0).html(f.join(""))}})}function GetRealSiteRoot(){if(!SiteRoot)SiteRoot="";var b="http://",c=SiteRoot.toLocaleLowerCase().replace(b,"");if(c.indexOf("/")<0){var a=window.location.href.toLocaleLowerCase().replace(b,"");if(a.indexOf("/")>0)a=b+a.substring(0,a.indexOf("/"));SiteRoot=a}return SiteRoot}$(function(){var d=0,c=0,e=$(" .bing-summary");if(!!e){var f=e.first().width(),h=e.first().height(),g=$(" .bing-summary .action");if(!!g)f=f-g.first().outerWidth();var b=$(" .bing-summary .declare");if(!!b){d=b.first().width();c=b.first().height()}while(d+10>f||c>h){var a=b.children().sort(function(a,b){return $(a).width()>$(b).width()?-1:1}).first();while(a.length>0&&a.text()=="")a=a.children().first();if(a.length<=0)break;if(a.attr("title")=="")a.attr("title",a.text());a.text(a.text().substring(0,a.text().length-6)+"...");b=$(" .bing-summary .declare");d=b.first().width();c=b.first().height()}b.css("position","static");b.css("visibility","visible")}});function hideCopyPanel(){$("#divCopyPanel").hide();$(".view-download").css("z-index","20")}function showCopyPanel(){if($("#divCopyPanel:visible").length>0)hideCopyPanel();else{$("#divCopyPanel").show();$(".view-download").css("z-index","-1")}}function ChangeExportTextEx(c,b,d,a){$("#"+b).attr("href",a+"&download=1");$(".export-title").css("color","#0044cc");$(d).css("color","#ff6600");$.get(a,function(a){$("#"+c).text(a)})}function showPublicationsByYear(c,b,e,a){if(c){SiteRoot=c;SiteRoot=GetRealSiteRoot();b=b.replace(c,SiteRoot)}var d=$("#"+a+" .list-title").first();d.html("");d.append("<span>"+e+"</span>");$.getJSON(b,function(f){try{var b=$("#"+a),h=$("#"+a+" .list-title").first();h.append("<span class='num'>("+f.TotalNumber+")</span>");var e=b.children(".list-paper").first();e.html("");var c=f.data;for(var d=0;d<c.length;d++){var g=c[d],i=g.title,j=g.url;e.append("<div class='paper-item'><div class='paper-icon'></div><a class='paper-text' href='"+j+"'>"+i+"</a></div>")}if(c.length>0)b.show()}catch(k){var b=$("#"+a);b.hide()}})}var AllDomain=1,SomeDomain=0,radioClick=false,SelectedDomainCookieKey="SelectedDomainKey",PanelButtonClick=false;$(function(){var b=$(" .domain-panel-button");if(b.length==0)return;var a=$("#divDomainPanel");b.click(function(){PanelButtonClick=true;$("#advancedsearchDiv").hide();if($("#divDomainPanel:visible").length<=0){UpdateDomainPanel();a.show()}else a.hide()});$(".domain-closelink").click(function(){a.hide()});$("#divDomainPanel :checkbox").click(function(){radioClick=false;radioCheck(SomeDomain);updateCookie()});$("#divDomainPanel :radio").click(function(){radioClick=true;updateCookie()});UpdateDomainButtonText()});function UpdateDomainPanel(){var a=readCookie(SelectedDomainCookieKey);if(a&&a!=""){radioCheck(SomeDomain);var c=a.split(",");for(var b=0;b<c.length;b++)$("#divDomainPanel :checkbox").each(function(){if(this.value==c[b]){this.checked=true;$(this).attr("checked","checked")}})}else{radioCheck(AllDomain);$("#divDomainPanel :checkbox").each(function(){this.checked=false})}}function UpdateDomainButtonText(){var c=$(" .domain-panel-button .left span"),a=readCookie(SelectedDomainCookieKey);if(a&&a!=""){var b=a.split(",");if(b.length-1>1)c.html(b.length-1+" Domains");else{var e=b[0],d="";$("#divDomainPanel :checkbox").each(function(){if(this.value==e)d=$(this).parent().children().first().next().text()});c.html(d)}}else c.html("All Domains")}function updateCookie(){var a="",b=-1;$("#divDomainPanel :radio").each(function(){if(this.checked==true)b=this.value});if(b==SomeDomain){$("#divDomainPanel :checkbox").each(function(){if(this.checked==true)a+=this.value+","});if(a=="")if(radioClick==true);else radioCheck(AllDomain)}setCookie(SelectedDomainCookieKey,a);UpdateDomainButtonText()}function radioCheck(a){if(a==AllDomain||a==SomeDomain)$("#divDomainPanel :radio").each(function(){if(this.value==a)this.checked=true;else this.checked=false})}var canLongSearchBox=false,canShortSearchBox=true;function BindEventForDomainPanelButton(d,c){var b=$("#"+c);b.hide();var a=$("#"+d);SearchboxWidth=a.width()+b.width();a.width(SearchboxWidth);a.focus(function(){if(canShortSearchBox==false)return;canShortSearchBox=false;canLongSearchBox=false;$(this).width(SearchboxWidth-b.width());b.show(300,function(){canLongSearchBox=true})});a.blur(function(){if(canLongSearchBox==false)return;canShortSearchBox=false;canLongSearchBox=false;DomainButtonID=c;setTimeout(HideDomainButton,500)})}var DomainButtonID="",SearchboxWidth=0;function HideDomainButton(){var a=$("#"+DomainButtonID);if(a.length==0)return;if(PanelButtonClick==true||$("#divDomainPanel:visible").length>0){PanelButtonClick=false;setTimeout(HideDomainButton,500)}else{PanelButtonClick=false;a.hide(300,function(){ChangeSearchboxWidth();canShortSearchBox=true})}}function ChangeSearchboxWidth(){var a=$("#"+DomainButtonID);a.prev().prev().width(SearchboxWidth)}function ViewAllAuthors(b){var a=$(b).prev().prev().prev();if(a.html()=="")$.get($(b).next().text(),function(c){a.append(c);a.show();$(b).prev().css("display","inline-block")});else{a.show();$(b).prev().css("display","inline-block")}if(a.prev().attr("class")=="self-author"){a.prev().hide();if(a.prev().prev().attr("class")=="self-author")a.prev().prev().hide()}$(b).hide()}function FoldAuthors(a){$(a).prev().prev().hide();if($(a).prev().prev().prev().attr("class")=="self-author"){$(a).prev().prev().prev().css("display","inline-block");if($(a).prev().prev().prev().prev().attr("class")=="self-author")$(a).prev().prev().prev().prev().css("display","inline-block")}$(a).hide();$(a).next().show()}function GetData(a,c,b){GetData(a,c,b,delayTime,1000)}function GetData(a,d,c,b){$.ajax({url:d,success:function(d){setTimeout(function(){getDataRendering(a,d,c)},b)}})}function getDataRendering(b,a,c){if(a.toLowerCase().indexOf("<form ")<0&&a.toLowerCase().indexOf("<html ")<0)$(b).append(a);c()}function ShowEditHistoryItem(a){$(a).hide();$(a).next().show();$(a).next().next().next().show()}function HideEditHistoryItem(a){$(a).hide();$(a).prev().show();$(a).next().next().hide()}
