// Get Y coordinate
function whereY() {
// How far down the page we've scrolled, Y offset of "alert" div
  var scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
  } else if( document.body && document.body.scrollTop ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
  } else if( document.documentElement && document.documentElement.scrollTop ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
  }
  return scrOfY;
}

// Get X coordinate
function whereX() {
// Get browser dimensions for X offset of "alert" div
  var myWidth;
  if( typeof( window.innerWidth ) == 'number' ) { 
//Non-IE 
  myWidth = window.innerWidth; 
  } else if( document.documentElement && document.documentElement.clientWidth) { 
//IE 6+ in 'standards compliant mode' 
  myWidth = document.documentElement.clientWidth;  
  } else if( document.body && document.body.clientWidth ) { 
//IE 4 compatible 
  myWidth = document.body.clientWidth; 
  }
  return myWidth;
}

