var HOOVER_HEIGHT_DEFAULT=200;var HOOVER_WIDTH_DEFAULT=300;var HOOVER_MINIMUM_HEIGHT=120;var HOOVER_MINIMUM_WIDTH=180;var HOOVER_MAX_HEIGHT=600;var HOOVER_MAX_WIDTH=800; /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(ah,O,Y){function U(b){var a=O.console;ad[b]||(ad[b]=!0,ah.migrateWarnings.push(b),a&&a.warn&&!ah.migrateMute&&(a.warn("JQMIGRATE: "+b),ah.migrateTrace&&a.trace&&a.trace()))}function al(d,b,c,f){if(Object.defineProperty){try{return Object.defineProperty(d,b,{configurable:!0,enumerable:!0,get:function(){return U(f),c},set:function(a){U(f),c=a}}),Y}catch(e){}}ah._definePropertyBroken=!0,d[b]=c}var ad={};ah.migrateWarnings=[],!ah.migrateMute&&O.console&&O.console.log&&O.console.log("JQMIGRATE: Logging is active"),ah.migrateTrace===Y&&(ah.migrateTrace=!0),ah.migrateReset=function(){ad={},ah.migrateWarnings.length=0},"BackCompat"===document.compatMode&&U("jQuery is not compatible with Quirks Mode");var X=ah("",{size:1}).attr("size")&&ah.attrFn,P=ah.attr,L=ah.attrHooks.value&&ah.attrHooks.value.get||function(){return null},aj=ah.attrHooks.value&&ah.attrHooks.value.set||function(){return Y},aa=/^(?:input|button)$/i,ai=/^[238]$/,W=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ag=/^(?:checked|selected)$/i;al(ah,"attrFn",X||{},"jQuery.attrFn is deprecated"),ah.attr=function(f,b,e,d){var j=b.toLowerCase(),h=f&&f.nodeType;return d&&(4>P.length&&U("jQuery.fn.attr( props, pass ) is deprecated"),f&&!ai.test(h)&&(X?b in X:ah.isFunction(ah.fn[b])))?ah(f)[b](e):("type"===b&&e!==Y&&aa.test(f.nodeName)&&f.parentNode&&U("Can't change the 'type' of an input or button in IE 6/7/8"),!ah.attrHooks[j]&&W.test(j)&&(ah.attrHooks[j]={get:function(l,m){var c,g=ah.prop(l,m);return g===!0||"boolean"!=typeof g&&(c=l.getAttributeNode(m))&&c.nodeValue!==!1?m.toLowerCase():Y},set:function(g,l,i){var c;return l===!1?ah.removeAttr(g,i):(c=ah.propFix[i]||i,c in g&&(g[c]=!0),g.setAttribute(i,i.toLowerCase())),i}},ag.test(j)&&U("jQuery.fn.attr('"+j+"') may use property instead of attribute")),P.call(ah,f,b,e))},ah.attrHooks.value={get:function(b,a){var c=(b.nodeName||"").toLowerCase();return"button"===c?L.apply(this,arguments):("input"!==c&&"option"!==c&&U("jQuery.fn.attr('value') no longer gets properties"),a in b?b.value:null)},set:function(d,c){var b=(d.nodeName||"").toLowerCase();return"button"===b?aj.apply(this,arguments):("input"!==b&&"option"!==b&&U("jQuery.fn.attr('value', val) no longer sets properties"),d.value=c,Y)}};var af,ae,K=ah.fn.init,Z=ah.parseJSON,F=/^([^<]*)(<[\w\W]+>)([^>]*)$/;ah.fn.init=function(d,e,b){var c;return d&&"string"==typeof d&&!ah.isPlainObject(e)&&(c=F.exec(ah.trim(d)))&&c[0]&&("<"!==d.charAt(0)&&U("$(html) HTML strings must start with '<' character"),c[3]&&U("$(html) HTML text after last tag is ignored"),"#"===c[0].charAt(0)&&(U("HTML string cannot start with a '#' character"),ah.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&(e=e.context),ah.parseHTML)?K.call(this,ah.parseHTML(c[2],e,!0),e,b):K.apply(this,arguments)},ah.fn.init.prototype=ah.fn,ah.parseJSON=function(a){return a||null===a?Z.apply(this,arguments):(U("jQuery.parseJSON requires a valid JSON string"),null)},ah.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||0>b.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}},ah.browser||(af=ah.uaMatch(navigator.userAgent),ae={},af.browser&&(ae[af.browser]=!0,ae.version=af.version),ae.chrome?ae.webkit=!0:ae.webkit&&(ae.safari=!0),ah.browser=ae),al(ah,"browser",ah.browser,"jQuery.browser is deprecated"),ah.sub=function(){function a(c,d){return new a.fn.init(c,d)}ah.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,c){return c&&c instanceof ah&&!(c instanceof a)&&(c=a(c)),ah.fn.init.call(this,d,c,b)},a.fn.init.prototype=a.fn;var b=a(document);return U("jQuery.sub() is deprecated"),a},ah.ajaxSetup({converters:{"text json":ah.parseJSON}});var ak=ah.fn.data;ah.fn.data=function(d){var b,c,e=this[0];return !e||"events"!==d||1!==arguments.length||(b=ah.data(e,d),c=ah._data(e,d),b!==Y&&b!==c||c===Y)?ak.apply(this,arguments):(U("Use of jQuery.fn.data('events') is deprecated"),c)};var ac=/\/(java|ecma)script/i,J=ah.fn.andSelf||ah.fn.addBack;ah.fn.andSelf=function(){return U("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),J.apply(this,arguments)},ah.clean||(ah.clean=function(n,j,f,b){j=j||document,j=!j.nodeType&&j[0]||j,j=j.ownerDocument||j,U("jQuery.clean() is deprecated");var p,m,h,e,g=[];if(ah.merge(g,ah.buildFragment(n,j).childNodes),f){for(h=function(a){return !a.type||ac.test(a.type)?b?b.push(a.parentNode?a.parentNode.removeChild(a):a):f.appendChild(a):Y},p=0;null!=(m=g[p]);p++){ah.nodeName(m,"script")&&h(m)||(f.appendChild(m),m.getElementsByTagName!==Y&&(e=ah.grep(ah.merge([],m.getElementsByTagName("script")),h),g.splice.apply(g,[p+1,0].concat(e)),p+=e.length))}}return g});var B=ah.event.add,G=ah.event.remove,ab=ah.event.trigger,D=ah.fn.toggle,q=ah.fn.live,E=ah.fn.die,z="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",R=RegExp("\\b(?:"+z+")\\b"),I=/(?:^|\s)hover(\.\S+|)\b/,V=function(a){return"string"!=typeof a||ah.event.special.hover?a:(I.test(a)&&U("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),a&&a.replace(I,"mouseenter$1 mouseleave$1"))};ah.event.props&&"attrChange"!==ah.event.props[0]&&ah.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),ah.event.dispatch&&al(ah.event,"handle",ah.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),ah.event.add=function(f,d,g,b,c){f!==document&&R.test(d)&&U("AJAX events should be attached to document: "+d),B.call(this,f,V(d||""),g,b,c)},ah.event.remove=function(f,c,g,d,b){G.call(this,f,V(c)||"",g,d,b)},ah.fn.error=function(){var a=Array.prototype.slice.call(arguments,0);return U("jQuery.fn.error() is deprecated"),a.splice(0,0,"error"),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this)},ah.fn.toggle=function(d,g){if(!ah.isFunction(d)||!ah.isFunction(g)){return D.apply(this,arguments)}U("jQuery.fn.toggle(handler, handler...) is deprecated");var b=arguments,c=d.guid||ah.guid++,f=0,e=function(h){var a=(ah._data(this,"lastToggle"+d.guid)||0)%f;return ah._data(this,"lastToggle"+d.guid,a+1),h.preventDefault(),b[a].apply(this,arguments)||!1};for(e.guid=c;b.length>f;){b[f++].guid=c}return this.click(e)},ah.fn.live=function(c,d,b){return U("jQuery.fn.live() is deprecated"),q?q.apply(this,arguments):(ah(this.context).on(c,this.selector,d,b),this)},ah.fn.die=function(a,b){return U("jQuery.fn.die() is deprecated"),E?E.apply(this,arguments):(ah(this.context).off(a,this.selector||"**",b),this)},ah.event.trigger=function(d,c,f,b){return f||R.test(d)||U("Global events are undocumented and deprecated"),ab.call(this,d,c,f||document,b)},ah.each(z.split("|"),function(a,b){ah.event.special[b]={setup:function(){var c=this;return c!==document&&(ah.event.add(document,b+"."+ah.guid,function(){ah.event.trigger(b,null,c,!0)}),ah._data(this,b,ah.guid++)),!1},teardown:function(){return this!==document&&ah.event.remove(document,b+"."+ah._data(this,b)),!1}}})}(jQuery,window);shindig.SciverseService=function(){shindig.IfrGadgetService.call(this);gadgets.rpc.register("invokeResultsView",this.invokeResultsView);gadgets.rpc.register("invokeColumnView",this.invokeColumnView);gadgets.rpc.register("getContextInfo",this.getContextInfo);gadgets.rpc.register("getGadgetContext",this.getGadgetContext);gadgets.rpc.register("getBrowserProperty",this.getBrowserProperty);gadgets.rpc.register("getAllResults",this.getAllResults);gadgets.rpc.register("getResults",this.getResults);gadgets.rpc.register("getArticleContent",this.getArticleContent);gadgets.rpc.register("getPageUrl",this.getPageUrl);gadgets.rpc.register("showHoverView",this.showHoverView);gadgets.rpc.register("closeHover",this.closeHover);gadgets.rpc.register("closeAllMyHovers",this.closeAllHovers);gadgets.rpc.register("linkText",this.linkText);gadgets.rpc.register("linkTagText",this.linkTagText);gadgets.rpc.register("makeMeInvisible",this.makeMeInvisible);gadgets.rpc.register("makeMeVisible",this.makeMeVisible);gadgets.rpc.register("suggest",this.returnQuerySuggestions);gadgets.rpc.register("subscribe",this.subscribe);gadgets.rpc.register("getSubjectAreas",this.getSubjectAreas);gadgets.rpc.register("getContent",this.getContent);gadgets.rpc.register("getSubType",this.getSubType);gadgets.rpc.register("executeSDSearch",this.executeSDSearch);gadgets.rpc.register("executeScopusSearch",this.executeSCSearch);gadgets.rpc.register("executeHubSearch",this.executeHubSearch);gadgets.rpc.register("addButtons",this.addButtons);gadgets.rpc.register("removeButtons",this.removeButtons);gadgets.rpc.register("entitleGadget",this.entitleGadget);gadgets.rpc.register("closeCanvasView",this.closeCanvasView);gadgets.rpc.register("invokeWorkSpaceView",this.invokeWorkSpaceView);gadgets.rpc.register("getEuidCookie",this.getEuidCookie);gadgets.rpc.register("getSDRelatedArticles",this.getSDRelatedArticles);gadgets.rpc.register("isAuthorshipClaimedByUser",this.isAuthorshipClaimedByUser);gadgets.rpc.register("callAPPIndexService",this.callAPPIndexService)};shindig.SciverseService.inherits(shindig.IfrGadgetService);var sgf=sgf||{};shindig.SciverseService.prototype.getPageUrl=function(){return document.location.href};shindig.SciverseService.prototype.callAPPIndexService=function(b){var a=gadgets.json.stringify(b);var e=jQuery.parseJSON(a);var d="pii="+e.pii+"&gadgetId="+e.gadgetId;var c=new Array();c.push(sciverseObj.smapiVars.gsUrl);c.push("/rest/gadgetindex/gadget");jQuery.ajax({type:"GET",url:c.join(""),async:true,data:d});return true};shindig.SciverseService.prototype.getArticleContent=function(a,f){var d=this.f;if(true===a&&typeof SDM!=="undefined"&&typeof SDM.svapi!=="undefined"&&typeof SDM.svapi.getCurrentArticleContent==="function"){SDM.svapi.getCurrentArticleContent(sgf.relayArticleContentToGadget,d,f);return}else{if(typeof SDM!=="undefined"&&typeof SDM.svapi!=="undefined"&&typeof SDM.svapi.getArticleContent==="function"){SDM.svapi.getArticleContent(sgf.relayArticleContentToGadget,d,f);return}}var b=jQuery(".svBigBox");if(b.length>0){var e=b.clone();e.find(".containerApplOver, script, style, link").remove();sgf.relayArticleContentToGadget(this.f,f,e.html())}return};shindig.SciverseService.prototype.isAuthorshipClaimedByUser=function(b){var a=this.f;if(typeof SDM!=="undefined"&&typeof SDM.svapi!=="undefined"&&typeof SDM.svapi.isAuthorshipClaimedByUser==="function"){SDM.svapi.isAuthorshipClaimedByUser(sgf.relayArticleContentToGadget,a,b);return}return};shindig.SciverseService.prototype.getSDRelatedArticles=function(i,e){var g=this.f;var f="{error : erroroccured}";var c=sciverseObj.smapiVars.gsUrl;try{var h=c.indexOf("gadgetservices");var a=c.substring(0,h-1);var b=new Array();if(a!=null){b.push(a);b.push("/gadgetepfl/GetSDArticles?piiValue="+e)}jQuery.ajax({url:b.join(""),type:"GET",success:function(j){f=j;sgf.relayRelatedArticlesToGadget(g,i,f,a)},error:function(j){sgf.relayRelatedArticlesToGadget(g,i,f,a)}})}catch(d){sgf.relayRelatedArticlesToGadget(g,i,f,a)}};sgf.relayArticleContentToGadget=function(b,c,a){gadgets.rpc.call(b,c,null,a)};sgf.relayRelatedArticlesToGadget=function(c,d,b,a){gadgets.rpc.call(c,d,null,b,a)};sgf.currentCanvasHolder=null;shindig.SciverseService.prototype.closeCanvasView=function(){var b=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var a=shindig.container.getGadget(b);a.closeCanvas()};shindig.IfrGadgetService.prototype.requestNavigateTo=function(a,b){var d=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var c=shindig.container.getGadget(d);if(a=="canvas"){c.openCanvasView(b);return}};shindig.IfrGadgetService.prototype.setUserPref=function(h,b,d){var g=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var e=shindig.container.getGadget(g);for(var c=1,a=arguments.length;c").html('   '+suggestions[f].text).addClass(f%2==0?"ac_even":"ac_odd").appendTo(g)[0];jQuery.data(l,"ac_data",suggestions[f].gadgetId+","+suggestions[f].text)}var m=jQuery("#suggestions").offset();var h=jQuery("#suggestions").attr("offsetHeight");jQuery("#satab").css({left:m.left,top:m.top+h,"z-index":300})};shindig.SciverseService.prototype.makeMeInvisible=function(){var c=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var b=shindig.container.getGadget(c);var a=(b.closed_)?"close":"open";if(b.requiresPubSub2){jQuery("#"+this.f).parent().parent().parent().addClass("invisible");jQuery("#"+this.f).css("visibility","hidden")}else{jQuery("#"+this.f).parent().parent().removeClass("sgfVisible");jQuery("#"+this.f).parent().parent().addClass("invisible")}a+="|invisible"};shindig.SciverseService.prototype.makeMeVisible=function(){var e=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var b=shindig.container.getGadget(e);var a=(b.closed_)?"close":"open";jQuery("#"+this.f).parent().parent().removeClass("invisible");if(jQuery("#"+this.f).parent().parent().parent().hasClass("sgfPrivilegedLocation")){jQuery("#"+this.f).parents(".sgfPrivilegedLocation").css("display","block")}if(b.requiresPubSub2){jQuery("#"+this.f).css("visibility","")}else{jQuery("#"+this.f).parent().parent().addClass("sgfVisible")}a+="|visible";if(a==="open|visible"){var d=[];var c="";if(b.view!=null){c=b.view}sgf.saveEventData(b.sciverseId_,sgfEvents.DISPLAY_GADGET,b.location,d,c);sgf.notifyEventSubscribers(sgfEvents.DISPLAY_GADGET,d)}};var gHooversMap={};shindig.SciverseService.prototype.showHoverView=function(h,b){if(typeof(gHooversMap[this.f])=="undefined"||gHooversMap[this.f]==null){gHooversMap[this.f]=0}else{gHooversMap[this.f]+=1}var u=gHooversMap[this.f];var a="hoover_"+this.f+"_"+u;jQuery("#"+a).remove();var z=document.createElement("div");z.id=a;z.style.position="absolute";var B=false;if(typeof(b)!="undefined"&&b!=""||b!=null){B=true}var l=false;if(B&&typeof(b.x)!="undefined"&&b.x!=""||b.x!=null){l=true}var n=false;if(B&&typeof(b.y)!="undefined"&&b.y!=""||b.y!=null){n=true}var v;if(B&&typeof(b.height)!="undefined"&&b.height!=""||b.height!=null){if(b.heightHOOVER_MAX_HEIGHT){v=HOOVER_MAX_HEIGHT}else{v=b.height}}}else{v=HOOVER_HEIGHT_DEFAULT}var t;if(B&&typeof(b.width)!="undefined"&&b.width!=""||b.width!=null){if(b.widthHOOVER_MAX_WIDTH){t=HOOVER_MAX_WIDTH}else{t=b.width}}}else{t=HOOVER_WIDTH_DEFAULT}var j=jQuery(window).scrollTop();var o=jQuery(window).scrollLeft();var r=jQuery(window).width();var e=jQuery(window).height();var q;var x;if(!l&&!n){q=r/2;q=q-(t/2);x=e/2;x=x+j-2*(v/3)}var s;var A;var g;var d;var y;var m;if(l&&n){s=b.x+8;A=b.y;g=(e+j)-(b.y+v);d=r-(b.x+t);y=b.x-t-o;m=b.y-v-j;if(g<0){A=b.y-(v)}if(m<0&&g<0){A=b.y}if(d<0){s=b.x-(t+46)}if(y<0&&d<0){s=b.x+20}}z.style.left=(B&&l&&s?s:q)+"px";z.style.top=(B&&n&&A?A:x)+"px";document.body.appendChild(z);shindig.container.layoutManager=new shindig.FloatLeftLayoutManager(a);var p=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var f=shindig.container.getGadget(p);if(!f.isHoverViewAvailable){alert("Hover view is not available in gadget xml.");return}var c=shindig.container.createGadget({height:v-25,specUrl:f.specUrl,title:f.title,userPrefs:f.userPrefs,requiresPubSub2:f.requiresPubSub2});c.sciverseId_=f.id;c.closed_=f.closed;c.iconURL=f.iconURL;c.location="hoover";c.locationOnPage="hoover";c.hasUserPrefs=f.hasUserPrefs;c.hooverIndex=u;c.pinPosition="absolute";shindig.container.addGadget(c);c.prepareGadgetForView("hover",z,h);var w=checkCompliance();var i=false;if(w=="Quirks"){i=true}jQuery("#"+a).css({width:t?(t):HOOVER_WIDTH_DEFAULT+"px",height:i?(v):"",padding:"0px",margin:"0px","z-index":"9999"});jQuery("#"+a).resizable({minHeight:HOOVER_MINIMUM_HEIGHT,minWidth:HOOVER_MINIMUM_WIDTH,start:function(D,F){var C=jQuery('
 
');jQuery("body").prepend(C[0]);C[0].id="temp_OverLayDiv";C.css({position:"absolute"});C.css({top:0,left:0});C.css("z-index","1009");C.height(2*(jQuery(document).height()));C.width("100%");var E=checkCompliance();if(E=="Quirks"&&truncateURL){jQuery("#"+c.getIframeId()).parent().css("position","absolute")}},resize:function(D,E){var C=(jQuery("#"+a).height()-jQuery("#hoover-"+c.id).height());jQuery("#"+c.getIframeId()).parent().css("height",C+"px");jQuery("#"+c.getIframeId()).css({height:C+"px",margin:"0px"})},stop:function(C,D){jQuery("#temp_OverLayDiv").remove();if(c.pinPosition=="fixed"){c.togglePin()}}});jQuery("#"+a).children(".ui-icon").css("background-image","url("+gadgetIconPath+"/ui-icons_222222_256x240.png)");jQuery("#"+a).draggable({handle:"#hoover-"+c.id,containment:"document",start:function(D,E){var C=jQuery("
");jQuery("body").prepend(C[0]);C[0].id="temp_OverLayDiv";C.css({position:"absolute"});C.css({top:0,left:0});C.css("z-index","1009");C.height(2*(jQuery(window).height()));C.width("100%")},stop:function(C,D){jQuery("#temp_OverLayDiv").remove()}});return u};shindig.SciverseService.prototype.closeHover=function(c){if(typeof(c)=="undefined"||c==null){return}var a=this.f;var b=jQuery("#hoover_"+a+"_"+c);if(b.length>0){b.remove()}};shindig.SciverseService.prototype.closeAllHovers=function(){var a=this.f;var b=jQuery("body>div").filter(function(c){return this.id.indexOf(a)>0});jQuery.each(b,function(c,d){jQuery("#"+d.id).remove()})};sgf.termListeners={};sgf.allCategories={author:"svAuthor",title:"svTitle",keywords:"svKeywords","abstract":"svAbstract",article:"svArticle",references:"svRefs",all:"svBigBox"};sgf.allNewCategories={author:"svAuthor",title:"svTitle",keywords:"svKeywords","abstract":"svAbstract",article:"svArticle",references:"svRefs"};sgf.linkTextFrames=new Array();shindig.SciverseService.prototype.linkText=function(d,b,f,a,e){var g=new Object();g.frame=this.f;g.terms=d;g.categories=b;g.frequency=f;g.occurence=a;g.callbackName=e;sgf.linkTextFrames.push(g);var c=null;sgf.doLinkText(c,this.f,d,b,f,a,e)};shindig.SciverseService.prototype.linkTagText=function(c,f,g,h,m,j,a,e,d,i){var b=new Object();b.frame=this.f;b.terms=c;b.categories=f;b.frequency=g;b.occurence=h;b.tags=m;b.sections=j;b.href=a;b.unLinkFlag=e;b.boundaryFlag=d;b.callbackName=i;sgf.linkTextFrames.push(b);var l=null;sgf.doTagLinkText(l,this.f,c,f,g,h,m,j,a,e,d,i)};sgf.doTagLinkText=function(a,d,g,q,m,n,l,o,u,i,s,h){var f="";var e={};var p=new Array();for(var j=0;j0){if(m!="undefined"&&(m=="first"||m=="every")){if(m=="first"){n=1}if(n=="undefined"||n==""||n==null){n=1}if(jQuery.inArray("all",q)!=-1){if(a===null){jQuery.each(sgf.allNewCategories,function(t,y){if(l==null||l.length==0){a=jQuery("."+sgf.allCategories.all);sgf.iterateHTMLElements(a,p,d,m,n,e,h)}else{if(o==null||o.length==0){sgf.iterateTagHTMLElements(jQuery("."+y),p,d,m,n,e,h,y,l,1,u,i,s)}else{var x=jQuery("."+y);var c=0;sgf.doIterateTagLinkText(x,c,o,p,d,m,n,e,h,y,l,u,i,s)}}})}}else{if(a!==null){if(l==null||l.length==0){sgf.iterateHTMLElements(a,p,d,m,n,e,h)}else{sgf.iterateTagHTMLElements(a,p,d,m,n,e,h,r,l,1,u,i,s)}}else{for(var w=0;w0){sgf.iterateTagHTMLElements(jQuery(b).get(q),c,g,i,j,h,l,m,r,1,a,f,e)}else{sgf.iterateTagHTMLElements(jQuery(b).get(q),c,g,i,j,h,l,m,r,2,a,f,e)}}n++}}};sgf.doLinkText=function(n,e,b,d,h,i,j){var l="";var f={};var a=new Array();for(var m=0;m0){if(h!="undefined"&&(h=="first"||h=="every")){if(h=="first"){i=1}if(i=="undefined"||i==""||i==null){i=1}if(jQuery.inArray("all",d)!=-1){if(n===null){n=jQuery("."+sgf.allCategories.all)}sgf.iterateHTMLElements(n,a,e,h,i,f,j)}else{if(n!==null){sgf.iterateHTMLElements(n,a,e,h,i,f,j)}else{for(var g=0;g=1)){e[E[s].toLowerCase()]=0}if(!x||x==null){j=j+"|\\b"+E[s]+"\\b"}else{j=j+"|(?:^|\\s)(?:[,|\\-|:|\\?|.|\\(|'])?"+E[s]+"(?:[,|\\-|:|\\?|.|\\)|'])?(?:$|\\s)"}}j=j.substr(1,j.length);patternSelector=new PatternSelector(o,j,"ig");while(patternSelector.findPattern()){D=document.createElement("div");var h;var d=patternSelector.getMatchedPattern();var A=d;var g=new RegExp("(^[,|.|:|?|(|-])|([,|.|:|?|)|-]$)","g");var v=d.toLowerCase();var l=v;l=(l.trim()).replace(g,"");e[l]+=1;if((q==="first"&&e[l]==1)||(q==="every"&&(r==1||e[l]==1||e[l]%r==1))){if(sgf.termListeners[v]&&!sgf.isListener(p,v)){var b=new Object();b.frame=p;b.callback=C;sgf.termListeners[v].push(b)}else{if(jQuery(u.parents("a")).length==0&&jQuery(u.parents(G)).length==0&&n==true){if(z==null||(z!=null&&Object.keys(JSON.parse(z)).length==0)){if(!x||x==null){patternSelector.appendReplacement(w,""+d+"")}else{patternSelector.appendReplacementWithoutBoundary(w,""+d+"")}}else{jQuery.each(JSON.parse(z),function(i,I){var H=new RegExp("(^[,|.|:|?|(|-])|([,|.|:|?|)|-]$)","g");var J=d;var c=v;if(x){J=(d.trim()).replace(H,"");c=(v.trim()).replace(H,"")}if(J==i||c==i){h=I}});if(!x||x==null){patternSelector.appendReplacement(w,""+d+"")}else{patternSelector.appendReplacementWithoutBoundary(w,""+d+"")}}if(!sgf.isListener(p,v)){sgf.termListeners[v]=new Array();var b=new Object();b.frame=p;b.callback=C;sgf.termListeners[v].push(b)}}else{if(!x||x==null){patternSelector.appendReplacement(w,d)}else{patternSelector.appendReplacementWithoutBoundary(w,d)}if(n==false){if(!sgf.isListener(p,v)){sgf.termListeners[v]=new Array();var b=new Object();b.frame=p;b.callback=C;sgf.termListeners[v].push(b)}}}}}else{if(!x||x==null){patternSelector.appendReplacement(w,d)}else{patternSelector.appendReplacementWithoutBoundary(w,d)}}}if(w.toString().length>0){D.innerHTML=patternSelector.appendTail(w);if(jQuery(u).parent().is("a")&&n==false&&jQuery(u.parents(".linkText")).length>0){jQuery(u).unwrap()}jQuery(u).before(jQuery(D).contents());jQuery(u).remove()}}};sgf.iterateHTMLElements=function(y,A,n,o,p,e,x){var r="svDoNotLink";if(sciverseObj.contextInfo.LinkTextClassesToIgnore){r+=","+sciverseObj.contextInfo.LinkTextClassesToIgnore}var C="";var a=r.split(",");for(var B=0;B=1)){e[A[q].toLowerCase()]=0}h=h+"|\\b"+A[q]+"\\b"}h=h.substr(1,h.length);patternSelector=new PatternSelector(m,h,"ig");while(patternSelector.findPattern()){z=document.createElement("div");var d=patternSelector.getMatchedPattern();var t=d.toLowerCase();e[t]+=1;if((o==="first"&&e[t]==1)||(o==="every"&&(p==1||e[t]==1||e[t]%p==1))){if(sgf.termListeners[t]&&!sgf.isListener(n,t)){var b=new Object();b.frame=n;b.callback=x;sgf.termListeners[t].push(b)}else{if(jQuery(s.parents("a")).length==0&&jQuery(s.parents(C)).length==0){patternSelector.appendReplacement(u,""+d+"");if(!sgf.isListener(n,t)){sgf.termListeners[t]=new Array();var b=new Object();b.frame=n;b.callback=x;sgf.termListeners[t].push(b)}}else{patternSelector.appendReplacement(u,d)}}}else{patternSelector.appendReplacement(u,d)}}if(u.toString().length>0){z.innerHTML=patternSelector.appendTail(u);jQuery(s).before(jQuery(z).contents());jQuery(s).remove()}}}}else{var f=sgf.getTextNodesIn(jQuery(y).get(0));for(var v=0,w=f.length;v=1)){e[A[q].toLowerCase()]=0}h=h+"|\\b"+A[q]+"\\b"}h=h.substr(1,h.length);patternSelector=new PatternSelector(m,h,"ig");while(patternSelector.findPattern()){z=document.createElement("div");var d=patternSelector.getMatchedPattern();var t=d.toLowerCase();e[t]+=1;if((o==="first"&&e[t]==1)||(o==="every"&&(p==1||e[t]==1||e[t]%p==1))){if(sgf.termListeners[t]&&!sgf.isListener(n,t)){var b=new Object();b.frame=n;b.callback=x;sgf.termListeners[t].push(b)}else{if(jQuery(s.parents("a")).length==0&&jQuery(s.parents(C)).length==0){patternSelector.appendReplacement(u,""+d+"");if(!sgf.isListener(n,t)){sgf.termListeners[t]=new Array();var b=new Object();b.frame=n;b.callback=x;sgf.termListeners[t].push(b)}}else{patternSelector.appendReplacement(u,d)}}}else{patternSelector.appendReplacement(u,d)}}if(u.toString().length>0){z.innerHTML=patternSelector.appendTail(u);jQuery(s).before(jQuery(z).contents());jQuery(s).remove()}}}};sgf.getTextNodesIn=function(d,a){var c=[];function b(g){if(g==null){return}if(g.nodeType==3){if(a||!/^\s*$/.test(g.nodeValue)){c.push(g)}}else{for(var f=0,e=g.childNodes.length;f0){jQuery.each(h,function(l,m){b=loadButtons(m,e,c.sciverseId_,j,b,g)})}else{if(h==null){for(var d=0;d'+j.altText+'')});return g}shindig.SciverseService.prototype.removeButtons=function(a,g){if(typeof(resultList)===undefined||resultList===null){return}var h=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var f=shindig.container.getGadget(h);var e=[];if(addAllButtonResults!=null){if((a==null||a.length==0)&&(g==null||g.length==0)){for(var c=0;c0&&g!=null&&g.length>0){for(var c=0;c0)){e=addAllButtonResults[f.sciverseId_+"_"+a[c]];if(e!=null||e!=undefined){e=removeButtonIDFromMap(g,e,f.sciverseId_);addAllButtonResults[f.sciverseId_+"_"+a[c]]=e}}}}else{if(a==null&&g!=null&&g.length>0){for(var c=0;c0&&g==null){for(var c=0;c0)){e=addAllButtonResults[f.sciverseId_+"_"+a[c]];if(e!=null){for(var b=0;b0){jQuery("#button_"+a+"_"+f[d]).remove()}for(var c=0;c0){debug=true}var gadgetPrefs={};var sciverseObj;var isUserEntitledtoGadgets;var isScopusIE7=false;var isExtendedAreaEnabled;var showMoreApps;var g_toolbarState;var gadgetIconPath;var gadgetJSPath;var releaseNumber="v8";var userPrefs;var browserVersion=navigator.appVersion;var MSIE7Flag;if(browserVersion.indexOf("MSIE 7.0")>0){MSIE7Flag=true}var MSIE10Flag;if(browserVersion.indexOf("MSIE 10.0")>0){MSIE10Flag=true}else{MSIE10Flag=false}var sgftoggleState=0;var truncateURL;if(browserVersion.indexOf("IE")>0){truncateURL=true}var browser="";if(navigator.userAgent.indexOf("Firefox")>-1){browser="FF"}if(navigator.userAgent.indexOf("MSIE")>-1){browser="IE"}if(navigator.userAgent.indexOf("Chrome")>-1){browser="Chrome"}var sgf=sgf||{};sgf.labels={aboutApp:"About This App",close:"Close",closeApp:"Close This Application",editPrefs:"Edit Preferences",hideRightColum:"Hide Right Column",moveApp:"Move Application",moveDown:"Move DOWN",moveUp:"Move UP",noApps:"You currently have no applications",openApp:"Open This Application",openCanvas:"Open Application To Full-Screen Mode",openOptions:"Open Options",pin:"Pin",showFew:"Show fewer applications",showMore:"Show more applications",showRightColumn:"Show Right Column",turnOff:"Turn Off",turnOn:"Turn On",unpin:"Unpin"};var homePageToolbarHtml=new Array();homePageToolbarHtml.push('
');homePageToolbarHtml.push('
');homePageToolbarHtml.push('
');homePageToolbarHtml.push(' ');homePageToolbarHtml.push('
');homePageToolbarHtml.push('
');homePageToolbarHtml.push('
');homePageToolbarHtml.push("
");homePageToolbarHtml.push("
");homePageToolbarHtml.push("
");var homePageToolbarHtmlStr=homePageToolbarHtml.join("");var toolbarHtml=new Array();toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push(' +');toolbarHtml.push(' Show more applications');toolbarHtml.push("
");toolbarHtml.push('
');toolbarHtml.push(' -');toolbarHtml.push(' Show fewer applications');toolbarHtml.push("
");toolbarHtml.push("
");toolbarHtml.push("
");toolbarHtml.push("
");toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push('
');toolbarHtml.push("
");var toolbarHtmlStr=toolbarHtml.join("");var eventSubscriptionList=new Array();sgf.renderGadgetsHome=function(m){if(jQuery("#column0").length==0||jQuery("#column1").length==0||jQuery("#column2").length==0){return false}sgf.isUserEntitled();sgf.isKeyEventURLAvailable();var c;if(!isUserEntitledtoGadgets){var i=jQuery("#ErrormessageDiv");i.css("display","block");i.html(sgf.labels.noApps);return}gadgets.pubsub2router.init({onSubscribe:function(o,n){return true},onUnsubscribe:function(o,n){log(n.getClientID()+" unsubscribes from topic '"+o+"'")},onPublish:function(o,p,n,q){return true}});var l=-1;shindig.container.layoutManager=new shindig.FloatLeftLayoutManager();var d=new Array();var f=sciverseObj.locationsOnPage[m].gadgets;var a={};var h=jQuery("#"+m);if(h!=undefined&&h!=null&&h.attr("class")!=undefined&&h.attr("class")!=null){a=h.attr("class").split(" ")}var b=null;for(var j=0;j-1){var e=a[j];b=e.split("=",2)[1]}}var g=false;if(h.hasClass("sgfShowChromeOnHover")){g=true}jQuery.each(f,function(x,o){var u=sciverseObj.gadgetInfos[o];if(u==""||u==null||u=="undefined"){l=l+1;if(l%3==0){l=0}}else{var v=false;var n=false;var q=false;var t=false;for(var r in u.views){if(r=="canvas"){q=true}if(r=="hover"){v=true}if(b!=null&&r==b){t=true}}l=l+1;if(l%3==0){l=0}if(m=="sgfGhost"){shindig.container.layoutManager.layoutRootId_="sgfGhost"}else{shindig.container.layoutManager.layoutRootId_="column"+l}c=(typeof(u.height)!="undefined"&&u.height!=null&&u.height!=0)?u.height:null;if(debug){debugArea=shindig.container.layoutManager.getGadgetDebugChrome(u.gadgetId,m)}userPrefs=u.userPreferences;if(userPrefs!=null){var s=gadgets.json.stringify(userPrefs);s=convertFromHtmlEntities(s);userPrefs=gadgets.json.parse(s)}if(typeof(userPrefs)!="undefined"&&userPrefs!=null&&typeof(userPrefs.startMeInvisible)!="undefined"&&userPrefs.startMeInvisible!=null){if(userPrefs.startMeInvisible.value=="y"){n=true}}var p=shindig.container.createGadget({specUrl:u.url,title:u.gadgetName,userPrefs:userPrefs,height:c,requiresPubSub2:u.requiresPubSub2});p.sciverseId_=u.gadgetId;p.open=u.open[m];p.location=m;p.iconURL=(u.gadgetIcon==null||u.gadgetIcon=="")?gadgetIconPath+"/netbase.gif":u.gadgetIcon;p.removable=u.removable;p.hasUserPrefs=u.hasUserPrefs;p.isHoverViewAvailable=v;p.isStartMeInvisible=n;p.isCanvasViewAvailable=q;p.isOnhoverChromeRequired=g;if(t){p.preferredView=b}else{p.preferredView=null}shindig.container.addGadget(p);shindig.container.renderGadget(p);var w=(p.open==="N")?"close":"open";if(n){w+="|invisible"}else{w+="|visible"}if(p.open!="N"){}}});jQuery("div.AppHeaders").css("padding","7px 5px 4px 5px")};var visibleAppCount;var temptoolbarState=true;sgf.renderGadgets=function(q,w,a,p,f,d){sgf.isUserEntitled();sgf.isKeyEventURLAvailable();var e;var u;var m=jQuery("#"+q);if(p){u=(p=="showMoreLess")?true:false}if((toolbarOrientation=="vertical"&&!m.hasClass("sgfIsGadgeGator"))&&(!p)&&(!u)&&m.hasClass("sgfVertToolbar")){onLoadToolbarStateVertical(q)}if(!isUserEntitledtoGadgets){var r=jQuery("#toolbar_"+q);r.css("text-align","center");r.html(sgf.labels.noApps);return}gadgets.pubsub2router.init({onSubscribe:function(y,x){return true},onUnsubscribe:function(y,x){log(x.getClientID()+" unsubscribes from topic '"+y+"'")},onPublish:function(y,z,x,A){return true}});if(m.hasClass("sgfShowMyApps")&&m.hasClass("sgfVertToolbar")&&!temptoolbarState){return}shindig.container.layoutManager=new shindig.FloatLeftLayoutManager();var h="";var v=jQuery("#"+q+" > #sgfTabsBody > ul");var t=sciverseObj.locationsOnPage[q].gadgets;var b=(u)?visibleAppCount:0;var l=false;var o=(u)?t.length:visibleAppCount;var g={};if(m!=undefined&&m!=null&&m.attr("class")!=undefined&&m.attr("class")!=null){g=m.attr("class").split(" ")}var n=null;for(var i=0;i-1){var s=g[i];n=s.split("=",2)[1]}}jQuery.each(t,function(I,y){var F=sciverseObj.gadgetInfos[y];if(u&&I0)?"N":"Y");z.includeTitle=w;z.isExtendedAreaApp=l;z.includeBorder=a;z.location=q;z.isCanvasViewAvailable=A;z.isHoverViewAvailable=G;z.isStartMeInvisible=x;if(E){z.preferredView=n}else{z.preferredView=null}z.removable=F.removable;z.iconURL=(F.gadgetIcon==null||F.gadgetIcon=="")?gadgetIconPath+"/netbase.gif":F.gadgetIcon;z.hasUserPrefs=F.hasUserPrefs;log(z.sciverseId_,z.location,"gadget created");shindig.container.addGadget(z);log(z.sciverseId_,z.location,"gadget added");shindig.container.renderGadget(z);var H=(z.open==="N")?"close":"open";if(x){H+="|invisible"}else{H+="|visible"}if(f!=true||(f==true&&I==0)){if(z.open!="N"){if(H==="open|visible"){sgf.saveEventData(F.gadgetId,sgfEvents.DISPLAY_GADGET,q,d,"")}}}jQuery('
  • "+F.gadgetName+"
  • ").appendTo(v)});if(m.hasClass("sgfPrivilegedLocation")){var j=jQuery("#"+q).children();var c=jQuery("#"+q).children(".invisible");if(j.length>c.length){m.css("display","block");if(showLibAppCol){showLibAppCol(q)}}}sgf.setToolBarWidth()};sgf.openTabbedGadget=function(a){if(a==0){jQuery("#tab_"+a).removeAttr("onclick");return}var c=shindig.container.getGadget(a);if(c!=null){jQuery("#tab_"+a).removeAttr("onclick");var b="";if(c.requiresPubSub2){b=c.oaaIframeId}else{b=c.getIframeId()}var d=document.getElementById(b);if(d){var e=jQuery("#maincont"+b).css("display");if(e=="none"&&jQuery("#"+b).attr("src")==""){jQuery("#"+b).attr("src",c.getIframeUrl());jQuery("#maincont"+b).show()}}}};function setGlobalToolbarStateVars(){g_toolbarState=(sciverseObj.contextInfo.toolbarState.length>1)?sciverseObj.contextInfo.toolbarState:"Open";if(sciverseObj.contextInfo.toolbarState=="Close"){temptoolbarState=false}var a=jQuery(".sgfShowMoreLessApps").attr("id");if(sciverseObj.contextInfo.isViewMore=="Y"&&sciverseObj.locationsOnPage[a]!=undefined&&sciverseObj.locationsOnPage[a]!=null&&sciverseObj.locationsOnPage[a].gadgets!=undefined&&sciverseObj.locationsOnPage[a].gadgets!=null&&sciverseObj.locationsOnPage[a].gadgets.length>sciverseObj.smapiVars.visibleAppsCount){isExtendedAreaEnabled=true;showMoreApps="Y"}else{isExtendedAreaEnabled=false;showMoreApps="N"}visibleAppCount=sciverseObj.smapiVars.visibleAppsCount;if(sciverseObj.contextInfo.platform=="SC"&&sciverseObj.contextInfo.pageType=="resultslist"&&browser==="IE"&&MSIE7Flag===true){isScopusIE7=true}}function displayGadgets(){sciverseObj=gadgets.json.parse(sciverse);if(typeof(sciverseObj)=="undefined"||sciverseObj==false||sciverseObj==""){if(debug){alert("No data available to render the gadgets")}return false}if(typeof sciverseObj.smapiVars==="undefined"){return}if(typeof(setLibraryTab)!="undefined"){setLibraryTab()}sgf.processInterRefs("centerPane");sgf.setGadgetIHSURL();sgf.processMmcGadgets("centerPane");setGlobalToolbarStateVars();var f=[];for(var o in sciverseObj.locationsOnPage){var j=false;var d=true;var i=true;if(o=="sgfGhost"){if(!(jQuery("#sgfGhost").length>0)){jQuery('').appendTo(jQuery("body"))}}var a=jQuery("#"+o);if(a.length==0){continue}if(a.hasClass("sgfTabsToolbar")){i=false;d=false;var m=a.data("closeCallback");var l=sciverseObj.smapiVars.gsUrl+"/gadgets/"+releaseNumber+"/images/advqb_close-btn.png";jQuery('
    ').appendTo(a);jQuery("#imageUrl").attr("src",l);jQuery('
      ').appendTo(a);sgf.renderGadgets(o,i,d,"",true);jQuery("#"+o+" #sgfTabsBody").tabs();jQuery("#imageUrl").click(function(){m()});continue}if(a.hasClass("sgfHomePage")){var e=decodeURIComponent(sgf.labels.help);a.html(homePageToolbarHtmlStr);sgf.renderGadgetsHome(o);setTimeout("adjustColHeight()",10000);if(browser!=="FF"){applysortableForHomePage(o)}var n=(checkCompliance()=="Quirks")?true:false;if(n){jQuery(".Controls").css("position","")}else{jQuery(".Controls").css("position","relative")}continue}if(a.hasClass("sgfVertToolbar")||a.hasClass("sgfHorToolbar")||a.hasClass("sgfShowMyApps")){a.html(toolbarHtmlStr);var e=decodeURIComponent(sgf.labels.help);var b=decodeURIComponent(sgf.labels.showMore);var g=decodeURIComponent(sgf.labels.showFew);jQuery("#showMore").attr("title",b).html(b);jQuery("#showFew").attr("title",g).html(g);setTimeout("adjustColHeight()",10000);jQuery("#toolbar").attr("id","toolbar_"+o);if(a.hasClass("sgfVertToolbar")){toolbarOrientation="vertical";jQuery("#"+o).children("#toggleImg").css("display","block");toolbarWidth=VERTICAL_TOOLBAR_WIDTH;tbWidthwithoutImage=(toolbarWidth-toolbarImgWidth);toolbarWidth+="px";tbWidthwithoutImage+="px";a.find("#horiToolbarControls").show()}if(a.hasClass("sgfHorToolbar")){toolbarOrientation="horizontal";a.children(".sgfToolBarToggleImage").css("display","none");a.find("#toolbarBody").removeClass("toolbarBody");a.find("#toolbarBody").addClass("toolbarBodyHorizontal");a.children("#sciverse_toolbar").removeClass("sgfSciverseVertToolBar");a.children("#sciverse_toolbar").addClass("sgfSciverseHoriToolBar");a.find("#horiToolbarControls").show()}sgf.renderGadgets(o,i,d,null,false,f);if(jQuery("#showLessApps").css("display")=="none"&&isExtendedAreaEnabled&&a.hasClass("sgfShowMoreLessApps")){jQuery("#showLessApps").show()}if(browser!=="FF"){sgf.applySortable(o)}else{sgf.resetTitleStyles(o)}}else{if(toolbarOrientation=="vertical"){toolbarWidth="100%"}if(o!=undefined&&o!=null&&o=="SVH_SR2"){toolbarWidth=""}if(a.hasClass("sgfNoTitleBar")){i=false}if(a.hasClass("sgfNoGadgetBorder")){d=false}sgf.renderGadgets(o,i,d,null,false,f);if(browser!=="FF"){sgf.applySortable(o)}else{sgf.resetTitleStyles(o)}}}var c=checkCompliance();if(c=="Quirks"){jQuery(".Controls ul .submenu").css("left","-75px")}sgf.notifyEventSubscribers(sgfEvents.DISPLAY_GADGET,f)}sgf.resetTitleStyles=function(d){var a=jQuery("#"+d+" h3");if(a!==null){for(var c=0;c .sgfInnerToolbar").css("min-height","208px")}function toggleToolbarVertical(o){var d;if(sciverseObj.contextInfo.toolbarState=="Close"){temptoolbarState=true}jQuery("#toolbarBody").css("height",calculateToolBarHeight());var a=jQuery(o.target).parents().find(".sgfVertToolbar").attr("id");var h=jQuery("#"+a);var c;var r="SubmitAction";var f="";var u=false;var l=jQuery("#sciverse_toolbar").css("display");var e=jQuery("#sgfSlideBar");var p=jQuery("#colResults");var i=jQuery(window).scrollTop();var b=jQuery(window).height();var t=0;e.addClass("sgfSideExpand");e.removeClass("sgfSideCollapse");e.css("background-image","url("+gadgetIconPath+"/spriteImages.png)");var q=parseInt(jQuery(window).width());var m=jQuery(".sgfToolBarToggleImage");if(l=="block"){h.css("width",toolbarImgWidth);m.css({"border-right":"1px dashed #A5A5A5",height:jQuery("#colResults").height(),position:"fixed",right:"0px"});e.css("background-position","-162px -218px");e.removeClass("sgfRefinementBarNoImage");h.children("#sciverse_toolbar").css("display","none");e.attr("title",sgf.labels.showRightColumn);var j=parseInt(jQuery(window).width())-parseInt(e.position().left);if(parseInt(e.position().left)>parseInt(jQuery(window).width())/2){j=j+parseInt(e.position().left)-29}else{j=j-18}j+="px";q=q-toolbarImgWidth;q+="px";sgftoggleState=1;if(i>p.offset().top){t=b/2;e.css({top:"",position:"fixed"})}else{if(i0){for(var j=0;j1){n.push(e[g].substring(l))}else{n.push("")}}var b=new Array();b=sciverseObj.locationsOnPage[a].gadgets;var d=new Array();d=sgf.calculateArrayDifference(b,n);var h=gadgets.json.stringify(n).substring(0,gadgets.json.stringify(n).length-1);if(d!="[]"||d!=null){for(var m=0;m<=d.length-1;m++){h+=",";h+='"';h+=d[m];h+='"'}}h+="]";return h}sgf.applySortable=function(b){var a=(jQuery("#"+b).hasClass("sgfShowMyApps"))?"toolbar_"+b:b;jQuery("#"+a).sortable({handle:"h3",start:function(d,e){var f=jQuery(".ui-sortable-placeholder");if(typeof(placeholderGadgegators)!="undefined"&&placeholderGadgegators!=null&&jQuery("#"+a).hasClass("sgfIsGadgeGator")){f.css(placeholderGadgegators)}else{f.css({border:"1px solid #FED22F ",margin:"2px",visibility:"visible",background:"#FED22F"})}var c=jQuery('
       
      ');jQuery("body").prepend(c[0]);c[0].id="temp_OverLayDiv";c.css({position:"absolute",cursor:"move"});c.css({top:0,left:0});c.css("z-index","1009");c.height(2*(jQuery(document).height()));c.width("100%")},stop:function(g,i){jQuery("#temp_OverLayDiv").remove();var h=jQuery("#"+a).sortable("toArray");for(var d=0;dvisibleAppCount){for(var j=visibleAppCount;j0){for(var c=0;c1){c.push(g[e].substring(h))}else{c.push("")}}return gadgets.json.stringify(c)}sgf.calculateArrayDifference=function(e,d){var c=new Array();for(var b=0;b .sgfInnerToolbar").children().length>0){jQuery("#toolbarBody").css("height",calculateToolBarHeight())}else{setTimeout('jQuery("#toolbarBody").css("height",calculateToolBarHeight())',22000)}}jQuery(document).ready(function(){jQuery(window).trigger("hashchange");jQuery(document).on("mouseover mouseout",".sgfHiddenChrome",function(a){if(a.type=="mouseover"){var b=jQuery(this).find(".showTitleBarOnHover");if(b.hasClass("sgfOpen")){b.addClass("ActiveGadget")}else{b.addClass("InactiveGadget")}jQuery(this).find(".showBorderOnHover").css({"border-style":"solid","border-top":""})}else{var b=jQuery(this).find(".showTitleBarOnHover");if(b.hasClass("sgfClose")){b.removeClass("InActiveGadget")}else{b.removeClass("ActiveGadget")}jQuery(this).find(".showBorderOnHover").css({"border-style":"none","border-top":""})}});jQuery(document).on("mouseover mouseout",".containerApplOver",function(a){if(a.type=="mouseover"){if(isScopusIE7){var b=jQuery(".sgfSciverseHoriToolBar ");b.css({position:"relative","z-index":"10"})}if(jQuery(this).find(".Controls_close").css("display")=="none"){jQuery(this).find(".Controls").show()}}else{jQuery(this).find(".Controls").hide()}})});jQuery(window).bind("hashchange",function(b){var a=jQuery.param.fragment();removeCanvas(a)});function removeCanvas(b){var a;if(b.indexOf("dialogId")!=-1){jQuery("#canvas").dialog("open")}else{jQuery("#canvas").remove();jQuery("body").css("overflow","auto")}}function sgfToggleToolBarOver(){}function sgfToggleToolBarOut(){if(sgftoggleState==1){jQuery("#sgfSlideBar").css("background-position","-162px -218px")}}function isSDArticlesPage(){var a=false;if(sciverseObj.contextInfo.platform=="SD"&&sciverseObj.contextInfo.pageType=="article"){a=true}return a}function isSDResultsPage(){var a=false;if(sciverseObj.contextInfo.platform=="SD"&&sciverseObj.contextInfo.pageType=="resultsList"){a=true}return a}sgf.setToolBarWidth=function(){if(sciverseObj.contextInfo.platform=="SC"&&(sciverseObj.contextInfo.pageType=="AuthorProfile"||sciverseObj.contextInfo.pageType=="recordpage")){var a=jQuery("#toolbarBody > .sgfInnerToolbar");a.css({margin:"0",width:"100%"})}};sgf.processMmcGadgets=function(h){var l=jQuery("#"+h+" dl.ecomponent");if(l!=null&&l!=undefined&&l.length>0){for(var f=0;f0){for(var e=0;e #"+c);if(d!=undefined&&d!=null){var l=d.attr("data-ext");var b=d.attr("data-eid");var f=sciverseObj.mmcGadgets[l][0];if(f!=undefined&&f!=null){var h="";h=sciverseObj.gadgetInfos[f];d.children().hide();shindig.container.layoutManager=new shindig.FloatLeftLayoutManager();shindig.container.layoutManager.layoutRootId_=i+" > #"+c;var e=shindig.container.createGadget({specUrl:h.url,title:h.gadgetName,userPrefs:h.userPreferences,requiresPubSub2:h.requiresPubSub2});e.sciverseId_=h.gadgetId;e.isMmcRendering=true;e.open="Y";e.includeTitle=false;e.isExtendedAreaApp="N";e.includeBorder=false;e.location=i+"_"+c;e.isCanvasViewAvailable="N";e.isHoverViewAvailable="N";e.isStartMeInvisible=false;e.removable=h.removable;e.iconURL=(h.gadgetIcon==null||h.gadgetIcon=="")?gadgetIconPath+"/netbase.gif":h.gadgetIcon;e.hasUserPrefs=h.hasUserPrefs;shindig.container.addGadget(e);var j={mmcType:l,eid:b};e.prepareGadgetForView("mmc",d,j)}var a=sgf.constructKeyEventStrForMMC(l,"inline",h.gadgetId,"requestmmfile","a")}};sgf.constructKeyEventStrForMMC=function(d,e,b,f,a){var c="MMCType="+d+"&playerType="+e+"&gadgetId="+b+"&eventName="+f+"&location="+a;if(sciverseObj.contextInfo.issn!=undefined&&sciverseObj.contextInfo.issn!=null&&sciverseObj.contextInfo.issn!=""){c+="&issn=";c+=sciverseObj.contextInfo.issn}if(sciverseObj.contextInfo.isbn!=undefined&&sciverseObj.contextInfo.isbn!=null&&sciverseObj.contextInfo.isbn!=""){c+="&isbn=";c+=sciverseObj.contextInfo.isbn}if(sciverseObj.contextInfo.pii!=undefined&&sciverseObj.contextInfo.pii!=null&&sciverseObj.contextInfo.pii!=""){c+="&pii=";c+=sciverseObj.contextInfo.pii}if(sciverseObj.contextInfo.eid!=undefined&&sciverseObj.contextInfo.eid!=null&&sciverseObj.contextInfo.eid!=""){c+="&eid=";c+=sciverseObj.contextInfo.eid}if(sciverseObj.contextInfo.fmt!=undefined&&sciverseObj.contextInfo.fmt!=null&&sciverseObj.contextInfo.fmt!=""){c+="&fmt=";c+=sciverseObj.contextInfo.fmt}return c};sgf.ajaxKeyEventNonGadgetLog=function(a){var b=new Array();b.push(sciverseObj.smapiVars.gsUrl);b.push("/rest/usagekeyevent/create");b.push("?clientToken=");b.push(sciverseObj.contextInfo.secureAuthtoken);b.push("&sessionId=");b.push(sciverseObj.contextInfo.sessionId);jQuery.ajax({type:"POST",url:b.join(""),data:a})};sgf.processInterRefs=function(a){var d=jQuery("#"+a+" span.interref");if(d!=null&&d!=undefined&&d.length>0){for(var e=0;e0){var b=jQuery(g).text();g.unbind("click");g.removeAttr("onclick");g.bind("click",{interRefType:h,displayTerm:b},function(i){sgf.notifyInterRefGadgets(i)});if(!g.hasClass("svDoNotLink")){g.addClass("svDoNotLink")}var f=jQuery(g).find("a");if(f!=undefined&&f!=null&&f.length>0){f.removeAttr("onclick");f.click(function(i){i.preventDefault()})}}}}};sgf.notifyInterRefGadgets=function(h){var m=getMouseClickCoordinates(h);var e=listeners.interRef;if(e!=undefined&&e!=null){for(var d=0,g=e.length;d ');jQuery("body").prepend(b[0]);b[0].id="temp_OverLayDiv";b.css({position:"absolute",cursor:"move"});b.css({top:0,left:0});b.css("z-index","1009");b.height(2*(jQuery(document).height()));b.width("100%")},stop:function(d,e){jQuery("#temp_OverLayDiv").remove();var c=(checkCompliance()=="Quirks")?true:false;if(c){jQuery(".Controls").css("position","")}else{jQuery(".Controls").css("position","relative")}var b=getGadgetOrderHomePage(a);saveToolBarState(g_toolbarState,"gadgetReorder","SubmitActionUsage",false,a,b,showMoreApps)},update:function(b,c){resetHomePageColumnHeights();adjustHomePageColumnHeights()}}).disableSelection()}function calculateToolBarHeight(){var a=jQuery("#colResults").height();if(parseInt(jQuery("#toolbarBody > .sgfInnerToolbar").height())>parseInt(jQuery("#colResults").height())){a=jQuery("#sgfInnerToolbar").height()}return a}sgf.subscribeForEvents=function(a,b){if(eventSubscriptionList[a]!=undefined&&eventSubscribtionList[a]!=null){var c=eventSubscribtionList[a];c.push(b);eventSubscriptionList[a]=c}else{var c=[];c.push(b);eventSubscriptionList[a]=c}};sgf.saveEventData=function(a,e,i,d,h){if(d!=undefined&&d!=null){var g="profile";if(h!=undefined&&h!=null&&h!=""){g=h}var c=sciverseObj.gadgetInfos[a]["entTyp"];var f=sciverseObj.gadgetInfos[a]["privFlag"];if(d[e]!=undefined&&d[e]!=null){var b=d[e];b.push('{"gId":"'+a+'","privFlag":"'+f+'","entType":"'+c+'","locationId":"'+i+'","view":"'+g+'"}');d[e]=b}else{var b=[];b.push('{"gId":"'+a+'","privFlag":"'+f+'","entType":"'+c+'","locationId":"'+i+'","view":"'+g+'"}');d[e]=b}}};sgf.notifyEventSubscribers=function(b,e){if(e!=undefined&&e!=null&&e[b]){var c=[];if(eventSubscriptionList[b]){c=eventSubscriptionList[b];for(var d=0;d0&&e.width()>f.width()){h=h.substr(0,h.length-1);e.html(h+"...")}f.html(e.html());e.remove();if(b==true){var g=f.width();setInterval(function(){if(f.width()!=g){g=f.width();f.html(i);f.ellipsis()}},200)}}})}else{return this}}})(jQuery);(function(I,X){var aj,ad=Array.prototype.slice,T=decodeURIComponent,aq=I.param,ah,ao,ae,K,ap=I.bbq=I.bbq||{},V,L,ag,am=I.event.special,an="hashchange",Z="querystring",R="fragment",J="elemUrlAttr",af="href",N="src",ab=/^.*\?|#.*$/g,Q,M,ak,ai,W,S={};function P(a){return typeof a==="string"}function U(a){var b=ad.call(arguments,1);return function(){return a.apply(this,b.concat(ad.call(arguments)))}}function ac(a){return a.replace(M,"$2")}function Y(a){return a.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function al(h,c,j,g,i){var a,d,e,b,f;if(g!==aj){e=j.match(h?M:/^([^#?]*)\??([^#]*)(#?.*)/);f=e[3]||"";if(i===2&&P(g)){d=g.replace(h?Q:ab,"")}else{b=ae(e[2]);g=P(g)?ae[h?R:Z](g):g;d=i===2?g:i===1?I.extend({},g,b):I.extend({},b,g);d=ah(d);if(h){d=d.replace(ak,T)}}a=e[1]+(h?W:d||!e[1]?"?":"")+d+f}else{a=c(j!==aj?j:location.href)}return a}aq[Z]=U(al,0,Y);aq[R]=ao=U(al,1,ac);aq.sorted=ah=function(c,b){var d=[],a={};I.each(aq(c,b).split("&"),function(e,h){var f=h.replace(/(?:%5B|=).*$/,""),g=a[f];if(!g){g=a[f]=[];d.push(f)}g.push(h)});return I.map(d.sort(),function(e){return a[e]}).join("&")};ao.noEscape=function(a){a=a||"";var b=I.map(a.split(""),encodeURIComponent);ak=new RegExp(b.join("|"),"g")};ao.noEscape(",/");ao.ajaxCrawlable=function(a){if(a!==aj){if(a){Q=/^.*(?:#!|#)/;M=/^([^#]*)(?:#!|#)?(.*)$/;W="#!"}else{Q=/^.*#/;M=/^([^#]*)#?(.*)$/;W="#"}ai=!!a}return ai};ao.ajaxCrawlable(0);I.deparam=ae=function(a,d){var b={},c={"true":!0,"false":!1,"null":null};I.each(a.replace(/\+/g," ").split("&"),function(l,f){var m=f.split("="),g=T(m[0]),n,h=b,j=0,e=g.split("]["),i=e.length-1;if(/\[/.test(e[0])&&/\]$/.test(e[i])){e[i]=e[i].replace(/\]$/,"");e=e.shift().split("[").concat(e);i=e.length-1}else{i=0}if(m.length===2){n=T(m[1]);if(d){n=n&&!isNaN(n)?+n:n==="undefined"?aj:c[n]!==aj?c[n]:n}if(i){for(;j<=i;j++){g=e[j]===""?h.length:e[j];h=h[g]=j7);function t(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}j.fn[r]=function(a){return a?this.bind(r,a):this.trigger(r)};j.fn[r].delay=50;n[r]=j.extend(n[r],{setup:function(){if(q){return false}j(o.start)},teardown:function(){if(q){return false}j(o.stop)}});o=(function(){var d={},e,a=t(),c=function(h){return h},b=c,f=c;d.start=function(){e||g()};d.stop=function(){e&&clearTimeout(e);e=s};function g(){var h=t(),i=f(a);if(h!==a){b(a=h,i);j(p).trigger(r)}else{if(i!==a){location.href=location.href.replace(/#.*/,"")+i}}e=setTimeout(g,j.fn[r].delay)}j.browser.msie&&!q&&(function(){var i,h;d.start=function(){if(!i){h=j.fn[r].src;h=h&&h+t();i=j('';j+="";gadgets.rpc.setRelayUrl(m,this.serverBase_+this.rpcRelay);gadgets.rpc.setAuthToken(m,this.rpcToken);log(this.sciverseId_,"got frame content");e(j)};shindig.SciverseGadget.prototype.getTitleBarContent=function(h){if(this.includeTitle==false){h("");return}var g;if(this.title){g=this.title}else{g="title"}var l="";var a=""+gadgetIconPath+"/gsframeworksprite.png";var p=decodeURIComponent(sgf.labels.closeApp);var n;var i;var e;var r;var m;var d="";var f="";var j="";var c="menu";var q="sprite-close";if(this.open==="N"){p=decodeURIComponent(sgf.labels.openApp);n=true;appheaderClass="InactiveGadget";m="elsevierTimeL";j="sgfClose";c="closedMenu";q="sprite-open"}else{n=false;appheaderClass="ActiveGadget";m="elsevierTimeLOver";j="sgfOpen"}if(this.isOnhoverChromeRequired){d="showTitleBarOnHover";appheaderClass=""}if(jQuery("#"+this.location).hasClass("sgfIsGadgeGator")){var o="background: url(/static/images/tmp/dottedLine.gif) repeat-x 0 16px;";var b="display:inline-block;";if(MSIE7Flag===true){o="";b=""}l='
      ';l+='

      ';l+=g;l+="

      ";l+='
      ";l+="
      "}else{l+='
      ';l+='';l+='

      '+g+'

      ";l+='";l+="
      "}log(this.sciverseId_,"got title bar content");h(l)};shindig.SciverseGadget.prototype.closeGadget=function(){jQuery("#maincont"+this.getIframeId()).parent().remove()};shindig.SciverseGadget.prototype.getUserPrefsDialogContent=function(a){a('')};shindig.SciverseGadget.prototype.handleCancelUserPrefs=function(){var a=false;jQuery("#"+this.getUserPrefsDialogId()).slideToggle()};shindig.SciverseGadget.prototype.handleToggle=function(c){if(jQuery("#"+this.getUserPrefsDialogId()).css("display")=="block"){jQuery("#"+this.getUserPrefsDialogId()).slideToggle()}var d=false;var b="SubmitActionUsage";var i="";var h=false;if(jQuery(c).children()[0]!=null&&jQuery(c).children()[0].tagName=="DIV"){d=true}var j="";if(this.requiresPubSub2){j=this.oaaIframeId}else{j=this.getIframeId()}var m=document.getElementById(j);if(m){var l=jQuery("#maincont"+this.getIframeId()).css("display");var e=jQuery("#"+j);var g=jQuery("#toggleBtn_"+this.id);var f=jQuery("#footer"+this.cssClassTitleBar+"-"+this.id);if(l=="none"){if(e.attr("src")==""){e.attr("src",this.getIframeUrl())}g.removeClass("sprite-open").addClass("sprite-close").attr("title",decodeURIComponent(sgf.labels.closeApp));f.removeClass("InactiveGadget").addClass("ActiveGadget").removeClass("sgfClose").addClass("sgfOpen");jQuery("#GadgetName"+this.id).css("font-weight","bold")}else{g.removeClass("sprite-close").addClass("sprite-open").attr("title",decodeURIComponent(sgf.labels.openApp));f.removeClass("ActiveGadget").addClass("InactiveGadget").removeClass("sgfOpen").addClass("sgfClose");if(!jQuery("#"+this.location).hasClass("sgfIsGadgeGator")){jQuery("#GadgetName"+this.id).css("font-weight","normal")}}jQuery("#maincont"+this.getIframeId()).slideToggle("normal",function(){var n=parseInt(jQuery("#sciverse_toolbar").height(),10)-7;n+="px";resetHomePageColumnHeights();adjustHomePageColumnHeights()});var a=this.open;if(a==="N"){i="openGadget";this.open="Y"}else{i="closeGadget";this.open="N"}if(d){if(jQuery("#sb-"+this.getUserPrefsDialogId()).css("display")=="block"){jQuery("#sb-"+this.getUserPrefsDialogId()).toggle()}}else{this.openMenuOptions()}}this.saveGadgetState(i,b,h)};shindig.SciverseGadget.prototype.saveGadgetState=function(f,b,e){var i=sciverseObj.contextInfo.pageType;var d="";var c="";if(this.open==="N"){d="N";c="close|visible"}else{d="Y";c="open|visible"}var g=this.location;var h="gadgetDefinition="+this.specUrl+"&location="+this.location+"&gadgetOpen="+d;h+="&eventName="+f+"&keyEventType="+b+"&zone="+g;h+="&pageName="+i+"&isKeyEventURLAvailble="+isKeyEventURLExists;h+="&gadgetId="+this.sciverseId_+"&moduleName=gadget&gadgetState="+c;var a=new Array();a.push(sciverseObj.smapiVars.gsUrl);a.push("/rest/gadgetstate/gadget/gs/");a.push(this.sciverseId_);a.push("?clientToken=");a.push(sciverseObj.contextInfo.secureAuthtoken);a.push("&sessionId=");a.push(sciverseObj.contextInfo.sessionId);jQuery.ajax({type:"POST",url:a.join(""),data:h})};shindig.SciverseGadget.prototype.openMenuOptions=function(){var g=sciverseObj.smapiVars.gadgetDetailPage+"/"+this.sciverseId_;var f=false;var c;c="sb-";c+=this.getUserPrefsDialogId();var i=jQuery("#"+this.getIframeId()).parents(".containerApplOver").prev().attr("id");var e=jQuery("#"+this.getIframeId()).parents(".containerApplOver").next().attr("id");if(jQuery("#"+e).hasClass("ExtendedAreaApp")){e=null}var l=jQuery("#"+c).parent();var h=jQuery(l).position();var d=jQuery(l).find("li");var b=jQuery("#"+c);if(b.css("display")=="none"){b.css("display","block")}else{b.css("display","none")}var j="";if(this.open==="Y"){j+='
    • '+decodeURIComponent(sgf.labels.turnOff)+"
    • "}else{j+='
    • '+decodeURIComponent(sgf.labels.turnOn)+"
    • "}if(this.hasUserPrefs){j+='
    • '+decodeURIComponent(sgf.labels.editPrefs)+"
    • "}if(navigator.userAgent.indexOf("Firefox")===-1){if(e!="undefined"&&e!=""&&e!=null){j+='
    • '+decodeURIComponent(sgf.labels.moveDown)+"
    • "}else{j+='
    • '+decodeURIComponent(sgf.labels.moveDown)+"
    • "}if(i!="undefined"&&i!=""&&i!=null){j+='
    • '+decodeURIComponent(sgf.labels.moveUp)+"
    • "}else{j+='
    • '+decodeURIComponent(sgf.labels.moveUp)+"
    • "}}b.html(j);b.css({top:Number(h.top+10)+"px",left:Number(h.left-b.outerWidth()-5)+"px"});var a=checkCompliance();if(a=="Quirks"&&truncateURL){var m=jQuery(d[0]).position();b.css("left",Number(m.left-b.outerWidth()-5)+"px")}jQuery(subMenuIdBuf).unbind("clickoutside");submenuID="#sb-"+this.getUserPrefsDialogId();if(submenuID1!==submenuID){jQuery(submenuID1).hide()}submenuID1="#sb-"+this.getUserPrefsDialogId();subMenuIdBuf="#button-"+this.getUserPrefsDialogId();jQuery("#button-"+this.getUserPrefsDialogId()).bind("clickoutside",function(n){jQuery(submenuID1).hide()})};shindig.SciverseGadget.prototype.moveUP=function(){var e="#sb-"+this.getUserPrefsDialogId();var c=jQuery("#"+this.getIframeId()).parents(".containerApplOver");var b=c.prev();var d=b.attr("id");if(!b.hasClass("tempExtendedAreaApp")&&c.hasClass("tempExtendedAreaApp")){c.removeClass("tempExtendedAreaApp");b.addClass("tempExtendedAreaApp")}jQuery("#"+this.getIframeId()).parents(".containerApplOver").insertBefore("#"+d);var a=(jQuery("#"+this.location).hasClass("sgfHomePage"))?getGadgetOrderHomePage(this.location):getGadgetOrder(this.location);saveToolBarState(g_toolbarState,"gadgetReorder","SubmitActionUsage",false,this.location,a,showMoreApps);jQuery(e).hide()};shindig.SciverseGadget.prototype.moveDOWN=function(){var e="#sb-"+this.getUserPrefsDialogId();var c=jQuery("#"+this.getIframeId()).parents(".containerApplOver");var d=c.next();var b=d.attr("id");if(d.hasClass("tempExtendedAreaApp")){d.removeClass("tempExtendedAreaApp");c.addClass("tempExtendedAreaApp")}jQuery("#"+this.getIframeId()).parents(".containerApplOver").insertAfter("#"+b);var a=(jQuery("#"+this.location).hasClass("sgfHomePage"))?getGadgetOrderHomePage(this.location):getGadgetOrder(this.location);saveToolBarState(g_toolbarState,"gadgetReorder","SubmitActionUsage",false,this.location,a,showMoreApps);jQuery(e).hide()};shindig.SciverseGadget.prototype.togglesubmenu=function(){jQuery("#sb-"+this.getUserPrefsDialogId()).toggle()};shindig.SciverseGadget.prototype.getUserPrefs=function(){return this.userPrefs};shindig.SciverseGadget.prototype.resizeUserPrefsDialog=function(){var a=this.getUserPrefsDialogId();jQuery("#"+a).css({width:"100%",height:"100%"})};shindig.SciverseGadget.prototype.getUserPrefsParams=function(){var b="";for(var a in this.getUserPrefs()){b+="&up_"+encodeURIComponent(a)+"="+encodeURIComponent(this.getUserPrefValue(a))}return b};shindig.SciverseGadget.prototype.handleOpenUserPrefsDialog=function(){var c=this;terms=new Array();var b="ig_callback_"+this.id;window[b]=function(f){c.userPrefsDialogContentLoaded=true;var e=f;c.buildUserPrefsDialog(e);c.showUserPrefsDialog();var d=jQuery("#ig_edit_div"+c.id+" input");for(var g=0;g").html(h.value).text()))}}};var a=document.createElement("script");a.src=sciverseObj.smapiVars.gsUrl+"/gadgetsettings?mid="+this.id+"&output=js"+this.getUserPrefsParams()+"&url="+this.specUrl;document.body.appendChild(a);resetHomePageColumnHeights();adjustHomePageColumnHeights();if(this.open==="N"){shindig.container.getGadget(this.id).handleToggle(this)}else{jQuery("#sb-"+this.getUserPrefsDialogId()).toggle()}};function removeItemsFromList(a){jQuery("#"+a).remove()}function addItemsToList(d){var c=document.getElementById(d).value;terms.push(c);var b=document.createElement("li");b.innerHTML='
    • '+c+"
    • ";var a=document.getElementById("listItemsUL");a.appendChild(b)}shindig.SciverseGadget.prototype.handleSaveUserPrefs=function(){jQuery("#"+this.getUserPrefsDialogId()).slideToggle();var d=document.getElementById("m_"+this.id+"_numfields").value;for(var e=0;e0){var g=f.substring(0,f.indexOf("_list"));if(typeof(this.userPrefs[g])!="undefined"){var b=new Array();b.push(this.userPrefs[g].value);for(var c=0;c/g,">");a=a.replace(/");a=a.replace(/%26gt%3B/g,">");a=a.replace(/</g,"<");a=a.replace(/%26lt%3B/g,"<");a=a.replace(/"/g,'\\"');a=a.replace(/%26quot%3B/g,"%22");a=a.replace(/'/g,"'");a=a.replace(/%26%23039%3B/g,"'");return a}shindig.DefaultUserPrefStore.prototype.getPrefs=function(a){};shindig.DefaultUserPrefStore.prototype.savePrefs=function(g){var f=gadgets.json.stringify(g.userPrefs);var b="saveGadgetPreferences";var a=g.location;var d=false;var e="userPreferences="+f+"&";e+="location="+g.location+"&";e+="originPage="+sciverseObj.contextInfo.pageType+"&";e+="keyEventType=SubmitActionUsage&";e+="gadgetDefinition="+g.specUrl+"&";e+="eventName="+b+"&";e+="gadgetId="+g.sciverseId_+"&";e+="gadgetName="+g.title+"&";e+="zone="+a+"&";e+="pageName="+sciverseObj.contextInfo.pageType+"&";e+="isKeyEventURLAvailble="+isKeyEventURLExists+"&";e+="hidden=N";var c=new Array();c.push(sciverseObj.smapiVars.gsUrl);c.push("/rest/userpreference/gs/");c.push(g.sciverseId_);c.push("?clientToken=");c.push(sciverseObj.contextInfo.secureAuthtoken);c.push("&sessionId=");c.push(sciverseObj.contextInfo.sessionId);jQuery.ajax({type:"POST",url:c.join(""),data:e})};shindig.SciverseGadget.prototype.openCanvasView=function(c){var d=document.createElement("div");d.id="canvas";var b;sgf.currentCanvasHolder=this.sciverseId_;jQuery("body").prepend('
      ');shindig.container.layoutManager=new shindig.FloatLeftLayoutManager(d.id);var a=shindig.container.createGadget({specUrl:this.specUrl,title:this.title,userPrefs:this.userPrefs,requiresPubSub2:this.requiresPubSub2});a.sciverseId_=this.sciverseId_;a.open=this.open;a.location=this.location;a.iconURL=(this.iconURL==null||this.iconURL=="")?gadgetIconPath+"/netbase.gif":this.iconURL;shindig.container.addGadget(a);a.prepareGadgetForView("canvas",d,c);var e=this.location;if(e!=null&&e.indexOf("resultsView")!=-1){b="resultsView"}else{b=this.location}};shindig.SciverseGadget.prototype.prepareGadgetForView=function(c,a,b){var d=this.getIframeUrl();d=buildViewUrl(d,c,b);shindig.container.renderGadget(this,c,d,a)};shindig.SciverseGadget.prototype.closeCanvas=function(e){var g=false;var h="SubmitActionUsage";var b="closeCanvas";var d=false;jQuery("body").css("overflow","auto");if(jQuery(e).children()[0]!=null&&jQuery(e).children()[0].tagName=="IMG"){g=true}var c=jQuery("#canvas");c.children().remove();c.remove();if(MSIE7Flag===true){}else{window.history.back()}jQuery("#"+sciverseObj.contextInfo.pageContentDivTagName).show();var a;var f=this.location;if(f!=null&&f.indexOf("resultsView")!=-1){a="resultsView"}else{a=this.location}if(jQuery("#sb-"+this.getUserPrefsDialogId()).css("display")=="block"){jQuery("#sb-"+this.getUserPrefsDialogId()).toggle()}focusGadget()};function buildViewUrl(b,a,d){var e=getUrlParam("view",b);if(e){var b=b.replace("view="+e,"view="+a)}else{b+="&view="+encodeURIComponent(a)}if(d){var c=gadgets.json.stringify(d);if(c.length>0){b+="&view-params="+encodeURIComponent(c)}}return b}function getUrlParam(c,b){c=c.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var a="[\\?&]"+c+"=([^&#]*)";var e=new RegExp(a);var d=e.exec(b);if(d==null){return""}else{return d[1]}}var canvasUrl="";shindig.SciverseGadget.prototype.getCanvasContent=function(b,a){canvasUrl=b;shindig.callAsyncAndJoin([this.getCanvasTitleBarContent,this.getCanvasMainContent],function(c){a(c.join(""))},this)};shindig.SciverseGadget.prototype.getCanvasTitleBarContent=function(a){if(this.includeChrome==false){a("");return}var c;if(this.title){c=this.title}else{c="title"}var b='
      ';b+='';b+='

      '+c+'

        ';b+='
      • ';b+="
      ";b+="
      ";b+='
      ';b+="
      ";a(b)};shindig.IfrGadget.getCanvasMainContent=function(b){var d=this.getIframeId();var a=sciverseObj.smapiVars.gadgetDetailPage+"?appId="+this.sciverseId_;var c='
      ';c+="
      ";b(c);gadgets.rpc.setRelayUrl(d,this.serverBase_+this.rpcRelay);gadgets.rpc.setAuthToken(d,this.rpcToken)};shindig.SciverseGadget.prototype.renderCanvas=function(a,b){this.getCanvasContent(a,function(c){jQuery("#canvas").html(c);loadCanvas(b)});if(this.requiresPubSub2===true){this.finishRender(a)}};shindig.SciverseGadget.prototype.renderResultsView=function(a,b){this.getResultsViewContent(b,a,function(c){a.innerHTML=c});if(this.requiresPubSub2===true){this.finishRender(b)}};shindig.SciverseGadget.prototype.getResultsViewContent=function(c,b,a){this.resultsViewUrl=c;this.resultsViewChrome=b;var d=this.getIframeId();gadgets.rpc.setRelayUrl(d,this.serverBase_+this.rpcRelay);gadgets.rpc.setAuthToken(d,this.rpcToken);shindig.callAsyncAndJoin([this.getResultsViewTitleBarContent,this.getResultsViewMainContent],function(e){a(e.join(""))},this)};shindig.SciverseGadget.prototype.getResultsViewTitleBarContent=function(a){var c;if(this.title){c=this.title}else{c="title"}var b="";a(b)};shindig.IfrGadget.getResultsViewMainContent=function(a){var c=this.getIframeId();var b="";b+='
      ';b+='
      ';b+="";a(b)};shindig.SciverseGadget.prototype.closeResultView=function(){jQuery("#footer_res_gadgets-gadget-title-bar-"+this.id).parent().remove()};shindig.SciverseGadget.prototype.renderHooverView=function(a,b){this.getHooverViewContent(b,a,function(c){a.innerHTML=c})};shindig.SciverseGadget.prototype.getHooverViewContent=function(c,b,a){this.resultsViewUrl=c;this.resultsViewChrome=b;var d=this.getIframeId();gadgets.rpc.setRelayUrl(d,this.serverBase_+this.rpcRelay);gadgets.rpc.setAuthToken(d,this.rpcToken);shindig.callAsyncAndJoin([this.getHooverViewTitleBarContent,this.getHooverViewMainContent],function(e){a(e.join(""))},this)};shindig.SciverseGadget.prototype.getHooverViewTitleBarContent=function(a){var b='
      ';b+='';b+='

      '+this.title+'

      ";b+="
      ";b+="
      ";a(b)};shindig.SciverseGadget.prototype.getHooverViewMainContent=function(a){a('
      ')};shindig.SciverseGadget.prototype.closeHooverView=function(){jQuery("#hoover-"+this.id).parent().remove()};shindig.SciverseGadget.prototype.togglePin=function(){var c=jQuery("#"+this.getIframeId()).parent().parent().attr("id");var e=document.getElementById(c);var b;var d;var f=jQuery("#"+c);var a=jQuery("#pin_"+this.id);if(f.css("position")=="absolute"){f.css("position","fixed");b=parseInt(e.style.top,10)-jQuery(window).scrollTop();b+="px";a.attr("src",gadgetIconPath+"/pin-dn-off.gif");a.attr("title",decodeURIComponent(sgf.labels.unpin));this.pinPosition="fixed";d=checkCompliance();if(d=="Quirks"){if(f.attr("lang")==""){f.css("position","absolute");f.attr("lang",b);jQuery(window).scroll(function(){var g=f.attr("lang");var i=g.substring(0,g.length-2);var h=jQuery(document).scrollTop()+Number(i);jQuery("#"+c).css("top",h+"px")})}else{a.attr("src",gadgetIconPath+"/pin-up-off.gif");a.attr("title",decodeURIComponent(sgf.labels.pin));jQuery(window).unbind("scroll");f.css("position","absolute");f.attr("lang","");this.pinPosition="absolute"}}else{f.css("top",b)}}else{d=checkCompliance();f.css("position","absolute");b=parseInt(e.style.top,10)+jQuery(window).scrollTop();b+="px";f.css("top",b);this.pinPosition="absolute";a.attr("src",gadgetIconPath+"/pin-up-off.gif");a.attr("title",decodeURIComponent(sgf.labels.pin))}};function log(b,a,c){if(debug){jQuery("#"+a+"_debug_"+b).append("\n
      "+c+"->"+calculateUTCTime())}}function calculateUTCTime(){var j;var h=new Date();var l=h.getUTCDate();var i=h.getUTCMonth();var e=h.getUTCFullYear();var a=h.getUTCHours();var f=h.getUTCMinutes();var g=h.getUTCSeconds();var c=h.getUTCMilliseconds();j=l+"-"+i+"-"+e+" ";var b="AM";if(a==0){a=12}if(a>12){a=a-12;b="PM"}f=f+"";if(f.length==1){f="0"+f}g=g+"";if(g.length==1){g="0"+g}j+=a+":"+f+":"+g+":"+c+" "+b;return j}shindig.IfrGadget.getIframeUrl=function(){var f=shindig.container.country_;var e=shindig.container.language_;if(sciverseObj.contextInfo.locale){e=sciverseObj.contextInfo.locale.substring(0,2);f=sciverseObj.contextInfo.locale.substring(3)}var b=this.serverBase_+"ifr?container="+this.CONTAINER+"&mid="+this.id+"&nocache="+shindig.container.nocache_+"&country="+f+"&lang="+e+"&view="+shindig.container.view_+(this.specVersion?"&v="+this.specVersion:"")+(shindig.container.parentUrl_?"&parent="+encodeURIComponent(shindig.container.parentUrl_):"")+(this.debug?"&debug=1":"")+this.getAdditionalParams();if(truncateURL){var c=false;for(var a in this.getUserPrefs()){var d="";d+="&up_"+encodeURIComponent(a)+"="+encodeURIComponent(this.getUserPrefValue(a));if((b+d).length<2074){b+=d}else{c=true}}if(c){b+="&urlMgld=y"}}else{b+=this.getUserPrefsParams()}b+=(this.secureToken?"&st="+this.secureToken:"")+"&url="+encodeURIComponent(this.specUrl)+"#rpctoken="+this.rpcToken+(this.viewParams?"&view-params="+encodeURIComponent(gadgets.json.stringify(this.viewParams)):"")+(this.hashData?"&"+this.hashData:"");return b};shindig.SciverseGadget.prototype.renderColumnView=function(a,b){this.getColumnViewContent(b,a,function(c){a.innerHTML=c});if(this.requiresPubSub2===true){this.finishRender(b)}};shindig.SciverseGadget.prototype.getColumnViewContent=function(c,b,a){this.columnViewUrl=c;this.columnViewChrome=b;var d=this.getIframeId();gadgets.rpc.setRelayUrl(d,this.serverBase_+this.rpcRelay);gadgets.rpc.setAuthToken(d,this.rpcToken);shindig.callAsyncAndJoin([this.getColumnViewTitleBarContent,this.getColumnViewMainContent],function(e){a(e.join(""))},this)};shindig.SciverseGadget.prototype.getColumnViewTitleBarContent=function(a){var b;if(this.title){title=this.title}else{b="title"}a("")};shindig.IfrGadget.getColumnViewMainContent=function(a){var c=this.getIframeId();var b=[];b.push('
      ');b.push('
      ');a(b.join(""))};shindig.OAAIfrGadget={getMainContent:function(a){a('
      ');sgf.killTimer(this.sciverseId_,this.location)},getCanvasMainContent:function(a){a('
      ');sgf.killTimer("canvas","canvas")},getResultsViewMainContent:function(a){a('
      ');sgf.killTimer(this.sciverseId_,this.location)},getHooverViewMainContent:function(a){a('
      ');sgf.killTimer(this.sciverseId_,this.location)},finishRender:function(a){var b={className:this.cssClassGadget,frameborder:"no",scrolling:"auto"};if(this.height){b.height=this.height}else{b.height=150}if(this.width){b.width=this.width}iframeContainer=new OpenAjax.hub.IframeContainer(gadgets.pubsub2router.hub,this.getIframeId(),{Container:{onSecurityAlert:function(e,d){gadgets.error("Security error for container "+e.getClientID()+" : "+d)},onConnect:function(d){}},IframeContainer:{parent:document.getElementById("maincont"+this.getIframeId()),uri:a?a:this.getIframeUrl(),tunnelURI:shindig.uri(this.serverBase_+this.rpcRelay).resolve(shindig.uri(window.location.href)),iframeAttrs:b}});var c=iframeContainer.getIframe().id;return c},getIframeUrl:function(){furl=this.serverBase_+"ifr?container="+this.CONTAINER+"&mid="+this.id+"&nocache="+shindig.container.nocache_+"&country="+shindig.container.country_+"&lang="+shindig.container.language_+"&view="+shindig.container.view_+(this.specVersion?"&v="+this.specVersion:"")+(shindig.container.parentUrl_?"&parent="+encodeURIComponent(shindig.container.parentUrl_):"")+(this.debug?"&debug=1":"")+this.getAdditionalParams()+this.getUserPrefsParams()+(this.secureToken?"&st="+this.secureToken:"")+"&url="+encodeURIComponent(this.specUrl)+"#rpctoken="+this.rpcToken+(this.viewParams?"&view-params="+encodeURIComponent(gadgets.json.stringify(this.viewParams)):"")+(this.hashData?"#"+this.hashData:"");return furl}};shindig.SciverseGadget.prototype.getIframeUrlWithPreferredView=function(){var a=this.getIframeUrl();if(this.preferredView!=null){a=buildViewUrl(a,this.preferredView)}return a};function checkCompliance(){var a=document.compatMode;var b="";if(a){if(a=="BackCompat"){b="Quirks"}else{if(a=="CSS1Compat"){b="Standards Compliance"}}return b}}sgf.resultsChanged=function(){addAllButtonResults={};buttonCounter=-1;var c="results";if(listeners[c]!=null){var d=listeners[c]}if(d==null){return}for(var a=0;a ';b+='';a(b)};sgf.continueFrameworkActivities=function(a){this.processMmcGadgets(a);this.processInterRefs(a);this.continueLinkText(a)};sgf.continueLinkText=function(b){if(typeof this.linkTextFrames==="undefined"||null===this.linkTextFrames){return}var a=this.linkTextFrames.length;if(a===0){return}var g=jQuery("#"+b);for(var e=0;e-1){this.doLinkText(g,h.frame,h.terms,h.categories,h.frequency,h.occurence,h.callbackName);continue}for(var d=0;d0||jQuery("#"+b).find(sgf.allCategories[c[d]]).length>0){this.doLinkText(g,h.frame,h.terms,h.categories,h.frequency,h.occurence,h.callbackName);return}}}};shindig.ScienceDirectService=function(){shindig.IfrGadgetService.call(this)};shindig.ScienceDirectService.inherits(shindig.IfrGadgetService);shindig.ScienceDirectService.prototype.executeSDSearch=function(b){if(typeof(b)=="undefined"||b==null||b==""){return}var e=shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);var d=shindig.container.getGadget(e);var a=d.sciverseId_;var c=sciverseObj.smapiVars.searchQueryURL;c+="&gadgetST="+b;c+="&gadgetID="+a;window.location=c};shindig.IfrContainer.prototype.ScienceDirectService=new shindig.ScienceDirectService();