function issueOnChange(url, link) { var mainLink = document.getElementById('mainLink'); mainLink.innerText = link.innerText; mainLink.selectedURL = url; if(url.indexOf('&IsAllIssue=True') == -1) window.open(url, 'issue'); return false; } function newsletter_Search(resultURL, searchURL) { var txtKeyword = document.getElementById('txtKeyword'); var mainLink = document.getElementById('mainLink'); if(typeof(mainLink.selectedURL) == 'undefined' || mainLink.selectedURL == null) mainLink.selectedURL = mainLink.getAttribute('selectedURL'); if(txtKeyword.value == '') alert('Please specify keyword to search'); else window.open(searchURL + '?k=' + txtKeyword.value + '&UrlPrefix=' + mainLink.selectedURL + '&resulturl=' + resultURL); return false; } function getElements(parent, tagName) { var childNodes = new Array(); for(var i=0;i 0) initializeUL(uls[0]); } } function manageMenu(li, show, onInitialization) { var uls = getElements(li, 'UL'); if(uls.length > 0) { if(onInitialization && document.compatMode != 'CSS1Compat' && window.navigator.userAgent.indexOf('MSIE') != -1) uls[0].style.margin = '0px'; try { if(show) { var viewPortHeight = document.documentElement.clientHeight; if(document.body.clientHeight > 0 && (viewPortHeight == 0 || viewPortHeight > document.body.clientHeight)) viewPortHeight = document.body.clientHeight; var forMainNav = (uls[0].parentNode.parentNode.id == 'nav'), diffBottom = viewPortHeight - (li.getBoundingClientRect().top + uls[0].clientHeight), diffTop = li.getBoundingClientRect().top - uls[0].clientHeight - (forMainNav ? 0 : 24); //if(!forMainNav) document.getElementById('test').innerHTML = 'viewPortHeight: ' + viewPortHeight + ', diffBottom: ' + diffBottom + ', diffTop: ' + diffTop; if(diffBottom < 0 && diffBottom < diffTop) uls[0].style.top = '-' + (uls[0].clientHeight - (forMainNav ? 0 : 24)) + 'px'; else uls[0].style.top = '0px'; } } catch(e) { } uls[0].style.visibility = show ? 'visible' : 'hidden'; } } function initXMLHttpClient() { var xmlhttp; try { // Mozilla / Safari / IE7 xmlhttp = new XMLHttpRequest(); } catch (e) { // IE var XMLHTTP_IDS = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'); var success = false; for (var i=0;i', content.indexOf(''; var home = false; var divSearch = document.getElementById('sub_page_search'); if(divSearch == null) { divSearch = document.getElementById('newsletter_home_search'); home = true; } //horizontal display if(scriptUrl.indexOf('APS=1') != -1 || window.location.href.toLowerCase().indexOf('itzonestaging') != -1) divSearch.style.width = '360px'; //button image for AlumniPressStaging if(scriptUrl.indexOf('APS=1') != -1) content = content.replace('
', '') .replace('style%20library/enewsletter/theme1/gobutton.gif', 'nr/publicportal/images/btngo.gif'); //button image for ITZone/ITConnect else if(newsletterName.toLowerCase() == 'itconnect') content = content.replace('
', '') .replace('style%20library/enewsletter/itconnects/gobutton.gif', 'nr/publicportal/images/btngo.gif'); divSearch.innerHTML = content; initializeUL(document.getElementById('nav')); //custom style for AlumniPressStaging, horizontal display if(scriptUrl.indexOf('APS=1') != -1) { document.getElementById('nav').style.left = '0px'; var homeSearch = document.getElementById('newsletter_home_search') homeSearch.style.paddingTop = '0px'; homeSearch.style.paddingBottom = '0px'; var divs = homeSearch.getElementsByTagName('div'); if(divs.length > 0) divs[0].style.color = 'White'; } //custom style for PinYueNanDa else if(newsletterName.toLowerCase() == 'pinyuenanda' && home) document.getElementById('nav').style.left = '35px'; } }; xmlHttp.send(); } populateList();