// Make sure that the page does not load outside its frame
if (self == top) {
    var navPrinting = false;
    if ((navigator.appName + navigator.appVersion.substring(0, 1)) == "Netscape4") {
        navPrinting = (self.innerHeight == 0) && (self.innerWidth == 0);}
    if ((self.name != 'text') && (self.location.protocol != "file:") && (document.cookie.indexOf('mode=NoFrames') < 0) && !navPrinting) {
        var newURL = 'index.htm?page=' + escape(self.location.pathname);
        if (parseInt(navigator.appVersion, 10) >= 3) {
            self.location.replace(newURL);
        } else {
            self.location.href = newURL;
        }
    }
}
if (parent.theMenu) {
    var entryID = parent.theMenu.findEntry(location.pathname, "url", "right", 0);
    if (entryID >= 0) {
        parent.theMenu.selectEntry(entryID);
        if (parent.theMenu.entry[entryID].parent >= 0) {
		if (parent.theMenu.setEntry(parent.theMenu.entry[entryID].parent, true)) {
		    parent.theMenu.refresh();
		}
	}
    }
}

// *** EXPANDABLE LIST FUNCTIONS ***
function expandItem(objRef) {

	do {
		if (objRef.className.toUpperCase() == 'ITEMTITLE') {
			var spanPlus = objRef.getElementsByTagName('span').item(0).getElementsByTagName('img').item(0);
		} else if (objRef.className.toUpperCase() == 'EXPANDLISTITEM') {
			var divDescr = objRef.getElementsByTagName('div').item(1);
			break;
		}
		objRef = objRef.parentNode;
	}
	while (objRef);


	if (divDescr.style.display == 'block') {
		divDescr.style.display = 'none';
		spanPlus.src = 'images/plus.gif';
	} else {
		divDescr.style.display = 'block';
		spanPlus.src = 'images/minus.gif';
	}
}


// *** VIEWLET FUNCTIONS ***
function isLeelouCompliant()
{
     answer=false;
     version=Math.round(parseFloat(navigator.appVersion) * 1000);
     if (navigator.appName.substring(0,9) == "Microsoft")
     {
         if(version>=4000) answer=true;
     }
     if (navigator.appName.substring(0,8) == "Netscape")
     {
         if ((navigator.appVersion.indexOf("Win")> 0) && (version>=4060)) answer=true;
         else
         if ((navigator.appVersion.indexOf("Linux")> 0) && (version>=4060)) answer=true;
         else
         if ((navigator.appVersion.indexOf("SunOS")> 0) && (version>=4060)) answer=true;
         else
         if ((navigator.appVersion.indexOf("Mac")> 0) && (version>=5000)) answer=true;
     }
     // other one with plug-in (ie opera+plug_in)
     plugins=navigator.plugins;
     if (plugins!=null)
     {
         for(i=0;i!=plugins.length;i++)
              if((plugins[i].name.indexOf("Java Plug-in")>=0) && (plugins[i].name.indexOf("1.0")<0))
                  answer=true;
     }
     return answer;
}

function openViewlet(htmlFile,htmlWidth,htmlHeight)
{
     str = 'resizable=0,toolbar=0,menubar=0,';
     str = str + 'scrollbars=0,status=0,location=0,directory=0,width=350,height=200';
     if(!isLeelouCompliant())
     {
          open("http://www.qarbon.com/warning/index.html",'Leelou',str);
     }
     else
     {
          if(document.all)
          {
                htmlWidth+=5;
                htmlHeight+=10;
          }

     window.open(htmlFile,'Leelou','width='+htmlWidth+',height='+htmlHeight+',top=10,left=20');
     }
}

// *** END VIEWLET FUNCTIONS ***

