
//Use a link like this to include the script
//<a href="#" onMouseOver="showmessage('Your Text Here', width, height)" onMouseOut="hideticker()"></a>
//or use this one
//<SPAN onMouseOver="showmessage('Your Text Here', width, height)" onMouseOut="hideticker()"></SPAN>

//You also have to include this into the side
//<script src="/pages/inc_quickinfo.js" type="text/javascript"></script>
//<DIV ID="tickerbg" style="position:absolute;"></DIV>
//<DIV ID="ticker" style="position:absolute;"></DIV>


// width of the ticker
var tickerwidth=120

// height of the ticker
var tickerheight=25

// distance from the messagetext to the tickermarrgin (pixels)
var tickerpadding=3

// borderwidth of the ticker (pixels)
var borderwidth=0

// font-family
var fnt="arial"

// font-size of the text
var fntsize=8

// font-size of the last letter of the ticker
var fntsizelastletter=7

// font-color of the text
var fntcolor="black"

// font-color of the last letter of the ticker
var fntcolorlastletter="green"

// font-weight. Set a value between 1 to 9 to adjust the boldness
var fntweight=3

// backgroundcolor
var backgroundcolor="#FFFFE1"

// standstill between the messages (microseconds)
var standstill=1000

// speed (a higher value will slow down the ticker)
var speed=10

// horizontal distance from the textlink to the popupbox (pixels)
var xdistance=8

// vertical distance from the textlink to the popupbox (pixels)
var ydistance=5

// Do not edit the variables below
var timer
var topposition=0
var leftposition=0
var x,y
var i_substring=0
var i_presubstring=0
var i_message=0
var message
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function getmessagebackground() {
                messagebackground="<table style='border: 1px #000000 solid' border="+borderwidth+" width="+tickerwidth+" height="+tickerheight+" cellspacing=0 cellpadding=0><tr><td valign=top bgcolor='"+backgroundcolor+"'>"
                messagebackground+="&nbsp;</td></tr></table>"
}

function getmessagecontent() {
                messagecontent="<table border=0 cellspacing=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
                messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"
                messagecontent+="<font color='"+fntcolor+"'>"
                messagecontent+=messagepresubstring
                messagecontent+="</font>"
                messagecontent+="</span>"
                messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"
                messagecontent+="<font color='"+fntcolorlastletter+"'>"
                messagecontent+=messageaftersubstring
                messagecontent+="</font>"
                messagecontent+="</span>"
                messagecontent+="</td></tr></table>"
}

function showticker() {

                messagepresubstring=message
                messageaftersubstring=''
                getmessagecontent()
                
                if (document.all) {
                        ticker.innerHTML=messagecontent
                        timer=setTimeout("showticker()", speed)
                }
                if (document.layers) {
                        document.ticker.document.write(messagecontent)
                        document.ticker.document.close()
                        timer=setTimeout("showticker()", speed)
                }

}

function hideticker() {
    clearTimeout(timer)
    i_substring=0
        i_presubstring=0
    if (document.all) {
            document.all.ticker.style.visibility="hidden"
        document.all.tickerbg.style.visibility="hidden"
        }
        if (document.layers) {
                document.ticker.visibility="hidden"
        document.tickerbg.visibility="hidden"
        }
}

function showmessage(linkmessage, JSWidth, JSHeight, JSXDistance, JSYDistance) {
	  tickerwidth =JSWidth;
	  tickerheight =JSHeight;
    getmessagebackground()
    message=linkmessage

        i_substring=0
        i_presubstring=0

        if(JSXDistance != '')
          {leftposition=x+JSXDistance}
        else
        	{leftposition=x+xdistance}  
        	
        if(JSYDistance != '')
          {topposition=y+JSYDistance}
        else
        	{topposition=y+ydistance}  
    
        if (document.all) {
                document.all.ticker.style.posLeft=leftposition
                document.all.ticker.style.posTop=topposition
                document.all.tickerbg.style.posLeft=leftposition
                document.all.tickerbg.style.posTop=topposition
                tickerbg.innerHTML=messagebackground
        document.all.ticker.style.visibility="visible"
        document.all.tickerbg.style.visibility="visible"
                showticker()
        }
        if (document.layers) {
        document.ticker.left=leftposition
                document.ticker.top=topposition
                document.tickerbg.left=leftposition
                document.tickerbg.top=topposition
                document.tickerbg.document.write(messagebackground)
                document.tickerbg.document.close()
        document.ticker.visibility="visible"
        document.tickerbg.visibility="visible"
                showticker()
        }
}

function handlerMM(e){
        x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
        y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}

if (document.layers){
        document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

// - End of JavaScript - -->
