// Global variables var CGI_URL = "http://www.connectability.ca/connectability/cgi-bin/"; var LOGIN_URL = "https://www.connectability.ca/connectability/pages/login.html"; var SWF_URL = "http://www.connectability.ca/connectability/pages/"; var LIBRARY_URL = "http://www.connectability.ca/connectability/library/"; var user_logged_in = 0; var library_startpage = 'startpage.html'; var library_images_path = LIBRARY_URL + "images/"; var login_url = CGI_URL + "login.php"; var loginWindow; var loginWindowWidth = 625; var loginWindowHeight = 404; var callerMovie = ""; var loginRedirectURL = ""; function setCallerMovie(newCaller) { callerMovie = newCaller; } function thisMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; return (isIE) ? window[movieName] : document[movieName]; } function openWithLogin(openURL) { loginRedirectURL = openURL; // Go directly to URL if already logged in user_logged_in ? jsVerifyLogin() : openLoginWindow(); } function jsVerifyLogin() { if (callerMovie != "") { thisMovie(callerMovie).verifyLogin(); } else { loginRedirectURL == "" ? window.location.reload(true) : window.location.href = loginRedirectURL; } } function setFlashVariables() { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); // FireFox fix window.document.index.name == undefined ? window.document.index[1].SetVariable(pair[0], pair[1]) : window.document.index.SetVariable(pair[0], pair[1]); } } // Given a variable name, return the corresponding GET string value function getQueryParamValue(param) { var q = document.location.search || document.location.hash; if (q) { var startIndex = q.indexOf(param + "="); var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length; if (q.length > 1 && startIndex > -1) { return q.substring(q.indexOf("=", startIndex) + 1, endIndex); } } return ""; } function openLoginWindow() { var loginLeft = 0; var loginTop = 0; if (navigator.appName == "Netscape") { loginLeft = window.screenX + window.outerWidth/2 - loginWindowWidth/2; loginTop = window.screenY + window.outerHeight/2 - loginWindowHeight/2; } else if (navigator.appName.indexOf("Microsoft") != -1) { loginLeft = window.screenLeft + document.body.offsetWidth/2 - loginWindowWidth/2; loginTop = window.screenTop + document.documentElement.clientHeight/2 - loginWindowHeight/2; } //try //{ loginWindow = window.open(LOGIN_URL,"loginForm","scrollbars=1,location=1,status=1,left=" + loginLeft + ",top=" + loginTop + ",width=" + loginWindowWidth + ",height=" + loginWindowHeight + ",modal=yes"); //loginWindow.focus(); //} //catch(e) {} //setTimeout('verifyWindowOpen(loginWindow)', 5000); } // Detect popup blockers function verifyWindowOpen(targetWindow) { try { var targetID = targetWindow.id; } catch(e) { alert("It appears that your popup blocking software prevents the login screen from being shown. Please " + "disable any popup blocking software or add ConnectABILITY to your safe sites list in order to log in."); } } // Close all child windows function closeAllPopups() { if (loginWindow != null) { loginWindow.close(); } } function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = library_images_path + arg; return rslt; } } function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i' + ' ' + ' ' + ' ' + ' ' + ' ' + ' Information Centre' + ' ' + ' ' + ' Communication Centre' + ' ' + ' ' + ' Library' + ' ' + ' ' + ' Supported Inclusion' + ' ' + ' ' + ' Learning Together' + ' ' + ' ' + ' home' + ' ' + ''); } function loadReviews (pageNum) { document.getElementById('reviewslist').innerHTML = '
Please wait...
'; // NOTE: cgiURL is set within the HTML file containing reviews var url = cgiURL + '&page=' + pageNum; /** * The simple way for an Ajax request, use onRequest/onComplete/onFailure * to do add your own Ajax depended code. */ new Ajax(url, { method: 'get', update: $('reviewslist') }).request(); } // Display DSTO startpage sidebar link for DSTO partner users function libraryDSTOStartPage() { if (library_startpage.indexOf('dsto') != -1) { document.write('Start Page (DSTO)'); } }