";box.style.display = "block";}function citHideNearBox() {var box = citGetById("cit-near-box");if (box) {box.style.display = "none";box.parentNode.removeChild(box);}}function citToggleNearBox(near_me, message, vurl, vtext, hurl, htext) {var box = citGetById("cit-near-box");if (box &&box.style.display == "block" &&near_me.parentNode == box.parentNode) {citHideNearBox();} else {citHideNearBox();citShowNearBox(near_me, message, vurl, vtext, hurl, htext);}}function citMessageDisplay(msgBox, display) {if (!msgBox) return;try {msgBox.style.visibility = display;} catch (ex) {msgBox.setAttribute("style", "visibility: " + display);}}function citSelectAll() {var form = citGetById("citationsForm");for (var i = 0; i < form.elements.length; i++) {if (form.elements[i].type != "checkbox") continue;form.elements[i].checked = true;}}function citSelectNone() {var form = citGetById("citationsForm");for (var i = 0; i < form.elements.length; i++) {if (form.elements[i].type != "checkbox") continue;form.elements[i].checked = false;}}function citInPlaceMouseOver(field) {citGetById("cit-" + field + "-display").className = "cit-in-place-hover";}function citInPlaceMouseOut(field) {citGetById("cit-" + field + "-display").className = "cit-in-place-nohover";}function citInPlaceResetAndEdit(field) {citInPlaceReset(field);citInPlaceEdit(field);}function citGetTextContent(id) {var elem = citGetById(id);if (!elem) return "";if (elem.innerText != undefined) {/* IE, Safari, Chrome, Opera */return elem.innerText;} else if (elem.textContent) {/* IE9, Firefox, Safari, Chrome, Opera */return elem.textContent;}return "";}function citInPlaceReset(field) {/* Reset the edit field to the current value. */if (field == "int" || field == "domain" || field == "homepage") {var currval = citGetTextContent("cit-" + field + "-prefill");} else {var currval = citGetTextContent("cit-" + field + "-display");}var input = citGetById("cit-" + field + "-input");input.value = currval;}function citInPlaceEdit(field) {/* Hide display field and show input box. */citHide("cit-" + field + "-read");citShow("cit-" + field + "-write", "inline");var input = citGetById("cit-" + field + "-input");if (input) input.focus();}function citInPlaceShow(field) {citHide("cit-" + field + "-read");citShow("cit-" + field + "-write", "inline");}function citInPlaceCancel(field) {/* Hide input box and show display field. */citHide("cit-" + field + "-write");citShow("cit-" + field + "-read", "inline");}function citToggleIndexDef(id) {var index_def = citGetById(id);if (!index_def) return;if (index_def.style.display &&index_def.style.display == "block") {citHideAllIndexDefs();} else {citHideAllIndexDefs();citShow(id, "block");}return false;}function citHideAllIndexDefs() {citHide('h_index_definition');citHide('i_ten_index_definition');citHide('total_citations_definition');citHide('h5_index_definition');citHide('h5_median_definition');return false;}function citMessageBox(messageBox, messageText) {this.messageBox = citGetById(messageBox);this.messageText = citGetById(messageText);this.timeoutId = null;}citMessageBox.prototype.hideMessage = function () {citMessageDisplay(this.messageBox, "hidden");};citMessageBox.prototype.showMessage = function (newText) {if (!newText) {this.hideMessage();} else {this.messageText.innerHTML = newText;citMessageDisplay(this.messageBox, "visible");this.setHideMessageTimeout();}};citMessageBox.prototype.setHideMessageTimeout = function () {this.cancelHideMessageTimeout();var _self = this;this.timeoutId = setTimeout(function () {_self.hideMessage();}, 60000);};citMessageBox.prototype.cancelHideMessageTimeout = function () {try {clearTimeout(this.timeoutId);} catch (ex) {/* Don't care. */}this.timeoutId = null;};var citGCMessageBox;function citInitGlobals() {citGCMessageBox = new citMessageBox("message_box", "message_text");var showMsg = citGetById("cit-show-msg");var shownMsg = citGetById("cit-shown-msg");if (showMsg && showMsg.value && !(shownMsg && shownMsg.value)) {if (shownMsg) shownMsg.value = "1";citMessageDisplay(citGCMessageBox.messageBox, "visible");citGCMessageBox.setHideMessageTimeout();}if (window.addEventListener) {window.addEventListener("unload", function() { citGCMessageBox.hideMessage(); }, false);} else if (window.attachEvent) {window.attachEvent("onunload", function() {citGCMessageBox.hideMessage(); });}}if (window.addEventListener) {window.addEventListener("load", citInitGlobals, false);} else if (window.attachEvent) {window.attachEvent("onload", citInitGlobals);}