﻿// JScript File
//        var test=true;

        function sendHome(){
            location.replace("http://www.advantec-hr.com");
        }

        function showDiv2(sDivName, evt){
//              if (test==true){
//                debugger;             
//                test=false;
//              }
              var evt=(!evt) ? window.event : evt;//IE:Moz
              var el = document.getElementById(sDivName);
              
              var divHeight = parseInt(el.style.height);        
              var winHeight = getWindowHeight();
              var tmpX = 0;
              var tmpY = 0;
              var scrollTop = 0;
              var clientY = 0;

              //Figure out where on the page the mouse pointer is
              if(evt.pageX){   //Mozilla
                    tmpX = evt.pageX + window.pageXOffset;
                    clientY = evt.pageY;
                    scrollTop = window.scrollY;
                    
                    if (clientY + (divHeight/2) >= winHeight){
                        tmpY = winHeight - divHeight - 10;
                    }else{
                        tmpY = clientY - (divHeight / 2);
                    }
                    
                    
              } else if(evt.clientX) {
                   if (document.documentElement && !document.documentElement.scrollTop){
                        // IE6 +4.01 but no scrolling going on
                        tmpX = evt.clientX + document.documentElement.scrollLeft;
    	                clientY = evt.clientY;
                    }else if (document.documentElement && document.documentElement.scrollTop){
                   // IE6 +4.01 and user has scrolled
                        tmpX = evt.clientX + document.documentElement.scrollLeft;
    	                clientY = evt.clientY;
    	                scrollTop = document.documentElement.scrollTop;
    	                tmpY = clientY + scrollTop;
                   }else if (document.body && document.body.scrollTop){
                   // IE5 or DTD 3.2
                        tmpX = evt.clientX + document.body.scrollLeft;
    	                tmpY = evt.clientY + document.body.scrollTop;
    	                clientY = evt.clientY;
                   }
                   
                   //don't let it run off the bottom of the screen
                   if ((clientY + divHeight) >= winHeight){
                       tmpY = (winHeight - divHeight + scrollTop - 10);
                   //Don't let it run off the top of the screen
                  }else if(clientY - (divHeight/2) + scrollTop <= scrollTop + 10){
                       tmpY = scrollTop + 10;
                  }else{
                       tmpY = clientY - (divHeight/2) + scrollTop - 10;
                  }              
                   
              }else{
                return false
              }//end outer if
              
              el.style.left = (tmpX+35) + 'px';
              el.style.top = tmpY + 'px';
              el.style.visibility = "visible";
        }//end showDiv2
        
        function getWindowHeight() {
	        var windowHeight = 0;
	        if (typeof(window.innerHeight) == 'number') {
		        windowHeight = window.innerHeight;
	        } else {
		        if (document.documentElement && document.documentElement.clientHeight) {
			        windowHeight = document.documentElement.clientHeight;
		        } else {
			            if (document.body && document.body.clientHeight) {
				            windowHeight = document.body.clientHeight;
			            }
		            }
	            }
	            return windowHeight;
            }

        
        function hideDIV(sDivName){
            document.getElementById(sDivName).style.visibility="hidden";
        }