
/*

PORTIONS OF THIS SCRIPT ARE BASED ON:

Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact

*/


//Specify the marquee's height
var marqueeheight="23px"

//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2

//configure background color:
var marqueebgcolor="#363636"

//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=0

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var message='<nobr><b><font face="Arial" color="#F0F0F0">'

message = message + ' . . . . . . . . . . . .  Each year more than 70 million decks of cards are sold in the U.S. . . . . . . . . . . . .  Groucho Marx got his name because he carried his poker money in a "grouch bag". . . . . . . . . . . . .  John Montague, Earl of Sandwich, was a man of doubtful integrity and a compulsive gambler who lived in the 1700s. He was so reluctant to leave a card game even for a meal that he had a servant bring him a piece of meat between two slices of bread so he could eat with one hand and play cards with the other. The new invention was dubbed -- a sandwich. . . . . . . . . . . . .  On a deck of cards, the king of spades represents David, King of Israel; the king of Clubs represents Alexander the Great, King of Macedonia; the king of Hearts is Charlemagne, King of France; and the king of Diamonds is Caesar Augustus, Emperor of Rome. . . . . . . . . . . . . ';
message = message + ' The suits in playing cards derive from French influence, and represent the four classes of men: Spades represent nobility, Diamonds represent merchants, Clubs represent peasants, and Hearts the clergy. . . . . . . . . . . . .  Pass the <i>what</i> In card games, sometimes a marker or buck is placed in front of the person who is to deal the next game. Every time the deal passes, players must also "pass the buck" (which explains why the expression "pass the antelope" never really caught on). . . . . . . . . . . . .  When Columbus landed on U.S. shores in 1492, his men plucked wide leaves from trees, marked them with images, and played cards. . . . . . . . . . . . .  Ex-President Richard Nixon won $6000 during his first two months in the U.S. Navy in World War II, playing poker. His winnings were used to fund his first (and successful) campaign for congress. . . . . . . . . . . . . ';
message = message + ' Playing cards were most likely invented in China in 1120 AD and first introduced to Europe in the 1300\'s.';
message = message + ' . . . . . . . . . . . .  A national sport -- 40 to 50 million Americans regularly play poker. That\'s more than one in five. . . . . . . . . . . . .  A gambling pal of actor Samuel Foote once complained that he\'d been thrown out of a second-floor window for cheating in a high-stakes game of poker. When he asked for Foote\'s advice, the response was, "Well... don\'t play so high" . . . . . . . . . . . .  Edmond Hoyle, Poker\'s Great Grandfather? Not exactly. Poker wasn\'t invented until 150 years after he died. His seminal work, A Short Treatise on the Game of Whist (1742), was about whist and whist only. Since his death in 1769, at the age of 97, the name "Hoyle" has been synonymous with precise game playing. To do something "According to Hoyle" means to play completely by the rules, accurately and without mistake. Just to clear up any confusion. . . . . . . . . . . . .  ';
message = message + 'The origin of the name Poker is uncertain. It may come from the German verb pochen, meaning to brag or bluff, and there is an older, German card game similar to poker in that it involved bluffing, called Pochspiel. Another version traces the word to the French poque, also said to have been a card game resembling poker. The earlier version of the game in English was called brag. . . . . . . . . . . . .  ';
message = message + '</font></b></nobr>';


///////////////do not edit below this line////////////////////////////////////////
var ie=document.all
var iedom=document.all||document.getElementById
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns=document.layers

var window_width
var window_height
var marqueewidth

var copyspeed
var pausespeed
var actualwidth=''
var ns_marquee1
var ns_marquee2
var cross_marquee1
var cross_marquee2 
var cross_marquee3


function populate(){

	if (iedom){
		actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
		cross_marquee1=document.getElementById? document.getElementById("iemarquee1") : document.all.iemarquee1
		cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2
		cross_marquee3=document.getElementById? document.getElementById("iemarquee3") : document.all.iemarquee3
		cross_marquee3.style.left=((-1)*Math.round( (parseInt(actualwidth)+8)*Math.random()))+"px" 
		cross_marquee3.innerHTML=message
		setInterval("scrollmarquee_ie()", 25 )
	}
	else if (ns){
		actualwidth=ns_marquee2.document.width
		ns_marquee1=document.ns_marquee
		ns_marquee2=document.ns_marquee.document.ns_marquee2
		ns_marquee2.left=(-1)*Math.round((parseInt(actualwidth)+8)*Math.random())
		ns_marquee2.document.write(message)
		ns_marquee2.document.close()
		setTimeout("window.onresize=regenerate",4000)
		setInterval("scrollmarquee_ns()", 25 )
	}

	positionit()
	setInterval("positionit()",500)
	
}



function scrollmarquee_ie(){

	if (parseInt(cross_marquee3.style.left)>(actualwidth*(-1)-3500)){
		cross_marquee3.style.left=parseInt(cross_marquee3.style.left)-copyspeed+"px"
	}
	else{
		cross_marquee3.style.left=parseInt(marqueewidth)+8+"px"
	}

}


function scrollmarquee_ns(){

	if (ns_marquee2.left>(actualwidth*(-1)-3500)){
		ns_marquee2.left-=(copyspeed*100)
	}
	else{
		ns_marquee2.left=parseInt(marqueewidth)+8
	}

}


function regenerate(){

	window.location.reload()

}


function positionit(){

	window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
	window_height=ieNOTopera? document.body.clientHeight : window.innerHeight
	marqueewidth= window_width + "px"

	var dsocleft=ie? document.body.scrollLeft : pageXOffset
	var dsoctop=ie? document.body.scrollTop : pageYOffset
	var window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
	var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight

	if (iedom){
		cross_marquee1.style.top=parseInt(dsoctop)+parseInt(window_height)-cross_marquee1.offsetHeight
		cross_marquee1.style.width=window_width-parseInt(dsocleft)
		cross_marquee2.style.width=window_width-parseInt(dsocleft)
		cross_marquee3.style.top=2
		
	}
	else if (ns){
		ns_marquee2.top=dsoctop+window_height-ns_marquee1.document.height
		ns_marquee2.left=0

	}

}




/////////////////////////////////////////

window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
window_height=ieNOTopera? document.body.clientHeight : window.innerHeight
marqueewidth= window_width + "px"

marqueespeed=(ie)? marqueespeed : Math.max(1, marqueespeed-1) // slow speed down by 1 for NS
copyspeed=marqueespeed
pausespeed=(pauseit==0)? copyspeed: 0

with (document){
	if (iedom){
		write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-40000px">'+message+'</span>')
		write('<table border="0" cellspacing="0" cellpadding="0"><td>')
		write('<div id="iemarquee1" style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden;z-index:2;">')
		write('<div id="iemarquee2" style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+';z-index:3;" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
		write('<div id="iemarquee3" style="position:absolute;left:0px;top:0px;z-index:4"></div>')
		write('</div></div>')
		write('</td></table>')
	}
	else if (ns){
		write('<table border="0" cellspacing="0" cellpadding="0"><td>')
		write('<ilayer name="ns_marquee" width='+marqueewidth+' height='+marqueeheight+' bgColor='+marqueebgcolor+' style="z-index:2;">')
		write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed style="z-index:3;"></layer>')
		write('</ilayer>')
		write('</td></table>')
	}
}


window.onload=populate

