﻿// JScript File

  // Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

// If NS -- that is, !IE -- then set up for mouse capture
if (! isIE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempY = 0




// -------- FUNCTIONS USED FOR GLOSSARIUM TEXT POPUP ---------

//Keep track of the current cursor position
function getMouseXY(e) {
  if (isIE) { // grab the x-y pos.s if browser is IE
    if(document.body) {
    tempY = event.clientY + document.body.scrollTop
    }
  } else {  // grab the x-y pos.s if browser is NS
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempY < 0){tempY = 0}  
  
  return true
}

//Open Popup p at current mouse position
  function ShowPopup(obj,itemValue) {
DivGlossaryObj=isIE ? document.all.DivGlossary : document.getElementById("DivGlossary"); 
GlossTextObj=isIE ? document.all.GlossariumText : document.getElementById("GlossariumText"); 
ItemObj = document.getElementById("h-12"+itemValue);
		y = tempY; // get the mouse top position 
		
		var coors = findPos(obj);	   
		DivGlossaryObj.className="popupDiv";
		DivGlossaryObj.style.top = coors[1] + 'px';
		GlossTextObj.innerHTML = ItemObj.innerHTML;
        document.getElementById("lnkCloseGloss").focus();

  }

function findPos(objID)
{
    var obj = document.getElementById(objID)
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
	
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
				
		}
		
	}
	return [curleft,curtop + 20];
}

//Close Popup  
  function HidePopup() {
DivGlossaryObj=isIE ? document.all.DivGlossary : document.getElementById("DivGlossary"); 
if(DivGlossaryObj) {
        DivGlossaryObj.style.top = '';
		DivGlossaryObj.className = "throwUp";
 }
} 


// ----------------- NEDSTAT FUNCTIONALITY -------------------

function sitestat(ns_l){
alert("in here")
ns_1 = "http://be.sitestat.com/ibgebim/ibgebim/TST" + ns_l;
ns_l+='&amp;ns__t='+(new Date()).getTime();ns_pixelUrl=ns_l;
ns_0=document.referrer;
ns_0=(ns_0.lastIndexOf('/')==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf('/'),0):ns_0;
if(ns_0.length>0)ns_l+='&amp;ns_referrer='+escape(ns_0);
if(document.images){ns_1=new Image();ns_1.src=ns_l;}else
document.write('<img src="'+ns_l+'" width="1" height="1" alt="">');
}

function Connecting() 
{
            
     
        window.location.href ="/Templates/Sitemap.aspx";
}
