// ------------[+]-- DynamicHTML Tiphelp.floater 
// ------------[+]-- Copyright (C) 2001- HP-DESIGN.NET. 
// ------------[+]-- Takeru [ http://hp-design.net/ ] 
// No reproduction , no republication without written permission of HP-DESIGN.NET 
// Must not delete this copyright in order to use this script 


function TipHelp_initAddon() {
	this.timerID = 1 ;
	this.style = ( arguments[0] == 5 ) ? 
		Math.ceil( Math.random() * 4 ) : arguments[0] ;

	this.winWidth = getWindowWidth() ;
	this.winHeight = getWindowHeight() ;
	this.startX = ( this.style == 4 ) ? 
		mousemoveX + this.winWidth : mousemoveX - this.winWidth ;
	this.startY = ( this.style == 2 ) ? 
		mousemoveY + this.winHeight : mousemoveY - this.winHeight ;
	this.endX = mousemoveX + this.Xplus ;
	this.endY = mousemoveY + this.Yplus ;

	return this ;
} var tiphelp ;

function startTipHelp( n , style ){
	if( _bw.net4up || _bw.ie4up || _bw.opera7 ) { 
		tiphelp = new initTipHelp() ; tiphelp.addon( style ) ;
		if( tiphelp.style == 6 ) { 
			writeTipHelp(tiphelp.id,tiphelp.msg[n],tiphelp.endX,tiphelp.endY) ;
		} else {
			writeTipHelp(tiphelp.id,tiphelp.msg[n],tiphelp.endX,tiphelp.startY) ;
			tiphelp.timerID = setInterval("tiphelp.move()",tiphelp.speed) ;
		}
	}
	else if( _bw.opera ) {
		tiphelp = new initTipHelp() ; tiphelp.addon( style ) ;
		window.status = tiphelp.msg[n] ;
	}
}

function moveTipHelp() { var i = this.style ;
	var xp = Math.abs( this.startX - this.endX ) * 0.25 ;
	var yp = Math.abs( this.startY - this.endY ) * 0.25 ;
	var x  = ( i == 1 || i == 2 ) ? this.endX : this.startX ;
	var y  = ( i == 3 || i == 4 ) ? this.endY : this.startY ;
	switch( i ) {
		case 1 : this.startY += yp ; break ;
		case 2 : this.startY -= yp ; break ;
		case 3 : this.startX += xp ; break ;
		case 4 : this.startX -= xp ; break ;
	} setObjectTo(this.id,x,y) ; 
}

function writeTipHelp(id,string,x,y) {
	setObjectTo(id,x,y) ; 
	setStringToObj(id,string) ; 
	setObjectVisibility(id,1) ; 
}

function closeTipHelp() {
	if( _bw.net4up || _bw.ie4up || _bw.opera7 ) {
		setObjectVisibility( tiphelp.id , 0 ) ;
		if( tiphelp.timerID != null ) { clearTimeout(tiphelp.timerID) } 
	}
}

// get mouse XY
if(document.layers) { document.captureEvents(Event.MOUSEMOVE) }
function getMousemoveXY(e){
	if ( _bw.ie4up ) { 
		mousemoveX = event.x + getScrollX() ; mousemoveY = event.y + getScrollY() } 
	else if ( _bw.opera ) { 
		mousemoveX = e.clientX + getScrollX() ; mousemoveY = e.clientY + getScrollY() }
	else { 
		mousemoveX = e.pageX ; mousemoveY = e.pageY }
} document.onmousemove = getMousemoveXY ;


