/***************************************************Created: 09/25/2009Author: Spencer Smith Description: Common Javascript functions***************************************************/// temporary fix for Kennyvar stopWordsList = "[a, about, advent, after, all, also, an, and, any, applying, are, at, because, been, before, being, believe, between, beyond, but, by, can, cant, carrying, clases, class, could, do, does, doesnt, during, each, eg, et, eta, etal, follows, for, fore, found, from, gave, generally, give, given, gives, giving, good, gr, grade, grd, group, groups, had, has, have, hence, here, however, if, iii, in, inc, index, into, is, it, key, less, many, more, most, mostly, must, neither, never, not, nu, occurs, of, on, once, or, other, out, path, play, ran, ref, refer, repeat, running, said, same, see, select, several, should, shouldnt, similar, some, still, such, than, that, the, them, then, there, thereby, therefore, these, this, through, to, tp, type, use, used, uses, using, usually, utilize, utilized, utilizes, utilizing, various, was, were, when, whence, where, whereas, which, while, will, with, without]";/* Configuration Options */var hideDelay = 1000;var iTimeoutID;  // set this to two weeksvar cookiesExpireInSeconds = 1209600;// is this ie6?var isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1;/* Global Variables */var divToHide;var okToHideDiv = true;var IE6 = false /*@cc_ON || @_jscript_version < 5.7 @*/;function disableDropDowns() {elements = document.getElementsByTagName("select");if (elements) {for (var e=0; e < elements.length; e++) {elements[e].style.visibility = 'hidden';}}	}function enableDropDowns() {elements = document.getElementsByTagName("select");if (elements) {for (var e=0; e < elements.length; e++) {elements[e].style.visibility = 'visible';}}	}	function getElementsByClassName(className, tag, elm){var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");var tag = tag || "*";var elm = elm || document;var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);var returnElements = [];var current;var length = elements.length;for(var i=0; i<length; i++){current = elements[i];if(testClass.test(current.className)){returnElements.push(current);}}return returnElements;}	function stripHTML(oldString) {   var newString = "";   var inTag = false;   for(var i = 0; i < oldString.length; i++) {           if(oldString.charAt(i) == '<') inTag = true;        if(oldString.charAt(i) == '>') {              inTag = false;              i++;        }           if(!inTag) newString += oldString.charAt(i);   }   return newString;}function jumpToPage(page) {var pageId = 'quotes_page' + page;						var el = document.getElementById(pageId);if (el) {// turn off all the other blocksfor (var i=1; i < 6; i++) {var blockId = 'quotes_page' + i;				var blockEl = document.getElementById(blockId);				if (blockEl) {				blockEl.style.display = 'none';}}	el.style.display = 'block';}// jump to the top of the pagedocument.location = '#top';}function showDiv(id) {var el = document.getElementById(id);if (id) {el.style.display = 'block';}}function hideDiv(id) {var el = document.getElementById(id);if (id) {el.style.display = 'none';}}function addToFavorites() {// Mozilla Firefox Bookmark		if (window.sidebar) { var okToAdd = confirm('Click OK to add Knovel to your favorites');if (okToAdd) {window.sidebar.addPanel(bookmarkSiteName, bookmarkSiteAddress, "");	}	} else if (window.external) { // IE Favorite		var okToAdd = confirm('Click OK to add Knovel to your favorites');if (okToAdd) {		window.external.AddFavorite(bookmarkSiteAddress, bookmarkSiteName); }	}	}function openNew(url){var standardProps = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no';var win = window.open(url,'popup',standardProps +',width=500,height=400');win.focus();}function openFullPopup(url) {var w = 480, h = 340;if (document.body) {   w = document.body.clientWidth;   h = document.body.clientHeight;}// window width and heightvar popW = 792, popH = 662;var leftPos = (w-popW)/2;var topPos = (h-popH)/2;if (leftPos < 0) {leftPos = 0;}	if (topPos < 0) {topPos = 20;}var parameters = 'menubar=no, resizable=no, directories=no, status=no, toolbar=no, width=' + popW + ', height=' + popH + ', top=' + topPos + ', left=' + leftPos;	var win = window.open(url, 'popupWindow', parameters);win.focus();}function openScrollableWindowPopup(url, width, height) {var w = 480, h = 340;if (document.body) {   w = document.body.clientWidth;   h = document.body.clientHeight;}// window width and heightvar popW = width, popH = height;var leftPos = (w-popW)/2;var topPos = (h-popH)/2;if (leftPos < 0) {leftPos = 0;}	if (topPos < 0) {topPos = 20;}var parameters = 'menubar=no, scrollbars=yes, resizable=yes, directories=no, status=no, toolbar=no, width=' + popW + ', height=' + popH + ', top=' + topPos + ', left=' + leftPos;	var win = window.open(url, 'popupWindow', parameters);win.focus();}function openWindowPopup(url, width, height, windowname) {var w = 480, h = 340;if (document.body) {   w = document.body.clientWidth;   h = document.body.clientHeight;}// window width and heightvar popW = width, popH = height;var leftPos = (w-popW)/2;var topPos = (h-popH)/2;if (leftPos < 0) {leftPos = 0;}	if (topPos < 0) {topPos = 20;}if (!windowname) {windowname = 'popupWindow';}var parameters = 'menubar=no, resizable=no, directories=no, status=no, toolbar=no, width=' + popW + ', height=' + popH + ', top=' + topPos + ', left=' + leftPos;	var win = window.open(url, windowname, parameters);win.focus();}function openResizableWindowPopup(url, width, height) {var w = 480, h = 340;if (document.body) {   w = document.body.clientWidth;   h = document.body.clientHeight;}// window width and heightvar popW = width, popH = height;var leftPos = (w-popW)/2;var topPos = (h-popH)/2;if (leftPos < 0) {leftPos = 0;}	if (topPos < 0) {topPos = 20;}var parameters = 'menubar=no, resizable=yes, directories=no, status=no, toolbar=no, width=' + popW + ', height=' + popH + ', top=' + topPos + ', left=' + leftPos;	var win = window.open(url, 'resizablePopupWindow', parameters);win.focus();}function openNewResizableWindowPopup(url, width, height, winname) {var w = 480, h = 340;if (document.body) {   w = document.body.clientWidth;   h = document.body.clientHeight;}// window width and heightvar popW = width, popH = height;var leftPos = (w-popW)/2;var topPos = (h-popH)/2;if (leftPos < 0) {leftPos = 0;}	if (topPos < 0) {topPos = 20;}var parameters = 'menubar=no, resizable=yes, directories=no, status=no, toolbar=no, width=' + popW + ', height=' + popH + ', top=' + topPos + ', left=' + leftPos;	var win = window.open(url, winname, parameters);win.focus();}function setPopupTitle() {// set the popup title if a popupTitle Div existsif (document.getElementById('popupTitle')) {var title = document.getElementById('popupTitle').innerHTML;if (title.length > 75) {title = title.substring(0, 75) + '...';}document.getElementById('popupTitleContent').innerHTML = title;}}function redirectParentURL(url) {window.opener.top.location.href = url;window.top.close();}function linkOn(el) {el.style.color = '#003C79';}function linkOff(el) {el.style.color = '#a3b9cf';}function openLoginPage() {openScrollableWindowPopup(loginURL, 792, 555);}function openLogoutPage(loggedIntoAthens) {clearLoginCookies();if (loggedIntoAthens) { var ok = confirm('You are being logged out of Knovel.\n Click OK to log out of Athens or \nCancel to stay logged into Athens ');if (ok) {var siteurl = window.top.location.href;var endindex = siteurl.indexOf("/web");var domain = siteurl.substring(0, endindex);	var referer = domain + "/web/portal/main?_EXT_KNOVEL_TEMP_LOGIN_ATH_LOGOUT";		var fullLogoutURL = logoutURL + "?referer=" + referer;window.top.location.href = fullLogoutURL;		} else {var siteurl = window.top.location.href;var endindex = siteurl.indexOf("/web");var domain = siteurl.substring(0, endindex);	var referer = domain + "/web/portal/main?_EXT_KNOVEL_TEMP_LOGIN_LOGOUT";		var fullLogoutURL = logoutURL + "?referer=" + referer;window.top.location.href = fullLogoutURL;	}	} else {var siteurl = window.top.location.href;var endindex = siteurl.indexOf("/web");var domain = siteurl.substring(0, endindex);	var referer = domain + "/web/portal/main?_EXT_KNOVEL_TEMP_LOGIN_LOGOUT";		var fullLogoutURL = logoutURL + "?referer=" + referer;window.top.location.href = fullLogoutURL;		}	}function openOrderInfoPage() {openWindowPopup('/web/portal/ordering_info', 792, 365, 'ordering_info_popup');}function openFreeTitlesPopup() {  openScrollableWindowPopup('http://why.knovel.com/information/free-package.html', 1024, 768);}function openPeriodicTablePopup() {openResizableWindowPopup('/web/portal/periodic_table', 792, 662);}function openTutorialPopup() {openResizableWindowPopup('/html/flash/MyKnovelVideoPlayer.html', 950, 650);}function openSupportAccountServicesPage() {window.top.location.href = supportAccountServicesPage;}function loginRedirect() {window.opener.location.href = loginRedirectURL;}function openSubscribePage() {window.top.location.href = subscribePage;}function subscribeRedirect() {openWindowPopup(subscribePage, 792, 415);}function freeTrialPageRedirect() {window.top.location.href = subscribePage;}function redirectToPage(page) {window.top.location.href = page;}/* pagination highlight functions */function paginationBoxOn(el) {el.style.background = '#E0DCDC';}function paginationBoxOff(el) {el.style.background = 'white';}function findPos(obj) {var curleft = curtop = 0;if (obj.offsetParent) {do {curleft += obj.offsetLeft;curtop += obj.offsetTop;} while (obj = obj.offsetParent);}return [curleft,curtop];}function showVideo(videoId) {// only show the video oncevar videoSeen = getCookieValue("videoSeen");// if (videoSeen == null) {createCookie("videoSeen","true", cookiesExpireInSeconds);var url = '/web/portal/tutorial_videos?Video='+videoId;var width = 800;var height = 640;if(videoId == 4){width = 720;height = 580;}openResizableWindowPopup(url, width, height);// now, hide the button// document.getElementById('flash-button').style.display = 'none';// }	}function showMyKnovelVideo() {var url = '/web/portal/myknovel_video';var width = 855;var height = 680;openResizableWindowPopup(url, width, height);		}function openUnitConverterPopup() {openWindowPopup('/web/portal/knovel_tools?p_p_id=EXT_KNOVEL_TOOLS&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_EXT_KNOVEL_TOOLS_struts_action=/ext/knovel_tools/view&_EXT_KNOVEL_TOOLS_toolType=2', 750, 440, 'unitconverter');}	function getRadioValue(formID, controlName){var frm = document.getElementById(formID);	var el = frm[controlName];	for (var i=0; i < el.length; i++){if (el[i].checked)    	{    	return el[i].value;    }}	}	function stripCellHTML(oldString){var test1 = new RegExp("<b>|<font>|<i>|<em>|<big>|<strong>|<small>|<sup>|<sub>|<bdo>|<u>","gi");var whereTag, startIndex = 0, endIndex = 0, tags = " ";if(test1.test(oldString)){test1 = new RegExp("b|/b|font|/font|i|/i|em|/em|big|/big|strong|/strong|small|/small|sup|/sup|sub|/sub|bdo|/bdo|u|/u","i");while ((whereTag = oldString.indexOf("<", startIndex)) != -1) {endIndex = oldString.indexOf(">", whereTag) + 1;var sub = oldString.substring(whereTag + 1, endIndex - 1);if (sub.indexOf(" ") != -1) {sub = sub.substring(0, sub.indexOf(" "));}if (test1.test(sub)) {startIndex = endIndex;continue;}else{tags += oldString.substring(whereTag, endIndex) + " ";startIndex = endIndex;}}var html = tags.trim().split(" ");for(var i = 0; i < html.length; i++){oldString = oldString.replace(html[i],"");}return oldString;}else{var reTag = /<(?:.|\s)*?>/g;		return oldString.replace(reTag, "");  }}function stripHTML(oldString) {    var reTag = /<(?:.|\s)*?>/g;    return oldString.replace(reTag, ""); }function showHelpAndClose() {openFullPopup('/html/themes/knovel_mktg/pdf/Knovel_Help%20Guide.pdf');window.top.close();}function showDownloadTitles() {openWindowPopup('/web/portal/knovel_tools?p_p_id=EXT_KNOVEL_TOOLS&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_EXT_KNOVEL_TOOLS_struts_action=/ext/knovel_tools/view&_EXT_KNOVEL_TOOLS_toolType=3', 750, 330);}function setLoginCookie(cookieValue) {createCookie("Username", cookieValue);	}function setIURLoginCookie(cookieValue) {createCookie("KnovelProfile", cookieValue);}function setParamLoginCookie(cookieValue) {createCookie("KnovelParam", cookieValue);}function setDownloadCookie(cookieValue) {createCookie("KnovelDownload", cookieValue);}function clearLoginCookies() {eraseCookie("Username");eraseCookie("KnovelProfile");eraseCookie("KnovelParam");eraseCookie("keepMeSignedIn");}	function createCookie(name,value,seconds,escaped) {    if (seconds) {        var date = new Date();        date.setTime(date.getTime()+(seconds*1000));        var expires = "; expires="+date.toGMTString();    } else {var expires = "";}if (escaped) {    document.cookie = name+"="+escape(value)+expires+"; path=/";	} else {	    document.cookie = name+"="+value+expires+"; path=/";}	}	function getCookieValue(check_name) {// first we'll split this cookie up into name/value pairs// note: document.cookie only returns name=value, not the other componentsvar a_all_cookies = document.cookie.split( ';' );var a_temp_cookie = '';var cookie_name = '';var cookie_value = '';var b_cookie_found = false; // set boolean t/f default ffor ( i = 0; i < a_all_cookies.length; i++ ){// now we'll split apart each name=value paira_temp_cookie = a_all_cookies[i].split( '=' );// and trim left/right whitespace while we're at itcookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');// if the extracted name matches passed check_nameif ( cookie_name == check_name ){b_cookie_found = true;// we need to handle case where cookie has no value but exists (no = sign, that is):if ( a_temp_cookie.length > 1 ){cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );}// note that in cases where cookie is initialized but no value, null is returnedreturn cookie_value;break;}a_temp_cookie = null;cookie_name = '';}if ( !b_cookie_found ){return null;}}function eraseCookie(name) {    createCookie(name,"",-1);}function doNothing() {}function closeLoginPopup() {if (window.popupWindow != null) {window.popupWindow.close();}	}function swapImage(el, newSrc) {el.src = newSrc;}/* new functions for search result pages */ function findPosX(obj) {   var curleft = 0;   if(obj.offsetParent)       while(1)        {         curleft += obj.offsetLeft;         if(!obj.offsetParent)           break;         obj = obj.offsetParent;       }   else if(obj.x)       curleft += obj.x;   return curleft; } function findPosY(obj) {   var curtop = 0;   if(obj.offsetParent)       while(1)       {         curtop += obj.offsetTop;         if(!obj.offsetParent)           break;         obj = obj.offsetParent;       }   else if(obj.y)       curtop += obj.y;   return curtop; }	  function toggleSubjectTopicContainer(subjectAreaID, clearSecondary) {var imageId = 'subjectTopicImage_' + subjectAreaID;var containerId = 'subjectTopicContainer_' + subjectAreaID;var imageEl = document.getElementById(imageId);var containerEl = document.getElementById(containerId);var imageEndIndex = imageEl.src.lastIndexOf('/') + 1;var newSrc = imageEl.src.substring(0, imageEndIndex);// if the block is already on, turn it offif (containerEl.style.display == 'block') {containerEl.style.display = 'none'newSrc += 'plus_sign.gif';imageEl.src = newSrc;} else {containerEl.style.display = 'block'			newSrc += 'minus_sign.gif';imageEl.src = newSrc;		}	}function addKnovelToSearchBar() {var domain = location.hostname.split('.').shift();var engineUrl = 'http://' + domain + '.knovel.com/opensearch.xml';if (window.external && ("AddSearchProvider" in window.external)) { // Firefox 2 and IE 7, OpenSearch window.external.AddSearchProvider(engineUrl);} else { // No search engine support (IE 6, Opera, etc). var message = "Open Search is not currently supported by your browser."; alert(message);}}function checkVideoButton() {var videoSeen = getCookieValue("videoSeen");if (videoSeen == null) {document.getElementById('flash-button').style.display = 'block';	}	}function checkAddKnovelLink() {var knovelAddedToSearchBar = getCookieValue("knovelAddedToSearchBar");if (knovelAddedToSearchBar == null) {document.getElementById('addKnovelToSearchBarLink').style.display = 'block';	}	}function openAthensPopup() {var athensURL = 'https://auth.athensams.net/?ath_dspid=KNOVEL&ath_returl=%22http://proto.knovel.com/%22';openScrollableWindowPopup(athensURL, 792, 555);}function toggleMySubFilter(state) {var mySubFilterEl = document.getElementById('mySubSearchFilter');if (mySubFilterEl) {			if (state == 'on') {mySubFilterEl.style.display = 'block';} else {mySubFilterEl.style.display = 'none';			}}	}function setMySubSearchFilter(option) {    var inurl = window.top.location.href;// turn the filter onif (option == 'on') {document.getElementById('mySubFilterOn').className = "filterActive";document.getElementById('mySubFilterOff').className = "";		var url = '/html/includes/mySubFilter.jsp?filterOption=on';// turn the filter onvar subscriptionAjax = new slimAjax(function () {});   subscriptionAjax.post(url, '');// else, turn it off	} else {document.getElementById('mySubFilterOn').className = "";document.getElementById('mySubFilterOff').className = "filterActive";	var url = '/html/includes/mySubFilter.jsp?filterOption=off';// turn the filter offvar subscriptionAjax = new slimAjax(function () {});   subscriptionAjax.post(url, '');			}	        if ((inurl.indexOf('/browse') > 0 && inurl.indexOf('/display?') == -1) || inurl.indexOf('main') > 0) { // if on browse or home page: redraw    	if (option == 'on') {    		browseMySubscription(inurl);    	} else {    		browseAllContent(inurl);    	}    }}	function browseMySubscription(url) {var newurl = (url.indexOf('/web/portal/main') >= 0) ? url : '/web/portal/browse/subject/-6/mysub/1';window.top.location.href = newurl;}function browseAllContent(url) {var newurl = (url.indexOf('/web/portal/main') >= 0) ? url : '/web/portal/browse';window.top.location.href = newurl;}/* perform a basic search */function submitBasicSearchForm() {var inputtedValue = document.getElementById('topTextInput').value;			document.getElementById('errorMsg1').innerHTML = '';// validate the inputvar passed = validate(document.getElementById('topTextInput'));if (!passed) {return false;} else if (inputtedValue.toLowerCase() == 'search knovel...') {if (isWithin == 1) isWithin = 0;else document.getElementById('errorMsg1').innerHTML = 'Please enter a valid search term.';document.getElementById('subTabSearchHelpText').style.display = 'none';document.getElementById('searchOptionsContainer').style.display = 'none';		document.getElementById('errorMsg1').style.display = 'block';						return false;	} else {var secondSelectEl = document.getElementById('SecondSelect1Ref');if (secondSelectEl) {// get the search filter (All / Title / Author)var searchByFilterID = getRadioValue('searchForm', 'searchOptionSecondSelect1');		secondSelectEl.value = searchByFilterID; }	// submit the formvar topFormEl = document.getElementById('searchForm');		topFormEl.submit();return false;						}	}function switchClass(el, className) {el.className = className;}// jump to a pagefunction jumpToBookPage(page) {// get the first part of the url (before Page)var currentURL = window.document.location.href;var startIndex = currentURL.indexOf('_Page=') + 6;var urlStart = currentURL.substring(0, startIndex);// get the last part of the url (after Page)var endPart = currentURL.substring(startIndex, currentURL.length);var endIndex = endPart.indexOf('&');var urlEND = endPart.substring(endIndex, currentURL.length);// build up the new url with the pagevar newURL = urlStart + page + urlEND;// go to that urlwindow.top.location.href = newURL;}function showSearchWithin(el, divid) {el.style.display = 'none';document.getElementById(divid).style.display = 'block';}var isWithin = 0;function performSearchWithinBook(bookId, controlId, sistring, ststring) {if (document.getElementById('errorMsg1')) {document.getElementById('errorMsg1').innerHTML = '';		document.getElementById('errorMsg1').style.display = 'none';				}	var controlEl = document.getElementById(controlId);if (controlEl) {isWithin = 1;var searchTerm = controlEl.value;var displayPortletId = 'EXT_KNOVEL_DISPLAY';var displayPortletNamespace = '_EXT_KNOVEL_DISPLAY_';  if (searchTerm != '') {	searchTerm = searchTerm.replace("%", "!!PERCENT!!");var searchUrl = '/web/portal/basic_search/display?p_p_id=' + displayPortletId + '&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&' + displayPortletNamespace + 'struts_action=%2Fext%2Fknovel_display%2Fview';searchUrl += '&' + displayPortletNamespace + 'bookid=' + bookId;searchUrl += '&' + displayPortletNamespace + 'Page=1';searchUrl += '&' + displayPortletNamespace + 'SearchTermA1=' + searchTerm;searchUrl += '&' + displayPortletNamespace + 'searchWithinBook=true';searchUrl += '&' + displayPortletNamespace + 'searchType=basic';	searchUrl += '&' + displayPortletNamespace + 'sistring='+sistring;	searchUrl += '&' + displayPortletNamespace + 'ststring='+ststring;window.top.location.href = searchUrl;} }} function setBookFilterType(type, bookId) {	var displayPortletId = 'EXT_KNOVEL_DISPLAY';var displayPortletNamespace = '_EXT_KNOVEL_DISPLAY_';var newUrl = '/web/portal/basic_search/display?p_p_id=' + displayPortletId + '&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&' + displayPortletNamespace + 'struts_action=%2Fext%2Fknovel_display%2Fview';newUrl += '&' + displayPortletNamespace + 'bookid=' + bookId;newUrl += '&' + displayPortletNamespace + 'Page=1';newUrl += '&' + displayPortletNamespace + 'type=' + type;window.top.location.href = newUrl;}/* browse page functions */function toggleChildNodes(nodeId) {var imgEl = document.getElementById('img_' + nodeId);var childNodeContainerEl = document.getElementById('children_' + nodeId);// if the node is not expandedif (imgEl.src.indexOf('plus_sign') > 0) {// if it's already been loaded, just show itif (childNodeContainerEl.innerHTML != '') {imgEl.src = '/html/themes/knovel_mktg/images/custom/minus_sign.gif';childNodeContainerEl.style.display = 'block';// else, load the child nodes} else {  imgEl.src = '/html/themes/knovel_mktg/images/custom/minus_sign.gif';// do some crazy ajax stuffloadChildNode(nodeId, 15);					}// it's expanded, so close it	} else {imgEl.src = '/html/themes/knovel_mktg/images/custom/plus_sign.gif';childNodeContainerEl.style.display = 'none';}}function loadChildNode(nodeID) {var hasBookmarks = false;var useLargeSize = false;var browser = false;var fromSearch = false;var bookID = document.getElementById('bookid').value;var url = "/web/portal/browse/display?p_p_id=EXT_KNOVEL_DISPLAY&p_p_action=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_EXT_KNOVEL_DISPLAY_struts_action=%2Fext%2Fknovel_display%2Fload_nodes"		+ "&BookID=" + bookID + "&NodeID=" + nodeID + "&VerticalID=0"; 	// load the child nodevar childNodeAjax = new slimAjax(function () {var divID = 'children_' + nodeID;document.getElementById(divID).innerHTML = childNodeAjax.responseText;	});   childNodeAjax.post(url, '');									}function OpenContent(page, sistring, ststring, windowName, scroll, windowType) {/* call expiringMessage.js to first check for account expiration before opening content */if(typeof OpenPortalContent === 'function') { 	OpenPortalContent(page, sistring, ststring, windowName || 'small_structureWindow', scroll || 'yes', windowType || 'Small_Structure');} else {NewWindow(page, windowName, true, windowType); }} /* to disable content */function OpenContentLab(page, sistring, ststring) {OpenContent(mypage, sistring, ststring, 'small_structureWindow', 'yes', 'Small_Structure');}  function OpenContentLab(mypage, sistring, ststring, myname, scroll, windowType) {var protoMessage = "Knovel Lab is an experimental area where users can try out new features and " +    "functionality before they go live. Reference content is not accessible within Knovel Lab.<br/><br/>" +    "If you wish to access your subscribed content, please <a href='http://www.knovel.com/web/portal/browse'><font style='font-size: 9pt'>return to Knovel.</font></a>"; protoMessage += "<br/><br/><center><button style='width:60px' onclick='slimPopup.hide()'>OK</button></center>";   showStandardModalMessage(protoMessage, 260);				   }function showStandardPublisherDisclaimer() {var messageEl = document.getElementById('disclaimerContent');if (messageEl) {var message = messageEl.innerHTML;showStandardMessage(message, 510, true);				}	}	function showTitleDetails() {var messageEl = document.getElementById('titleDetailsContent');if (messageEl) {var message = messageEl.innerHTML;showStandardMessage(message, 510, true);		}	}	function showCitation() {var messageEl = document.getElementById('citationContent');if (messageEl) {document.getElementById('citationExportOptions').style.display = 'none';document.getElementById('citationExportOptions2').style.display = 'none';		var message = messageEl.innerHTML;showStandardMessage(message, 678, true);		}	}	function isNotebookItemChecked() { var els = getElementsByClassName('notebook-item', null, null);if (els && els.length > 0) {for (var i=0; i<els.length; i++) {if (els[i].checked) {return true;}}}return false;	}function notebookToggleCheckAll(el) {var els = getElementsByClassName('notebook-item', null, null);if (els && els.length > 0) {for (var i=0; i<els.length; i++) {els[i].checked = el.checked;}}}function notebookAddFolder() {slimPopup.show({popupId: 'addFolderPopup', popupWidth: 300, stayOpen: true});	}function showNotebookError() {var msg = "<div style='padding: 10px'><center>Please select an item";msg += "<br/><br/><button style='width:60px' onclick='slimPopup.hide()'>OK</button></center></div>";showStandardMessage(msg, 200, true);}function notebookSendEmail() {if (!isNotebookItemChecked()) {showNotebookError();} else {	slimPopup.show({popupId: 'emailPopup', popupWidth: 310, stayOpen: true});	}	}function notebookDeleteAction() {if (!isNotebookItemChecked()) {showNotebookError();} else {	slimPopup.show({popupId: 'deleteAction', popupWidth: 340, stayOpen: true});	}	}function notebookDeleteAllAction() {if (!isNotebookItemChecked()) {showNotebookError();} else {	slimPopup.show({popupId: 'deleteAllAction', popupWidth: 340, stayOpen: true});}	}function notebookDeleteThisAction() {slimPopup.show({popupId: 'deleteThisAction', popupWidth: 340, stayOpen: true});}function notebookCopyToFolderAction() {if (!isNotebookItemChecked()) {showNotebookError();} else {	slimPopup.show({popupId: 'copyToFolder', popupWidth: 360, stayOpen: true});}	}function notebookMoveToFolderAction() {if (!isNotebookItemChecked()) {showNotebookError();} else {	slimPopup.show({popupId: 'moveToFolder', popupWidth: 360, stayOpen: true});}	}function showSearchOptions() {if (document.getElementById('searchOptionsContainer').style.display == '' ||document.getElementById('searchOptionsContainer').style.display == 'none') {document.getElementById('errorMsg1').innerHTML = '';document.getElementById('errorMsg1').style.display = 'none';document.getElementById('subTabSearchHelpText').style.display = 'none';document.getElementById('searchOptionsContainer').style.display = 'block';	} else {document.getElementById('searchOptionsContainer').style.display = 'none';	document.getElementById('errorMsg1').innerHTML = '';document.getElementById('errorMsg1').style.display = 'block';document.getElementById('subTabSearchHelpText').style.display = 'block';}	}function toggleFullArticle(m) {var summaryName = 'articlesummary_' + m;var fullName = 'articlefull_' + m;var summaryEl = document.getElementById(summaryName);var fullEl = document.getElementById(fullName);	if (summaryEl.style.display == 'block') {summaryEl.style.display = 'none';fullEl.style.display = 'block';} else {fullEl.style.display = 'none';summaryEl.style.display = 'block';		}		}function returnToKnovel() {var msg = "<div style='padding:15px; border: 1px solid #C1C6C8'>";msg +=  "<center>";msg += "Would you like to participate in a brief survey?<br/>" +   	"Any feedback you provide will be greatly appreciated."; msg += "<br/><br/>";msg += "<button style='width:40px' onclick='takeKnovelSurvey()'>Yes</button>";msg += "&nbsp;&nbsp;";msg += "<button style='width:40px' onclick='returnToKnovelSite()'>No</button>";msg += "</center></div>";   showStandardModalMessage(msg, 340);				   }function takeKnovelSurvey() {slimPopup.hide();window.top.location.href = 'http://prototype3survey.questionpro.com/';}function returnToKnovelSite() {slimPopup.hide();window.top.location.href = 'http://www.knovel.com/web/portal/browse';	}function getCalendarDate(){   var months = new Array(13);   months[0]  = "January";   months[1]  = "February";   months[2]  = "March";   months[3]  = "April";   months[4]  = "May";   months[5]  = "June";   months[6]  = "July";   months[7]  = "August";   months[8]  = "September";   months[9]  = "October";   months[10] = "November";   months[11] = "December";   var now         = new Date();   var monthnumber = now.getMonth();   var monthname   = months[monthnumber];   var monthday    = now.getDate();   var year        = now.getYear();   if(year < 2000) { year = year + 1900; }   var dateString = monthname +                    ' ' +                    monthday +                    ' ' +                    year;   return dateString;}// dynamically resize the content container (and pdf_viewer if it exists)function setPopupContainerHeight() {var popupContainerEl = document.getElementById('popupContentContainer');var iframeContainerEl = document.getElementById('pdf_viewer');  	if (popupContainerEl) {			  	 	popupContainerEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous		  		// need to add to height to be sure it will all show		    		var h = alertSize();  		var new_h = (h-96);		// account for top header height  // account for firefox url barif (!document.all) {h = h - 10;}  		popupContainerEl.style.height = new_h + "px";if (iframeContainerEl) {  		iframeContainerEl.style.height = new_h + "px";				}// alert('new_h: ' + new_h);  	}	}function alertSize() {		  var myHeight = 0;		  if (typeof( window.innerWidth ) == 'number' ) {    // Non-IE		    myHeight = window.innerHeight;		  } else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )) {		    // IE 6+ in 'standards compliant mode'    myHeight = document.documentElement.clientHeight;		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight )) {		    // IE 4 compatible		    myHeight = document.body.clientHeight;  	}		  return myHeight;		}function addBookToNotebook(bookId, el, notebookName) {// add the book to the Notebookvar url = '/html/notebook/addBookToNotebook.jsp?bookId=' + bookId;var myKnovelAjax = new slimAjax(function () {showAddToNotebookMessage(notebookName);});   myKnovelAjax.post(url, '');			if (el && el.style) {el.style.display = 'none';} else {document.getElementById('addBookToNotebook').style.display = 'none';		}	}function addSearchToNotebook(searchTitle, searchURL, controlId, notebookName) {// add the book to the Notebookvar url = '/html/notebook/addSearchToNotebook.jsp?title=' + searchTitle + '&url=' + searchURL;var myKnovelAjax = new slimAjax(function () {showAddToNotebookMessage(notebookName);});   myKnovelAjax.post(url, '');	document.getElementById(controlId).style.display = 'none';		}function addContentToNotebook() {var title = 'Knovel Content';var titleEl = document.getElementById('popupTitle');if (titleEl && titleEl.innerHTML != '') {title = titleEl.innerHTML;title = escape(title);} var currentURL = window.top.location.href;var contentURL = escape(currentURL);// get the bookIdvar startIndex = currentURL.indexOf('BookID=') + 7;var parsedUrl = currentURL.substring(startIndex, currentURL.length);var endIndex = parsedUrl.indexOf('&');	var bookId = parsedUrl.substring(0, endIndex);// add the content to the Notebookvar url = '/html/notebook/addContentToNotebook.jsp?title=' + title + '&url=' + contentURL + '&bookId=' + bookId;var notebookName = document.getElementById('knovelNotebookName').innerHTML;if (notebookName.charAt(0) == '\n') notebookName = notebookName.substring(1);var myKnovelAjax = new slimAjax(function () {showAddToNotebookMessageAlert(notebookName);});   myKnovelAjax.post(url, '');		document.getElementById('addContentButton').style.display = 'none';		}function addEngCaseToNotebook(bookId, notebookName) {  var title = 'Knovel Content';var titleEl = document.getElementById('bookTitle');if (titleEl && titleEl.innerHTML != '') {title = titleEl.innerHTML;title = escape(title);} // add the content to the Notebookvar contentURL = "/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=" + bookId;var url = '/html/notebook/addContentToNotebook.jsp?title=' + title + '&url=' + contentURL + '&bookId=' + bookId;var myKnovelAjax = new slimAjax(function () {showAddToNotebookMessage(notebookName);});   myKnovelAjax.post(url, '');		document.getElementById('addBookToNotebook').style.display = 'none';	}function notebookShow(itemName) {var mybookshelfContainerEl = document.getElementById('mybookshelf_container');var myrecentsearchesContainerEl = document.getElementById('myrecentsearches_container');var mysavedsearchesContainerEl = document.getElementById('mysavedsearches_container');		var mybookshelfImageEl = document.getElementById('mybookshelf_image');var myrecentsearchesImageEl = document.getElementById('myrecentsearches_image');var mysavedsearchesImageEl = document.getElementById('mysavedsearches_image');		if (itemName == 'mybookshelf') {myrecentsearchesContainerEl.style.display = 'none';mysavedsearchesContainerEl.style.display = 'none';		mybookshelfContainerEl.style.display = 'block';		myrecentsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_myrecentsearches_off.gif';mysavedsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mysavedsearches_off.gif';mybookshelfImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mybookshelf_on.gif';} else if (itemName == 'myrecentsearches') {mybookshelfContainerEl.style.display = 'none';				mysavedsearchesContainerEl.style.display = 'none';myrecentsearchesContainerEl.style.display = 'block';	mysavedsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mysavedsearches_off.gif';mybookshelfImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mybookshelf_off.gif';			myrecentsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_myrecentsearches_on.gif';} else if (itemName == 'mysavedsearches') {myrecentsearchesContainerEl.style.display = 'none';		mybookshelfContainerEl.style.display = 'none';				mysavedsearchesContainerEl.style.display = 'block';		mybookshelfImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mybookshelf_off.gif';			myrecentsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_myrecentsearches_off.gif';							mysavedsearchesImageEl.src = '/html/themes/knovel_mktg/images/kenny/btn_mysavedsearches_on.gif';}}function turnNotebookTabOn(el) {if (el.src.indexOf('_on.gif') > -1) {return;}var currentSrc = el.src;endIndex = currentSrc.indexOf('_off.gif');var newSrc = currentSrc.substring(0, endIndex);newSrc += '_on.gif';el.src = newSrc;}function turnNotebookTabOff(el) {var thisId = el.id;var endIndex = thisId.indexOf("_");var mainId = thisId.substring(0, endIndex) + "_container";var containerEl = document.getElementById(mainId);if (containerEl.style.display == 'block') {return;}var currentSrc = el.src;endIndex = currentSrc.indexOf('_on.gif');var newSrc = currentSrc.substring(0, endIndex);newSrc += '_off.gif';el.src = newSrc;		}	function showAddToNotebookMessage(notebookName) {    var message = '<center>Added to ' + notebookName + '</center>';showStandardMessage(message, 120);setTimeout('slimPopup.hide()', 2000);	}function showAddToNotebookMessageAlert(notebookName) {var message = "Added to " + notebookName + ""; alert(message);	}// shows the popup in modal modefunction showStandardModalMessage(message, width) {slim.get('#standardMessage').innerHTML = message;slim.get('#standardMessage').style.width = width + 'px';slimPopup.show({popupId: 'standardMessage', popupWidth: width, stayOpen: true, modal: true});	}// if keepOpen is true, the window does not close with any screen clickfunction showStandardMessage(message, width, keepOpen) {slim.get('#standardMessage').innerHTML = message;slim.get('#standardMessage').style.width = width + 'px';slimPopup.show({popupId: 'standardMessage', popupWidth: width, stayOpen: keepOpen});	}// if keepOpen is true, the window does not close with any screen clickfunction showStandardMessageAndFade(message, width) {slim.get('#standardMessage').innerHTML = message;slim.get('#standardMessage').style.width = width + 'px';slimPopup.show({popupId: 'standardMessage', popupWidth: width});setTimeout('slimPopup.hide()', 2000);	}function showExtMessage(message) {// if EXT library is loadedif (Ext) {Ext.MessageBox.show({		msg: message,buttons: Ext.MessageBox.OK});	} else {showStandardMessage(message, 300);		}	}function openLiveChat() {window.open('http://server.iad.liveperson.net/hc/7013782/?cmd=file&file=visitorWantsToChat&site=7013782&byhref=1&imageUrl=http://images.liveperson.com/lp/7013782', 'chat7013782', 'width=475,height=400,resizable=yes');}function openContextualHelp(articleName) {var articleURL = '/web/portal/help/article/' + articleName;openResizableWindowPopup(articleURL, 792, 662, 'contextual_help_window');}function checkContextualHelp() {// nothing to do yet  }/*function changeopacity( imageobject, opacity ) {    var object = imageobject.style;    object.opacity = ( opacity / 100 );    object.MozOpacity = ( opacity / 100 );    object.KhtmlOpacity = ( opacity / 100 );    object.filter = alpha(opacity= + opacity + );}*///-->	 // action: print title details	function printTitleDetails() {   	var disp_setting="location=no,directories=yes,"; disp_setting+="scrollbars=yes,width=550, height=400, left=100, top=25"; var content_value = document.getElementById("titleDetailsInnerContainer").innerHTML;var docprint=window.open("","",disp_setting); docprint.document.open(); docprint.document.write('<html><head><title>Title Details</title>'); docprint.document.write('</head><body onLoad="self.print()">');          docprint.document.write(content_value);          docprint.document.write('</body></html>'); docprint.document.close(); docprint.focus();  }    function saveTitleDetails() {var bookID = document.getElementById('currentBookID').value;window.top.location.href='/servlets/BookDetails?BookID=' + bookID;}function citationContinue() {document.getElementById('citationExportOptions').style.display = 'none';document.getElementById('citationExportOptions2').style.display = 'none';			var el = document.getElementById('citationPages');if (el) {if (el.value == '') {alert('Please enter a page or pages');} else {    		var pages = document.getElementById('citationPages').value;    		var desc = document.getElementById('citationTextBefore').value;    		var existingText = document.getElementById('results');    		var temp = new Array();    		var newText = null;   		     		temp = desc.split("..");    		newText = temp[0] + ". (pp: " + pages + "). " + temp[1];     		    		if (existingText != null){    			existingText.value = newText;    		}document.getElementById('citationStart').style.display = 'none';document.getElementById('citationEnd').style.display = 'block';document.getElementById('citationToolbarStart').style.display = 'none';document.getElementById('citationToolbarEnd').style.display = 'block';			document.getElementById('citationTextBefore').disabled = false;document.getElementById('citationTextBefore').value =  newText;}}}function saveCitation() {var bookID = document.getElementById('bookID').value;var text = document.getElementById('citationTextBefore').value;var pages = document.getElementById('citationPages').value;window.top.location.href='/servlets/CitationExport?BookID=' + bookID + '&citation='+ text +'&pages=' + pages +'';}function printCitation() {   	var disp_setting="location=no,directories=yes,"; disp_setting+="scrollbars=yes,width=450, height=400, left=100, top=25"; var content_value = document.getElementById("citationTextBefore").value;var docprint=window.open("","",disp_setting); docprint.document.open(); docprint.document.write('<html><head><title>Citation</title>'); docprint.document.write('</head><body onLoad="self.print()">');          docprint.document.write(content_value);          docprint.document.write('</body></html>'); docprint.document.close(); docprint.focus();  }function showDisclaimerEmbed() {showStandardPublisherDisclaimer();}function showDisclaimerFromResults(id) {showStandardPublisherDisclaimer();}function showDynamicMessage(url, width) {// get the HTMLvar htmlAjax = new slimAjax(function () {var html = htmlAjax.responseText;	html += "<br/><br/><center><button style='width:120px' onclick='slimPopup.hide()'>Try It Now</button></center>";showStandardMessage(html, width);});   htmlAjax.post(url, '');		}function toggleCitationExportOptions() {var el;	if (document.getElementById('citationToolbarStart').style.display == 'none') {el = document.getElementById('citationExportOptions2');} else {el = document.getElementById('citationExportOptions');}if (el.style.display == 'block') {el.style.display = 'none';removeEvent(document.body, 'click', toggleCitationExportOptions);} else {el.style.display = 'block';addEvent(document.body, 'click', toggleCitationExportOptions);}	}function citationExportToRIS(bookID) {var citationExportURL = '/servlets/DirectExport?bookID=' + bookID;// see if page number were enteredvar pagesEl = document.getElementById('citationPages');if (pagesEl) {if (pagesEl.value != '') {citationExportURL += '&pages=' + pagesEl.value;}}	document.getElementById('citationExportOptions').style.display = 'none';window.top.location.href=citationExportURL;	}function citationExportToRefWorks() {var pages = document.getElementById('citationPages'),importData = document.getElementById('refworks_data'),backup = importData.value;if(pages && pages.value != ''){var s = importData.value;var pbNewLine = s.indexOf('\n', s.indexOf('\nPB  -') + 1);importData.value = s.substring(0, pbNewLine) + '\nSP  - ' + pages.value + s.substring(pbNewLine);}document.getElementById('citationExportOptions').style.display = 'none';var frm = document.getElementById('refworksExport');frm.submit();importData.value = backup;}// This is a legacy function with multiple copy/paste versions throughout the// codebase. It can generally be replaced with a simple call to window.open// wherever you'd normally use it.// @deprecatedfunction NewWindow(mypage, myname, scroll, windowType) {var winl, wint, w, h;if (screen.width == 640){w = 600;h = 346;winl = (screen.width - w) / 2;wint = 1;}else if (screen.width == 800){if (windowType == 'Text'){w = 725;h = 460;winl = 20;wint = 2;}else if(windowType == 'Export'){  w = 750;h = 460;winl = 20;wint = 2;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 600;h = 400;winl = 170;wint = 60;}else if ((windowType == 'Small_Structure')){w = 500;h = 400;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 720;h = 460;winl = (screen.width - w) / 2;wint = 2;}else if (windowType == 'Applets'){w = 750;h = 550;winl = (screen.width - w) / 2;wint = 2;}else{w = 700;h = 442;winl = 55;wint = 24;}}else if (screen.width == 1024){if(windowType == 'Text'){w = 860;h = 630;winl = (screen.width - w) / 2;wint = 2;}else if(windowType == 'Export'){  w = 1000;h = 630;winl = (screen.width - w) / 2;wint = 2;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 696;h = 480;winl = 206;wint = 63;}else if ((windowType == 'Small_Structure')){w = 500;h = 425;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 980;h = 630;winl = (screen.width - w) / 2;wint = 2;}else if (windowType == 'Help'){w = 809;h = 580;winl = 71;wint = 31;}else if (windowType == 'Applets'){w = 1000;h = 700;winl = (screen.width - w) / 2;wint = 2;}else{w = 819;h = 580;winl = 51;wint = 31;}}else if (screen.width == 1152){if(windowType == 'Text'){w = 720;h = 728;winl = (screen.width - w) / 2;wint = 2;}if(windowType == 'Export'){w = 1100;h = 728;winl = (screen.width - w) / 2;wint = 2;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 783;h = 540;winl = 228;wint = 67;}else if ((windowType == 'Small_Structure')){w = 500;h = 425;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 985;h = 728;winl = (screen.width - w) / 2;wint = 2;}else if (windowType == 'Applets'){w = 1000;h = 700;winl = (screen.width - w) / 2;wint = 2;}else{w = 922;h = 690;winl = 58;wint = 27;}}else if (screen.width == 1280){if(windowType == 'Text' || windowType == 'Export'){w = 860;h = 800;winl = ((screen.width - w) / 2) - 10;wint = 2;}if(windowType == 'Text' || windowType == 'Export'){w = 1200;h = 800;winl = ((screen.width - w) / 2) - 10;wint = 2;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 888;h = 820;winl = 210;wint = 73;}else if ((windowType == 'Small_Structure')){w = 500;h = 425;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 985;h = 885;winl = (screen.width - w) / 2;wint = 2;}else if (windowType == 'Applets'){w = 1050;h = 775;winl = (screen.width - w) / 2;wint = 2;}else{w = 1024;h = 845;winl = 32;wint = 33;}}else if (screen.width == 1400 && screen.height == 1050) //Special case for some laptops{if(windowType == 'Text'){w = 860;h = 500;winl = ((screen.width - w) / 2) - 10;wint = 2;}if(windowType == 'Export'){w = 1250;h = 500;winl = ((screen.width - w) / 2) - 10;wint = 2;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 888;h = 700;winl = 210;wint = 73;}else if ((windowType == 'Small_Structure')){w = 500;h = 425;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 985;h = 700;winl = (screen.width - w) / 2;wint = 2;}else if (windowType == 'Applets'){w = 1050;h = 700;winl = (screen.width - w) / 2;wint = 2;}else{w = 1024;h = 700;winl = 32;wint = 33;}}else{  // greater than 1280x1024 resolutionif(windowType == 'Text'){w = 1200;h = 1020;winl = (screen.width - w) / 2 - 30;wint = 10;}if(windowType == 'Export'){w = 1280;h = 1020;winl = (screen.width - w) / 2 - 30;wint = 10;}else if ((windowType == 'Row') || (windowType == 'Row_Number')){w = 1020;h = 900;winl = 310;wint = 80;}else if ((windowType == 'Small_Structure')){w = 500;h = 425;winl = 170;wint = 60;}else if ((windowType == 'Small_html')){w = 700;h = 400;winl = 170;wint = 60;}else if (windowType == 'Text_Bookmarks'){w = 1200;h = 1000;winl = (screen.width - w) / 2;wint = 30;}else if (windowType == 'Applets'){w = 1050;h = 775;winl = (screen.width - w) / 2;wint = 2;}else{w = 1150;h = 1000;winl = 80;wint = 33;}}winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,toolbar=no,location=no,menubar=no,status=no';win = window.open(mypage, myname, winprops);if (parseInt(navigator.appVersion) >= 4) win.window.focus();}function keepSessionAlive() {$.ajax({type: 'GET',url: '/web/portal/main',cache: false});}function societySessionKeepAlive() {setInterval(keepSessionAlive, 60000);}
