// navigation

sfHover = function() {
		
    if (!document.body.currentStyle) return;
		
    var sfEls = document.getElementById("mainnavlist").getElementsByTagName("li");
    for (var i = 0; i < sfEls.length; i++)
    {
        sfEls[i].onmouseover = function()
        {
            if (this.lastChild.style)
            {
                //this.lastChild.style.visibility = 'visible';
                this.lastChild.style.display = 'block';
            }
            // this.style.backgroundColor = '#f9f9f9';
		 	// this.style.color = '#000000';
        }
        sfEls[i].onmouseout = function()
        {
            if (this.lastChild.style)
            {
                //this.lastChild.style.visibility = 'hidden';
                this.lastChild.style.display = 'none';
            }
            // this.style.backgroundColor = '';
			// this.style.color = '';
        }
    }
}
window.onload = sfHover;

// openpicwin
function openPicWin(pFileName,pWinName,pWidth,pHeight) {
	var isNS = (document.layers) ? true : false;
	
	if (isNS) pHeight = pHeight + 19;
		eval("allSettings = 'width="+pWidth+",height="+pHeight+",menubar=yes,scrollbars=yes,status=yes,resizable=yes'");
		w=window.open(pFileName,pWinName,allSettings);
		w.window.focus();
}

// functions for iframe expander in all various browsers
function getIFrameDoc( name ) {
  var IFrameDoc;
  var Height;
  var IFrameObj = document.getElementsByName(''+name)[0];
  
  if (typeof document.frames != 'undefined') {
    IFrameObj = document.frames[name];
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return false;
  }
  
  if(typeof IFrameDoc.body != 'undefined')
  {
    return IFrameDoc.body;
  }
  else
  {
    return IFrameDoc.documentElement;
  }
}

/* gets the height of an iframe document */
function getIFrameDocHeight( name )
{
var IFrameDoc = getIFrameDoc( name );
  if(typeof IFrameDoc == 'undefined')
    return false;
  return IFrameDoc.scrollHeight;
}

/* gets the width of an iframe document */
function getIFrameDocWidth( name )
{
var IFrameDoc = getIFrameDoc( name );
  if(typeof IFrameDoc == 'undefined')
    return false;
  return IFrameDoc.scrollWidth;
}