if (!document.all)

document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getPosition; 


var X = 0;
var Y = 0;


function getPosition(args)
{
  // Gets IE browser position
  if (document.all)
  {
    X = event.clientX + document.body.scrollLeft;
    Y = event.clientY + document.body.scrollTop;
  }

  // Gets position for other browsers
  else
  { 
    X = args.pageX;
    Y = args.pageY;
  } 
}


function popup(windowname)
{
	
    var div;
    if(document.getElementById)
	    // Standard way to get element
	div = document.getElementById(windowname);
    else if(document.all)
	    // Get the element in old IE's

	div = document.all[windowname];   

    // if the style.display value is blank we try to check it out here

    if(div.style.display== '' && div.offsetWidth != undefined && div.offsetHeight != undefined)

    {

        div.style.display = (div.offsetWidth!=0 && elem.offsetHeight!=0)?'block':'none';

    }

    // If the PopUp is hidden ('none') then it will display it ('block').
    X = X + 15;   
    var z;
    
    z = X + 300;
    if ( z > screen.width)
    {
    X = screen.width - (((screen.width-800)/2)+250);
    }
    // Sets the position of the DIV

    div.style.left = X+'px';

    div.style.top = Y+'px'; 
        
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';


    // Sets the position of the DIV


   

}
