﻿// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all ? true : false

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0;
var tempY = 0;

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
    if (IE) { // grab the x-y pos.s if browser is IE
        tempX = event.clientX + document.body.scrollLeft;
        tempY = event.clientY + document.body.scrollTop;
    } else {  // grab the x-y pos.s if browser is NS
        tempX = e.pageX;
        tempY = e.pageY;
    }
    return true;
}
function showPopUp(popUpID) {

    var div = document.getElementById(popUpID);

    var x = (document.body.offsetWidth - div.offsetWidth) / 2;
    var y = (document.body.offsetHeight - div.offsetHeight) / 2;


    div.style.visibility = 'visible';

    //div.style.left = (IE ?  : x) + 'px';
    div.style.top = '100px';
}
function closePopUp(popUpID) {
    var div = document.getElementById(popUpID);
    div.style.visibility = 'hidden';
}

function openWindow(url) {

    var win = window.open(url, 'PRINT', 'menu=0,address=0,toolbar=0,status=0,width=600,height=600', true);
}
