<!--
var objDom = document.getElementById;
var objIE = document.all;
var objWinStyle;
var nTop, nLeft;
var strMeasure = document.layers ? "" : "px";
var strMove = "down";
var strMoveAlign = "fix";
var strMoveVAlign = "fix";
var strFixTarget = "window";
var bScroll = false;
var bResize = false;
var bCookie = false;
var nHoverTime = 40;
var nHoverLen = 10;
var nBoundTime = 40;
var nBoundLen = 20;
var nBoundCnt = 10;
var nBoundMax = nBoundLen*nBoundCnt;
var nBoundTop;
var nBoundVal;
var idHover, idBound;
function loadHover(){
if( bCookie ){
if( getCookie("hoverwindow") != "" ){
return;
}else{
document.cookie="hoverwindow=ok";
}
}
startHover();
}
function startHover(){
if ( !objDom && !objIE ){ return; }
if( idHover ){ clearInterval( idHover ); }
if( idBound ){ clearInterval( idBound ); }
objWinStyle = (objDom) ? document.getElementById("hoverwindow").style : objIE.hoverwindow;
if( !nTop ) nTop = parseInt(objWinStyle.top);
if( !nLeft ) nLeft = parseInt(objWinStyle.left);
if( strMove == "down" ){
if( strFixTarget == "window" ){
var nScrollTop = (objIE) ? getBodyObj().scrollTop : window.pageYOffset;
objWinStyle.top = nScrollTop - parseInt(objWinStyle.height) + strMeasure;
}else{
objWinStyle.top = -parseInt(objWinStyle.height) + strMeasure;
}
if( strMoveAlign == "center" ) setAlignCenter();
}else if( strMove == "up" ){
if( strFixTarget == "window" ){
var nWinHeight = objIE ? document.body.clientHeight : window.innerHeight;
var nScrollTop = (objIE) ? getBodyObj().scrollTop : window.pageYOffset;
objWinStyle.top = nScrollTop + nWinHeight + strMeasure;
}else{
var nHeight = objIE ? document.body.clientHeight : window.innerHeight;
objWinStyle.top = getBodyObj().scrollHeight - parseInt(objWinStyle.height) + strMeasure;
}
if( strMoveAlign == "center" ) setAlignCenter();
}
objWinStyle.visibility = ( objDom || objIE ) ? "visible" : "show";
idHover=setInterval("moveHover()",nHoverTime );
}
function moveHover(){
if( strMove == "down" ){
moveDown();
}else if( strMove == "up" ){
moveUp();
}
}
function moveDown(){
var nTopPosition = getTopPosition();
if( parseInt(objWinStyle.top) < nTopPosition ){
objWinStyle.top = parseInt( objWinStyle.top ) + nHoverLen + strMeasure;
}else{
startBound();
}
}
function moveUp(){
var nTopPosition = getTopPosition();
if( parseInt(objWinStyle.top) > nTopPosition ){
objWinStyle.top = parseInt( objWinStyle.top ) - nHoverLen + strMeasure;
}else{
startBound();
}
}
function startBound(){
nBoundVal = nBoundMax;
nBoundTop = 0;
clearInterval( idHover );
idBound = setInterval( "moveBound()", nBoundTime );
}
function moveBound(){
if( strMove == "down" ){
nBoundTop += -nBoundVal;
objWinStyle.top = getTopPosition() + nBoundTop + strMeasure;
if (nBoundVal < 0) nBoundVal += nBoundLen;
nBoundVal = nBoundVal * -1;
}else if( strMove == "up" ){
objWinStyle.top = parseInt( objWinStyle.top ) + nBoundVal + strMeasure;
if (nBoundVal < 0) nBoundVal += nBoundLen;
nBoundVal = nBoundVal * -1;
}
if ( nBoundVal == 0 ){
clearInterval( idBound );
}
}
function closeHover(){
if( idHover ){ clearInterval( idHover ); }
if( idBound ){ clearInterval( idBound ); }
if( objWinStyle ) objWinStyle.visibility = "hidden";
}
function getBodyObj(){
if( document.compatMode && document.compatMode != "BackCompat"){
return document.documentElement;
}else{
return document.body;
}
}
function winEventResize(theEvent){
if ( !objWinStyle ) return; 
if ( !(objWinStyle.visibility == "visible" || objWinStyle.visibility == "show") ) return;
if( !(strFixTarget == "window" && bResize) ) return;
objWinStyle.top = getTopPosition() + strMeasure;
if( strMoveAlign == "center" ) setAlignCenter();
}
function winEventScroll(theEvent){
if ( !objWinStyle ) return; 
if ( !(objWinStyle.visibility == "visible" || objWinStyle.visibility == "show") ) return;
if( !(strFixTarget == "window" && bScroll) ) return;
objWinStyle.top = getTopPosition() + strMeasure;
if( strMoveAlign == "center" ) setAlignCenter();
}
function setAlignCenter() {
if (!objDom&&!objIE) return;
var nWidth = objIE ? document.body.clientWidth : window.innerWidth;
objWinStyle.left = ( nWidth - parseInt(objWinStyle.width) ) / 2 + strMeasure;
}
function setVAlignCenter() {
if (!objDom&&!objIE) return;
var nHeight = objIE ? document.body.clientHeight : window.innerHeight;
objWinStyle.top =  parseInt(objWinStyle.top) + ( nHeight - parseInt(objWinStyle.height) ) / 2 + strMeasure;
}
function getTopPosition() {
if( strMoveVAlign == "center" ){
if( strFixTarget == "window" ){
var nScrollTop = (objIE) ? getBodyObj().scrollTop : window.pageYOffset;
var nHeight = objIE ? document.body.clientHeight : window.innerHeight;
return nScrollTop + ((nHeight-parseInt(objWinStyle.height))/2);
}else{
var nHeight = (objIE) ? getBodyObj().scrollHeight : window.pageYOffset;
retrun (nHeight-parseInt(objWinStyle.height))/2;
}
}else if( strFixTarget == "window" ){
var nScrollTop = (objIE) ? getBodyObj().scrollTop : window.pageYOffset;
return nScrollTop + nTop;
}else{
return nTop;
}
}
function getCookie( strName ) {
var strSearch = strName + "=";
var strRet = "";
if (document.cookie.length > 0) {
var offset = document.cookie.indexOf(strSearch)
if (offset != -1) {
offset += strSearch.length;
end = document.cookie.indexOf(";", offset);
if (end == -1)
end = document.cookie.length;
strRet = unescape(document.cookie.substring(offset, end))
}
}
return strRet;
}

window.onresize = winEventResize;
window.onscroll = winEventScroll;
-->
