function IEContentLoaded (w, fn) { //alert("IEContentLoaded called"); var d = w, done = false, // only fire once init = function () { //alert("init called"); if (!done) { done = true; fn(); } }; // polling for no errors (function () { try { // throws errors until after ondocumentready d.documentElement.doScroll('left'); } catch (e) { setTimeout(arguments.callee, 450); return; } // no errors, fire init(); })(); // trying to always fire before onload d.onreadystatechange = function() { if (d.readyState == 'complete') { d.onreadystatechange = null; init(); } }; } function doNothing() { return true; } function SetImageWidth() { //alert("SetImageWidth called"); var images = new Array(); var images2 = document.getElementsByTagName('img'); //alert(images2.length); for(var p=0,q=images2.length;p 0) { Jump(newurl); } else { window.location.href = newurl; } } function goTemplate4(newurl) { if (newurl == 'skip' || newurl == '') return; parent.window.location.href = newurl; } function hexEncode(invalue) { return "%" + invalue.toString(16); } function utfEncode(inputstring) { outcode = ""; for (a=0; a>6)); outcode += hexEncode((0x80 | c & 0x3F)); } else if (c < 0x10000) { outcode += hexEncode((0xE0 | c>>12)); outcode += hexEncode((0x80 | c>>6 & 0x3F)); outcode += hexEncode((0x80 | c & 0x3F)); } else if (c < 0x200000) { outcode += hexEncode((0xF0 | c>>18)); outcode += hexEncode((0x80 | c>>12 & 0x3F)); outcode += hexEncode((0x80 | c>>6 & 0x3F)); outcode += hexEncode((0x80 | c & 0x3F)); } } // Return result return outcode; } function openUrl( urlStr, target ) { if( target == '' ){ this.window.location.href = urlStr; } else if(parent.frames[target]){ parent.frames[target].document.location = urlStr; } else if( parent.parent.frames[target] ){ parent.parent.frames[target].document.location = urlStr; } else { window.open( urlStr, target ); } } function replaceUrl( urlStr, target ) { re = /viewInside/gi; newUrl=urlStr.replace(re, "viewUNID"); i1 = newUrl.indexOf('://'); if (i1 > 0 && (target == '' || target == 'main' || target == 'content' || target == 'left')) { fixedUrl = newUrl.substring(0, i1) + '%$$' + newUrl.substring(i1 +3, (newUrl.length + i1)); newUrl="/" + thisDb + "/frmRedirect!ReadForm&url=" + fixedUrl; } openUrl( newUrl, target ); } function printDocument( type) { if (type == 1) { if (nn) { printWindow = window.open("../lupLongPrint/" + unid + "!OpenDocument&r=2"); } else { printWindow = window.open("../lupLongPrint/" + unid + "!OpenDocument&r=2", "printWindow", "width=665, height=540, toolbar=1, directories=0, menubar=1, status=1, resizable=1, location=0, scrollbars=1, copyHistory=0, alwaysRaised=1"); } } else { if (nn) { printWindow = window.open("/" + thisDb + "/viewUNID/" + unid + "?OpenDocument&r=2"); } else { printWindow = window.open("/" + thisDb + "/viewUNID/" + unid + "?OpenDocument&r=2", "printWindow", "width=665, height=540, toolbar=1, directories=0, menubar=1, status=1, resizable=1, location=0, scrollbars=1, copyHistory=0, alwaysRaised=1"); } } printWindow.focus(); } function emailPage() { emailWindow = window.open("/" + thisDb + "/wfrmMailToFriend?ReadForm&c=" + unid + "&db="+ thisDb + "&lang=" + language, "emailWindow", "menubar=0,status=0,location=0,toolbar=0,scrollbars=0,resizable=0,height=360,width=430"); emailWindow.focus(); } function bookmarkPage() { if (ie) { window.external.AddFavorite(this.location.href, document.title); } else { alert("Your browser does not support opening of the bookmark/favorites window.\n\nBookmark this page manually by clicking on your right mouse button in the content part of the window."); } } function getCookie(name) { var cookieString = document.cookie; var valueStart = cookieString.indexOf(name); if(valueStart == -1) { return null; } valueStart += name.length + 1; var valueEnd = cookieString.indexOf(";", valueStart); if(valueEnd == -1) { valueEnd = cookieString.length; } var value = cookieString.substring(valueStart, valueEnd); return unescape(value); } function openResponse(lnk) { oNewWindow = window.open(lnk, "Response", "menubar=0,status=0,location=0,toolbar=0,scrollbars=1,resizable=1,height=550,width=655, top = 100"); } function showPopup( url ) { var realURL, title, params = ''; realURL = url.substring( 0, url.indexOf( '&title=' ) ); params = url.substring( url.indexOf( '¶ms=' )+8, url.length ); if( nn ) window.open(realURL); else popup = window.open(realURL, 'popup', params); popup.focus(); } function openWindow(url) { winStats='toolbar=no,location=no,directories=no,menubar=no,'; winStats+='scrollbars=no,width=780,height=535'; if (navigator.appName.indexOf("Microsoft")>=0) { winStats+=',left=4,top=4'; } else { winStats+=',screenX=4,screenY=4'; } visualizer=window.open(url,"",winStats); } function collapse(obj) { var nr; this.obj = obj; nr = obj.id; obj = document.getElementById(obj.id + 'Content'); if (obj.style.display == "block") { obj.style.display = "none"; document.images['arrow'+nr.substr(3)+''].src = "/jotun/corp/20020022.nsf/viewname/arrow_right/$file/arrow_right.gif"; } else { obj.style.display = "block"; document.images['arrow'+nr.substr(3)+''].src = "/jotun/corp/20020022.nsf/viewname/arrow_down/$file/arrow_down.gif"; } } var isLoggedIn = false; var selectedName = ""; function STLinkClicked(userName, displayName, status, evt) { selectedName = userName; showMenu(userName, displayName, status, evt.clientX, evt.clientY ); evt.cancelBubble = true; } function setMenuItem(itemId, text, action, isEnabled) { var menuItem = document.getElementById(itemId); text = "  " + text; //add spaces to the left if (isEnabled) menuItem.innerHTML = "" + text + ""; else menuItem.innerHTML = "" + text + ""; } function showMenu(userName, displayName, status, x, y) { var isOnline = (status != 0); // create the menu items setMenuItem("menu_message", "Message...", "javascript:onMessage()", isOnline); setMenuItem("menu_meeting", "Share Application...", "javascript:onMeeting()", isOnline); setMenuItem("menu_addContact", "Add to Contact List", "javascript:onAddContact()", isLoggedIn); setMenuItem("menu_mail", "Send Mail...", "mailto:" + getEmailAddress(userName), true); // position the menu var theMenu = document.getElementById("menu"); theMenu.style.left=x - 10 + document.body.scrollLeft; theMenu.style.top=y + 10 + document.body.scrollTop; // show the menu theMenu.style.visibility='visible'; } function hideMenu() { document.getElementById("menu").style.visibility='hidden'; } function onMessage() { STLinksCreateIM(selectedName); } function onMeeting() { STLinksCreateMeeting(selectedName, "chat;share;whiteboard", "Meeting", "Please join the meeting"); } function onAddContact() { STLinksAddToContactList( selectedName, "Work" ); } function getEmailAddress(name) { return emailAddress[name]; } function STLinksLoggedIn(myUserId, myUserName) { isLoggedIn = true; } function STLinksLoggedOut(reason) { isLoggedIn = false; }