        var popupLoadoldonloadHndlr=window.onload, popupLoadpopupHgt, popupLoadactualHgt, popupLoadtmrId=-1, popupLoadresetTimer;
        var popupLoadtitHgt, popupLoadcntDelta, popupLoadtmrHide=-1, popupLoadhideAfter=4000, popupLoadhideAlpha, popupLoadhasFilters=true;
        var popupLoadnWin, popupLoadshowBy=null, popupLoaddxTimer=-1, popupLoadpopupBottom, popupLoadoldLeft;
        var popupLoadnText,popupLoadnMsg,popupLoadnTitle,popupLoadbChangeTexts=false;
        window.onload=popup_winLoad;

        var popupLoadoldonscrollHndr=window.onscroll;
        window.onscroll=popup_winScroll;
        popupLoadnText="";

	function opacity(id, opacStart, opacEnd, millisec) {
	    //speed for each frame
	    var speed = Math.round(millisec / 100);
	    var timer = 0;

	    //determine the direction for the blending, if start and end are the same nothing happens
	    if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
		    setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
		    timer++;
		}
	    } else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
		    {
		    setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
		    timer++;
		}
	    }
	}

	//change the opacity for different browsers
	function changeOpac(opacity, id) {
	    var object = document.getElementById(id).style;
//	    var object = id.style;
	    object.opacity = (opacity / 100);
	    object.MozOpacity = (opacity / 100);
	    object.KhtmlOpacity = (opacity / 100);
	    object.filter = "alpha(opacity=" + opacity + ")";
	} 


        function popup_winScroll()
        {
          if (popupLoadoldonscrollHndr!=null) popupLoadoldonscrollHndr();
          if (popupLoadtmrHide!=-1)
          {
            el=document.getElementById('popupLoad');
            el.style.display='none'; el.style.display='block';
          }
        }

        function popup_ShowPopup(show, title, msg, top, left)
        {
          if (popupLoaddxTimer!=-1) { el.filters.blendTrans.stop(); }

          if ((popupLoadtmrHide!=-1) && ((show!=null) && (show==popupLoadshowBy)))
          {
            clearInterval(popupLoadtmrHide);
            popupLoadtmrHide=setInterval(popup_tmrHideTimer,popupLoadhideAfter);
            return;
          }
          if (popupLoadtmrId!=-1) return;
          popupLoadshowBy=show;

          elCnt=document.getElementById('popupLoad_content')
          elTit=document.getElementById('popupLoad_header');
          el=document.getElementById('popupLoad');
          el.style.left=popupLoadoldLeft;
          el.style.top=top;
          el.style.filter='';

          if (popupLoadtmrHide!=-1) clearInterval(popupLoadtmrHide); popupLoadtmrHide=-1;

          document.getElementById('popupLoad_header').style.display='none';
          document.getElementById('popupLoad_content').style.display='none';

          if (navigator.userAgent.indexOf('Opera')!=-1)
          {
          
             bottom=(document.body.scrollHeight*1-document.body.scrollTop*1
                            -document.body.offsetHeight*1+1*popupLoadpopupBottom);
             if(bottom<0 || bottom>1000)
             	bottom=1000;
             el.style.bottom=bottom + 'px';
          }
          
          document.getElementById('popupLoad_content').innerHTML=msg;
          document.getElementById('popupLoadtitleEl').innerHTML=title;

          popupLoadactualHgt=0; el.style.height=popupLoadactualHgt+'px';
          el.style.visibility='';
          if (!popupLoadresetTimer) el.style.display='';
          changeOpac(100, 'popupLoad');
          popupLoadtmrId=setInterval(popup_tmrTimer,(popupLoadresetTimer?1000:20));
        }

        function popup_winLoad()
        {
          if (popupLoadoldonloadHndlr!=null) popupLoadoldonloadHndlr();

          elCnt=document.getElementById('popupLoad_content')
          elTit=document.getElementById('popupLoad_header');
          el=document.getElementById('popupLoad');
					popupLoadoldLeft=el.style.left;
          popupLoadpopupBottom=el.style.bottom.substr(0,el.style.bottom.length-2);
          
          popupLoadtitHgt=elTit.style.height.substr(0,elTit.style.height.length-2);
          popupLoadpopupHgt=el.style.height;
          popupLoadpopupHgt=popupLoadpopupHgt.substr(0,popupLoadpopupHgt.length-2); popupLoadactualHgt=0;
          popupLoadcntDelta=popupLoadpopupHgt-(elCnt.style.height.substr(0,elCnt.style.height.length-2));

          if (true)
          {
            popupLoadresetTimer=true;
          }
        }

        function popup_tmrTimer()
        {
          el=document.getElementById('popupLoad');

          if (popupLoadresetTimer)
          {
            el.style.display='';
            clearInterval(popupLoadtmrId); popupLoadresetTimer=false;
            popupLoadtmrId=setInterval(popup_tmrTimer,20);
          }
          popupLoadactualHgt+=5;
          if (popupLoadactualHgt>=popupLoadpopupHgt)
          {
            popupLoadactualHgt=popupLoadpopupHgt; clearInterval(popupLoadtmrId); popupLoadtmrId=-1;
            document.getElementById('popupLoad_content').style.display='';
            if (popupLoadhideAfter!=-1) popupLoadtmrHide=setInterval(popup_tmrHideTimer,popupLoadhideAfter);
          }
          if (popupLoadtitHgt<popupLoadactualHgt-6)
            document.getElementById('popupLoad_header').style.display='';
          if ((popupLoadactualHgt-popupLoadcntDelta)>0)
          {
            elCnt=document.getElementById('popupLoad_content')
            elCnt.style.display='';
            elCnt.style.height=(popupLoadactualHgt-popupLoadcntDelta)+'px';
          }
          el.style.height=popupLoadactualHgt+'px';
        }
        
        function popup_tmrHideTimer()
        {
          clearInterval(popupLoadtmrHide); popupLoadtmrHide=-1;
          el=document.getElementById('popupLoad');
          if (popupLoadhasFilters)
          {
            backCnt=document.getElementById('popupLoad_content').innerHTML;
            backTit=document.getElementById('popupLoad_header').innerHTML;
            document.getElementById('popupLoad_content').innerHTML='';
            document.getElementById('popupLoad_header').innerHTML='';
//            el.style.filter='blendTrans(duration=1)';
//            el.filters.blendTrans.apply();
//            el.style.visibility='hidden';
//            el.filters.blendTrans.play();
	    opacity('popupLoad', 100, 0, 500);
            document.getElementById('popupLoad_content').innerHTML=backCnt;
            document.getElementById('popupLoad_header').innerHTML=backTit;
            
            popupLoaddxTimer=setInterval(popup_dxTimer,1000);
          }
          else el.style.visibility='hidden';
        }
        
        function popup_dxTimer()
        {
          clearInterval(popupLoaddxTimer); popupLoaddxTimer=-1;
        }
     
        function popup_Close()
        {
          if (popupLoadtmrId==-1)
          {
            el=document.getElementById('popupLoad');
            el.style.filter='';
            el.style.display='none';
            if (popupLoadtmrHide!=-1) clearInterval(popupLoadtmrHide); popupLoadtmrHide=-1;
            
          }
        }
    
        function popup_ShowWindow()
        {
          
          if (popupLoadnWin!=null) popupLoadnWin.close();
          popupLoadnWin=window.open('','popupLoadnWin','width=400,height=250,scrollbars=yes, '+
            'menubar=no, resizable=no, status=no, toolbar=no, location=no');
          popupLoadnWin.document.write(popupLoadnText);
        }

        var popupLoadmousemoveBack,popupLoadmouseupBack;
        var popupLoadofsX,popupLoadofsY;
        function popup_DragDrop(e)
        {
          popupLoadmousemoveBack=document.body.onmousemove;
          popupLoadmouseupBack=document.body.onmouseup;
          ox=(e.offsetX==null)?e.layerX:e.offsetX;
          oy=(e.offsetY==null)?e.layerY:e.offsetY;
          popupLoadofsX=ox; popupLoadofsY=oy;

          document.body.onmousemove=popup_DragDropMove;
          document.body.onmouseup=popup_DragDropStop;
          if (popupLoadtmrHide!=-1) clearInterval(popupLoadtmrHide);
        }

        function popup_DragDropMove(e)
        {
          el=document.getElementById('popupLoad');          
          if (e==null&&event!=null)
          {
            el.style.left=(event.clientX*1+document.body.scrollLeft-popupLoadofsX)+'px';
            el.style.top=(event.clientY*1+document.body.scrollTop-popupLoadofsY)+'px';
            event.cancelBubble=true;
          }
          else
          {
            el.style.left=(e.pageX*1-popupLoadofsX)+'px';
            el.style.top=(e.pageY*1-popupLoadofsY)+'px';
            e.cancelBubble=true;
          }
          if ((event.button&1)==0) popup_DragDropStop();
        }

        function popup_DragDropStop()
        {
          document.body.onmousemove=popupLoadmousemoveBack;
          document.body.onmouseup=popupLoadmouseupBack;
        }


