


var adHeight = 260;
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
function doit() {
    timerRunning = false;
	timerPuse = false;
	adCoordX = tempX +12;
	adCoordY = tempY +12;
	return showPopup('impopad', 1, adCoordX, adCoordY, adHeight);
}
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
if ((document.impop.exitPositionXa.value > tempX || tempX > document.impop.exitPositionXb.value)||(document.impop.exitPositionYa.value > tempY || tempY > document.impop.exitPositionYb.value)){				
				if (!timerRunning) {
				showPopup('impopad', 0,0,0,250);
				timerRunning = true;
				setTimeout('timerPuse = true',0);
				}	
}
  if (IE) { 
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;	
	if (tempX != document.impop.PositionX.value || tempY != document.impop.PositionY.value) {
        if (timerPuse) {
			document.impop.exitPositionXa.value = tempX - 50;
			document.impop.exitPositionYa.value = tempY - 50;
			document.impop.exitPositionXb.value = tempX + 250;
			document.impop.exitPositionYb.value = tempY + 200;
			
            clearTimeout(myTimer);
			
            myTimer = setTimeout('doit()',15000);		
        }
          document.impop.PositionX.value = tempX;
  		  document.impop.PositionY.value = tempY;	  
    }
	
  } else {
    tempX = e.pageX;
    tempY = e.pageY;
	if (tempX != document.impop.PositionX.value || tempY != document.impop.PositionY.value) {
        if (timerPuse) {
                  document.impop.exitPositionXa.value = tempX - 50;
			document.impop.exitPositionYa.value = tempY - 50;
			document.impop.exitPositionXb.value = tempX + 250;
			document.impop.exitPositionYb.value = tempY + 200;
            clearTimeout(myTimer);
            myTimer = setTimeout('doit()',15000);
        }
          document.impop.PositionX.value = tempX;
  		  document.impop.PositionY.value = tempY;
    }
  }  
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0} 
  document.impop.PositionX.value = tempX;
  document.impop.PositionY.value = tempY;
  return true;
}
var myTimer = setTimeout('doit()',15000); 
var timerRunning = true;
var timerPuse = true;
//--------------------------------------------------------

var cur;
var ch, h, tid;
function showPopup(id, trigger, adCoordX, adCoordY, adHeight) {
var bust = Math.floor(1000000*Math.random()+1);
var adContent = '<table width=\'250\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>';
adContent += '<tr><td><a href=\'/advertising/\'><img src=\'/images/curtop.gif\' width=\'162\' height=\'10\' border=\'0\'></a></td></tr>';
adContent += '<tr><td height=\'250\' align=\'center\' valign=\'middle\' bgcolor=\'#000000\'><IFRAME SRC=\'/a/banners.pl?region=28&keyword=NULL\' MARGINWIDTH=\'0\' MARGINHEIGHT=\'0\' HSPACE=\'0\' VSPACE=\'0\' FRAMEBORDER=\'0\' SCROLLING=\'NO\' WIDTH=\'250\' HEIGHT=\'250\'><A HREF=\'/a/blink.pl?region=28&slot=1\' target=\'_blank\'><IMG SRC=\'/a/bimg.pl?region=28&slot=1&keyword=NULL\' WIDTH=\'250\' HEIGHT=\'250\' ALT=\'Click Here!\' BORDER=\'0\'></a></IFRAME></td></tr>';
adContent += '</table>';
  if (document.layers) {
    cur = document[''+id+''];
	ch = cur.clip.height
	if (trigger==1){
	cur.left = adCoordX;
    cur.top = adCoordY;
    cur.clip.height = ch = 0;
    h = 260;
	sprite=document.layers[''+id+''].document;
  	sprite.open();
  	sprite.write(adContent);
  	sprite.close();
    cur.visibility = 'show';
	setTimeout('slideDown()', 1000);
	}
	else{
	ch = adHeight;
	slideUp();
	}
  }
	
  else if (document.all) {
    cur = document.all['impopad'];
	if (trigger==1){
	cur.style.pixelLeft = adCoordX;
    cur.style.pixelTop = adCoordY;
    ch = 0;
    cur.style.clip = 'rect(auto auto 0 auto)';
    h = 260;
	document.all[''+id+''].innerHTML = adContent;
    cur.style.visibility = 'visible';
	setTimeout('slideDown()', 1000);
	}
	else {
	ch = adHeight;
	slideUp();
	}
  }
  else if (document.getElementById) {
    cur = document.getElementById(id);
	if (trigger==1){
	cur.style.left = adCoordX + 'px';
    cur.style.top = adCoordY + 'px';
    ch = 0;
    cur.style.clip = 'rect(auto auto 0 auto)';
    h = 260;
	
	rng = document.createRange();
	el = document.getElementById(''+id+'');
	rng.setStartBefore(el);
	htmlFrag = rng.createContextualFragment(adContent)
	while(el.hasChildNodes()) el.removeChild(el.lastChild);
	el.appendChild(htmlFrag);
	
    cur.style.visibility = 'visible';
	setTimeout('slideDown()', 1000);
	}
    else {
	ch = adHeight;
	slideUp();
	}
  }
  
}
function slideDown () {
if (tid)
    clearTimeout(tid);
  ch += 6;
  if (document.layers)
    cur.clip.height = ch;
  else if (document.all || document.getElementById)
    cur.style.clip = 'rect(auto auto ' + ch + ' auto)';
  if (ch < h)
    tid = setTimeout('slideDown()', 0);
}

function slideUp () {


  if (tid)
    clearTimeout(tid);
  ch -= 6;
  if (document.layers){
    
    cur.clip.height = ch;
	}
  else if (document.all || document.getElementById){
    cur.style.clip = 'rect(auto auto ' + ch + ' auto)';
	}
  if (ch > 0){
    tid = setTimeout('slideUp()', 0);
	}
  else {
    if (document.layers)
      cur.visibility = 'hide';
   else if (document.all)
      cur.style.visibility = 'hidden';
    else if (document.getElementById)
      cur.style.visibility = 'hidden';
  }
}
