function popwinClose ()
{
	popwin_div = document.getElementById( 'popwin_window' );
	popwin_div.style.display = 'none';
	
	popwin_black_div = document.getElementById( 'popwin_black' );
	popwin_black_div.style.visibility = 'hidden';
	
}
function popwinShow (delay)
{
	delay = delay * 1000;
	
	popwin_div = document.getElementById( 'popwin_window' );
	setTimeout("popwin_div.style.display = 'block'", delay);
	
	popwin_black_div = document.getElementById( 'popwin_black' );
	popwin_black_div.style.height = popwinGetPageHeight() + 'px';
	setTimeout("popwin_black_div.style.visibility = 'visible'", delay);
}

function popwinGetPageHeight ()
{
	var height = 0, windowHeight = 0;
	
	// find out what is the height of the scrolled page
	if(window.innerHeight && window.scrollMaxY)
		height = window.innerHeight + window.scrollMaxY;
	else if(document.body.scrollHeight > document.body.offsetHeight)
		height = document.body.scrollHeight;
	else
		height = document.body.offsetHeight;
	
	// find out window height
	if(self.innerHeight) 
		windowHeight = self.innerHeight;
	else if(document.documentElement && document.documentElement.clientHeight)
		windowHeight = document.documentElement.clientHeight;
	else if (document.body)
		windowHeight = document.body.clientHeight;

	if(height > windowHeight)
		return height;
	else
		return windowHeight;
}



var IE = document.all ? true : false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// gets the mouse coordinates
// if in special area shows popup
function popwinMouseMove (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;
	}  
	if(tempY < 10) {
		popwinShow(0);
	}

}




