



<!--
// when using this script file, make sure prototype is always included
var confirmLogout = false; //Override this Variable if a Page requires logout confirmation
var forceLogout = false; //Override this Variable if logout confirmation must be skipped

function justsa() { return 0; }
function getFormValues(fobj,valFunc) {
  var str = "";
  var valueArr = null;
  var val = "";
  var cmd = "";
  for(var i = 0;i < fobj.elements.length;i++)   {
    switch(fobj.elements[i].type) {
      case "text":      
        if(valFunc) {
          cmd = valFunc + "(" + 'fobj.elements[i].value' + ")";
          val = eval(cmd)
        }
        str += fobj.elements[i].name + "=" + escape(fobj.elements[i].value) + "&";
        break;
      case "hidden":
        str += fobj.elements[i].name + "=" + escape(fobj.elements[i].value) + "&";
        break;
      case "select-one":
        str += fobj.elements[i].name + "=" + fobj.elements[i].options[fobj.elements[i].selectedIndex].value + "&";
        break;
      case "select-multiple":
        for (var j = 0; j<fobj.elements[i].options.length; j++)
          if (fobj.elements[i].options[j].selected)
            str += fobj.elements[i].name + "=" + fobj.elements[i].options[j].value + "&";
        break;
    }
  }
  str = str.substr(0,(str.length - 1));
  return str;
}
function ow(winname,theurl)
{var thiswin;thiswin=window.open(theurl,winname,"width=600,height=460,resizable=yes,scrollbars=yes");
thiswin.focus();return;}
function ow2(winname,theurl)
{var thiswin;thiswin=window.open(theurl,winname,"width=500,height=460,resizable=yes,scrollbars=yes");
thiswin.focus();return thiswin;}
function lgw(winname,theurl)
{var thiswin;thiswin=window.open(theurl,winname,"width=1120,height=700,resizable=yes,scrollbars=yes");
thiswin.focus();return;}
function py(winname,theurl)
{var thiswin;thiswin=window.open(theurl,winname,"width=800,height=660,resizable=yes,scrollbars=yes");
thiswin.focus();return;}
function logout() {
  perform_logout('n');
}
function perform_logout(typ) {
var z=''+document.location;
if (!forceLogout && (z.indexOf('WritePaper')>=0 || confirmLogout))
  if (!confirm('Are you sure you would like to log out?')) return;
window.location='/lnw/DoLogout?typ='+typ;
}
function closePopup(popupName){
var win = window.open("", popupName, "width=1, height=1"); //set small window if in case popup is not yet existing
win.close();
}
function product_demo() {
  py('lnw_tour_win', '/lnw/lnw_tour/LNWv3.html');
}
function scratch_pad() {
  py('spad', '/lnw/ScratchPad');
}
// CLIPPABLE
function setMenuOffset() { 
  var header = document.getElementById('mainMenu');
  if (!header) return;
  var currentOffset = document.documentElement.scrollTop || document.body.scrollTop; // body for Safari
  var startPos = parseInt(setMenuOffset.initialPos) || 190;
  var desiredOffset = startPos - currentOffset;
  if (desiredOffset < 10)
    desiredOffset = 10;
  if (desiredOffset != parseInt(header.style.top))
    header.style.top = desiredOffset + 'px';

  var currentLeftOffset = document.documentElement.scrollLeft || document.body.scrollLeft; // body for Safari
  if (currentLeftOffset != - parseInt(header.style.left))
    header.style.left = '-' + currentLeftOffset + 'px';
}
function getStyle(el,styleProp) {
  var x = document.getElementById(el);
  if (!x) return;
  if (x.currentStyle)
    var y = x.currentStyle[styleProp];
  else if (window.getComputedStyle)
    var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
  return y;
}
function initClipper() {
    setMenuOffset.initialPos = '20'; //getStyle('mainMenu','top');
    window.onscroll = document.documentElement.onscroll = setMenuOffset;
    setMenuOffset();
    /* in Moz 1.7.12/FF 1.5 window.onscroll is wiped when you use the mouse wheel while 
    the pointer is NOT above a true page element (ie. when it is above the naked documentElement)
     ... or something ...
    Of course Safari doesn't accept document.documentElement.onscroll; Op and IE 7 do */
}  

// FIXED LAYER MENU
var menu;
var theTop = 20;
var old = theTop;

function initFixedLNWMenu()
{
  menu = new getObj('mainMenu');
  movemenu();
}

function movemenu()
{
  if (window.innerHeight)
  {
      pos = window.pageYOffset
  }
  else if (document.documentElement && document.documentElement.scrollTop)
  {
    pos = document.documentElement.scrollTop
  }
  else if (document.body)
  {
      pos = document.body.scrollTop
  }
  if (pos < theTop) pos = theTop;
  else pos += 5;
  if (pos == old)
  {
    menu.style.top = pos;
  }
  old = pos;
  temp = setTimeout('movemenu()',500);
}

function getObj(name)
{
  if (document.getElementById)
  {
    this.obj = document.getElementById(name);
  this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
  this.obj = document.all[name];
  this.style = document.all[name].style;
  }
  else if (document.layers)
  {
     this.obj = document.layers[name];
     this.style = document.layers[name];
  }
}

// menu functions



// timeout handling

var lnw_sessionTimeout_time = 5;
var lnw_timeoutLimit = 30;


function lnw_sessionTimeout_Text() {
  o = $('lnw_timeout');
  if (lnw_sessionTimeout_time>5) { if (o) o.innerHTML = ""; lnw_sessionTimeout_time= 5; return; }
  s = "Your session will expire in "+(lnw_sessionTimeout_time)+" minutes.  Please save your work to continue!";
  if (o) { o.innerHTML = '<blink><h2>' + s + '</h2></blink>'; }
  else alert(s);
  lnw_sessionTimeout_time = lnw_sessionTimeout_time-1;
  if (lnw_sessionTimeout_time<0) {
    forceLogout = true;
    perform_logout('y');
  } else setTimeout(lnw_sessionTimeout_Text, 1*60*1000);
}
function lnw_sessionTimeout() {

  return;
}
function reset_sessionTimeout() {
lnw_sessionTimeout_time=6;
}
lnw_sessionTimeout();
// -->
