// JavaScript Document		
<!--
var content1='<a href="http://sdcswingersevents.com" target="_new"><img src="images/test/sdcenprimaverabanner_400x70.jpg" border="0" alt="TravelSDC Blog" /></a>';
var content2='<a href="http://travelsdc.com/desire/desire_resort_and_spa.aspx" ><img src="images/test/desire_cancun.jpg" border="0" alt="Earn cash now" /></a>';
var content3='<a href="http://www.clubscash.com" ><img src="images/test/clubscash.jpg" border="0" alt="Earn cash now" /></a>';
var content4='<a href="http://swingersclublist.com/sponsors.html" ><img src="images/banners/scl-sponsorship.jpg" border="0" alt="Place your banner here!!!" /></a>';  

var marqueecontent=content2+content3+content4;

var copyspeed=2; // speed of ticker - lower = slower

copyspeed=(document.all)? copyspeed : Math.max(1, copyspeed-1) //slow speed down by 1 for NS as it runs faster than ie...

var tickerWidth = 480; // ticker width 
var tickerHeight = 60; // ticker height 

// global variables 
var actualWidth=''; 
var jsMarquee1; 
var jsMarquee2; 
var div1Interval = 0; 
var div2Interval = 0; 
var timeToStartSecond= new Array(8) 
var div1Status = 0; 
var div2Status = 0; 

document.write('<span id="temp" style="visibility:hidden;position:absolute;left:-5000px;">'+marqueecontent+'</span>'); // used to determine initial content width 
document.write('<span id="temp2" style="visibility:hidden;position:absolute;left:-5000px;"></span>'); // used later to calculate the new width of the content 

function populate(){ 
actualWidth=document.getElementById("temp").offsetWidth; 
actualWidthTemp=document.getElementById("temp").offsetWidth; 

// first DIV 
jsMarquee1=document.getElementById('marquee1'); 
jsMarquee1.style.left=parseInt(tickerWidth)+"px"; 

// second DIV 
jsMarquee2=document.getElementById('marquee2'); 
jsMarquee2.style.left=parseInt(tickerWidth)+"px"; 

if(actualWidth <= (tickerWidth*2)){ 

var tempContent; 
tempContent = ""//"<nobr>"; 

// make sure that the div is larger than the ticker area 
// if not, duplicate the content 
while (actualWidth < (tickerWidth*2)){ 
tempContent = tempContent + marqueecontent; 
actualWidth = actualWidth + actualWidthTemp; 
} 
tempContent = tempContent + "</nobr>" 

// load the content into the divs 
jsMarquee1.innerHTML=tempContent; 
jsMarquee2.innerHTML=tempContent; 

// get the new actual width of the content 
document.getElementById("temp2").innerHTML=tempContent; 
actualWidth = document.getElementById("temp2").offsetWidth; 

}else{ 
// load the content into the divs 
jsMarquee1.innerHTML="<nobr>"+marqueecontent+"</nobr>"; 
jsMarquee2.innerHTML="<nobr>"+marqueecontent+"</nobr>"; 
} 

timeToStartSecond=(tickerWidth-actualWidth); 
startMarquee();
} 


function scrollMarquee(){ 
if ((parseInt(jsMarquee1.style.left)>(actualWidth*(-1)))){ 
jsMarquee1.style.left=parseInt(jsMarquee1.style.left)-copyspeed+"px"; 

// call function to begin the second DIV 
if(parseInt(jsMarquee1.style.left) < timeToStartSecond && div1Status == 0){ 
div1Status = 1; 
div2Status = 0; 
beginSecondMarquee(); 
} 
}else{ 
//resets the div to it's original location 
document.getElementById("marquee1").style.left = parseInt(tickerWidth)+"px"; 
//clear the interval and stop animation 
div1Interval = window.clearInterval(div1Interval); 
} 
} 

function scrollSecondMarquee(){ 
if (parseInt(jsMarquee2.style.left)>(actualWidth*(-1))){ 
jsMarquee2.style.left=parseInt(jsMarquee2.style.left)-copyspeed+"px"; 

// call function to restart the first DIV 
if(parseInt(jsMarquee2.style.left) < timeToStartSecond && div2Status == 0){ 
div1Status = 0; 
div2Status = 1; 
startMarquee(); 
} 
}else{ 
//resets the div to it's original location 
document.getElementById("marquee2").style.left = parseInt(tickerWidth)+"px"; 
//clear the interval and stop animation 
div2Interval = window.clearInterval(div2Interval); 
} 
} 

/* begins the second marquee */ 
function beginSecondMarquee(){ 
div2Interval = window.setInterval("scrollSecondMarquee()",20); 
} 

/* begins the first marquee */ 
function startMarquee(){ 
div1Interval = window.setInterval("scrollMarquee()",20); 
} 

document.write('<div style="position:relative;width:'+tickerWidth+'px;height:'+tickerHeight+'px;overflow:hidden">'); 
document.write('<div style="position:absolute;width:'+tickerWidth+'px;height:'+tickerHeight+'px" onMouseover="copyspeed=0" onMouseout="copyspeed='+copyspeed+'">'); 
document.write('<div id="marquee1" style="position:absolute;left:0px;top:0px;"></div>'); 
document.write('<div id="marquee2" style="position:absolute;left:0px;top:0px;"></div>'); 
document.write('</div>'); 
document.write('</div>'); 
window.onload=populate;
-->
