
/*
Original script author below, modified by JN
Pausing updown message scroller- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
Terms Of Use, visit http://www.dynamicdrive.com
*/

//configure the below five variables to change the style of the scroller
var scrollerdelay='10000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='425px'
var scrollerheight='50px'
var scrollerbgcolor='#333333'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var messages=new Array()
messages[0]="<table cellspacing=0 cellpadding=0 border=0><tr>"
messages[0]+="<td width=140 valign=top style=\"color:#FFFFFF; vertical-align:top;\"><a href=http://www.rubberslug.com/board/showthread.asp?T=1812&P=0 class=other>No-Tolerance Policy</a><br>Dec 3 06</td>"
messages[0]+="<td width=15></td><td valign=top width=270 style=\"color:#FFFFFF; vertical-align:top;\">Mods are now enforcing no-sales policy for galleries. Shop with improved functionality open to all soon.</td>"
messages[0]+="</tr></table>"

messages[1]="<table cellspacing=0 cellpadding=0 border=0><tr>"
messages[1]+="<td width=140 valign=top style=\"color:#FFFFFF; vertical-align:top;\"><a href=http://www.rubberslug.com/board/showthread.asp?T=1723&P=0 class=other>Law of the Land</a><br>Sep 10 06</td>"
messages[1]+="<td width=15></td><td valign=top width=270 style=\"color:#FFFFFF; vertical-align:top;\">RS Policy: No sales are allowed inside your personal galleries, blogs, or anywhere except the for sale page. Click for the open community letter.</td>"
messages[1]+="</tr></table>"


///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",scrollerdelay)
setTimeout("move2(document.main.document.second)",scrollerdelay)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",scrollerdelay)
setTimeout("move1(document.main.document.first)",scrollerdelay)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",scrollerdelay)
setTimeout("move4(second2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=parseInt(scrollerheight)
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",scrollerdelay)
setTimeout("move3(first2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=parseInt(scrollerheight)
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

 /***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
//var document.getElementById("dhtmltooltip")=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
//var document.getElementById("dhtmltooltip") = document.getElementById("dhtmltooltip");

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") document.getElementById("dhtmltooltip").style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") document.getElementById("dhtmltooltip").style.backgroundColor=thecolor
document.getElementById("dhtmltooltip").innerHTML=thetext;
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<document.getElementById("dhtmltooltip").offsetWidth)
//move the horizontal position of the menu to the left by it's width
document.getElementById("dhtmltooltip").style.left=ie? ietruebody().scrollLeft+event.clientX-document.getElementById("dhtmltooltip").offsetWidth+"px" : window.pageXOffset+e.clientX-document.getElementById("dhtmltooltip").offsetWidth+"px"
else if (curX<leftedge)
document.getElementById("dhtmltooltip").style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
document.getElementById("dhtmltooltip").style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<document.getElementById("dhtmltooltip").offsetHeight)
document.getElementById("dhtmltooltip").style.top=ie? ietruebody().scrollTop+event.clientY-document.getElementById("dhtmltooltip").offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-document.getElementById("dhtmltooltip").offsetHeight-offsetypoint+"px"
else
document.getElementById("dhtmltooltip").style.top=curY+offsetypoint+"px"
document.getElementById("dhtmltooltip").style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
document.getElementById("dhtmltooltip").style.visibility="hidden"
document.getElementById("dhtmltooltip").style.left="-1000px"
document.getElementById("dhtmltooltip").style.backgroundColor=''
document.getElementById("dhtmltooltip").style.width=''
}
}

document.onmousemove=positiontip



function initJS() {
		startscroll();
}

window.onload=initJS

