  var doAll = (document.all!=null);
  var x = 0;
  var y = 0;
  
    var ie4 = (document.all)
    var ns4 = (document.layers)
    var isDHTML = ie4 || ns4

  function getCSSPElement(id) {    
    if (doAll)       
      return parent.main.document.all[id]    
    else
      return parent.main.document.layers[id]  
     }

  function getHeaderElement(id) {    
    if (doAll)       
      return parent.Header.document.all[id]    
    else
      return parent.Header.document.layers[id]  
     }
	 
function PrintPage() {
		if (window.print)
		    window.print()
		else 
			alert("To Print this page, please click on File | Print from your toolbar above.");
	}

function noDisplayElement(elmID) {
	if (document.all) {
		for (i = 0; i < parent.main.document.all.tags(elmID).length; i++) {
			obj = parent.main.document.all.tags(elmID)[i];
			if (! obj || ! obj.offsetParent)
				continue;
			obj.style.visibility = "hidden";
		}
	}
}

function displayElement(elmID) {
	if (document.all) {
		for (i = 0; i < parent.main.document.all.tags(elmID).length; i++) {
			obj = parent.main.document.all.tags(elmID)[i];
			if (! obj || ! obj.offsetParent)
			continue;
			obj.style.visibility = "";
		}
	}
}

    function showElement(id, daddy, cHeight) {        
      var pEl = getCSSPElement(id);
	  var daddy = null;
      if (pEl != null)          
        if (doAll) {
	      	if (!daddy)	{
				pEl.style.pixelTop = parent.main.document.body.scrollTop + 10;
    	  		pEl.style.pixelLeft = parent.main.document.body.clientWidth - 340;
				}
				pEl.style.visibility = "visible"
			return
			}
        else {
	      	if (!daddy) {
				pEl.top = window.pageYOffset; //src.y + 20 //window.event.y + 15
	      		pEl.left = document.width - 350; //src.x //window.event.x
				}
            pEl.visibility = "show"
			return
			}      
     }      
  
     function hideElement(id) {
        var pEl = getCSSPElement(id)        
        if (pEl != null)          
        if (doAll) {
			pEl.style.visibility = "hidden";
			}
        else
			pEl.visibility = "hide"      
     }

	function openNewWindow(fileName,windowName,theWidth,theHeight,theScroll) {
		if (doAll) {
		showLeft = parent.main.document.body.clientWidth - theWidth - 40;
		}
		else {
		showLeft = 	parent.main.document.width - theWidth - 40;
		}
		window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+theScroll+",resizable=0,left=0,top=0,width="+theWidth+",height="+theHeight);
	}
	
		function showBubble(toolTip,dir,step,speed) {
            var dir;
            var step;
            var speed;
			var Tip = getCSSPElement('Bubble')
			var nsTip = Tip //getHeaderElement('HeaderBubble')
				clearTimeout("TheTimer")
				if (doAll) {
					var i = parent.main.event.srcElement;
			  		Tip.innerHTML = toolTip;
					Tip.style.pixelTop=parent.main.document.body.scrollTop+10;
					Tip.style.pixelLeft = parent.main.document.body.clientWidth - 270;	
					//Tip.style.pixelLeft = getRealPos(i,"Left") + i.offsetWidth + 5 
					//Tip.style.pixelTop=getRealPos(i,"Top")-Tip.offsetHeight;	
						if(Tip.style.pixelTop<parent.main.document.body.scrollTop) {
						Tip.style.pixelTop=parent.main.document.body.scrollTop;
						}
						if(Tip.style.pixelLeft>(parent.main.document.body.clientWidth - 270)) {
						Tip.style.pixelLeft = parent.main.document.body.clientWidth - 270;	
						}		
						Tip.style.visibility="visible";
						//noDisplayElement("SELECT");	
						//noDisplayElement("IFRAME");	
						if (Tip.offsetHeight > 200) {
						parent.main.icon_bubble.style.pixelHeight = Tip.offsetHeight+35;
						}
				}
				else {
				nsTip.width = 250;		
				nsTip.document.writeln("<table height='110' width='250'><tr><td valign='top'><font face='Verdana,Arial' size='-4' color='333366'>"+toolTip+"</td></tr></table>");
				nsTip.document.close();
				nsTip.left = 0
				nsTip.top= parent.main.window.pageYOffset;
				nsTip.visibility="show";
				nsTip.zIndex = "5555";
				}
			}
			
			function hideBubble() {
			var Tip = getCSSPElement('Bubble');
			var nsTip = Tip //getHeaderElement('HeaderBubble');
				if (doAll) {
				Tip.style.visibility="hidden";
				//displayElement("SELECT");
				//displayElement("IFRAME");
				}
				else {
				nsTip.visibility="hide";
		  		nsTip.document.clear();	
				}
			}

		function doNothing(){
		var temp;
		}
	
function toggleMenu(showHide) { 
	if (showHide == false) {
		newSize = "180,*"
    } else {
		newSize = "0,*"
	}
    	parent.MenuBar.cols = newSize
}

function getRealPos(i,which) {
  iPos = 0
  while (i!=null) {
    iPos += i["offset" + which]
    i = i.offsetParent
  }
  return iPos
}
window.name='_top';
window.focus();
