//writes out list of dj mixes
//some in line styles used 
function writeLists()
{
for(i=0;i<arguments.length;i++)
	{  
	thisList=arguments[i];
	
	document.write('<ol>')
	for(j=0;j<eval(thisList).length;j++)
		{ 	document.write('<li class="trackListing">'+eval(thisList)[j]+'</li>');
//			thisListItem=eval(thisList)[i];
//			for(k=0;k<thisListItem.length;k++)
//			{ document.write('<li>'+thisListItem[k]+'</li>')}
			
		}
	document.write('</ol>') 
 	}

}


//where I'm rockin
theClub=['<a href="http://www.redandblackbar.com" class="announceLink">The Red and The Black</a> with <a href="http://www.myspace.com/adonisdecay" class="announceLink">Adonis Decay</a> and <a href="http://www.myspace.com/anothersideofsilence" class="announceLink">Another Side of Silence</a>'];

datez=['November 24, 2006'];

dayz=['Sun','Mon','Tues','Wednes','Thurs','Fri','Satur'];

var also='';


//date stuff

function dates()
{
i=0;
today=new Date();
rightnow=today.getTime();


for(i=0;i<(datez.length+1);i++)
{
next=new Date(datez[i]);
rightnext=next.getTime();
onedaydiff=1000*60*60*24;
if((rightnow-rightnext)< onedaydiff){
//alert('Congrats! '+datez[i]+' hasn\'t passed');
	document.getElementById('announce').innerHTML= 'Oops';
	break;}
else{document.getElementById('announce').style.visibility= 'hidden';}
}

daysLeft= Math.ceil((next.getTime() - today.getTime())/86400000);


//alert(daysLeft);

if(daysLeft>=14){document.title=' S A C R I F O R C E / T minus '+daysLeft; pluralize='s';bgCol='yellow';fgCol='#444444';addressYou=''; timeLeft='on '+dayz[new Date(datez[0]).getDay()]+'day, '+datez[0];  };

if((daysLeft<14)&&(daysLeft>7)){document.title=' S A C R I F O R C E / T minus '+daysLeft; pluralize='s';bgCol='yellow';fgCol='#444444';addressYou=''; timeLeft='a week from this '+dayz[next.getDay()]+'day'; };

if((daysLeft<=7)&&(daysLeft>1)){document.title=' S A C R I F O R C E / T minus '+daysLeft; pluralize='s';bgCol='yellow';fgCol='#444444';addressYou=''; timeLeft='this  '+dayz[next.getDay()]+'day.';};

if(daysLeft==1){document.title=' S A C R I F O R C E / T minus '+daysLeft; pluralize='';bgCol='orange';fgCol='black';addressYou=''; timeLeft=' tomorrow night'+addressYou }

if(daysLeft==0){document.title=' S A C R I F O R C E / T O N I G H T :.';addressYou='';bgCol='red';fgCol='#ffffff';timeLeft='tonight'+addressYou}




// if there's more than one booking at any given time
if(datez.length>1)  {
upcoming=new Date(datez[i+1]); 

timeBetween=Math.ceil((upcoming.getTime(datez[i+1])-next.getTime())/86400000);
if(timeBetween>1){plu='s';}else{ plu=''; }
if(i+1==datez.length){
also='<span style=" line-height: 14px;font-size:12px; color: #442222; text-transform: uppercase"><br>Hail Satan. Shaitan Akbar.</span>'; 
mainAlert='Sacriforce destroys '+theClub[i]+' <span style="font-size: 24px;  font-weight: bolder; color: black">'+timeLeft+also+'</span><br>';}
else {	
also='<span style=" line-height: 14px;font-size:12px; color: #442222; text-transform: uppercase"><br>The pain returns '+timeBetween+' day'+plu+' later to '+theClub[i+1]+'. Hail Satan. Shaitan Akbar.</span>';
mainAlert='Sacriforce destroys<br>'+theClub[i]+'<br><span style="font-size: 24px;  font-weight: bolder; color: black">'+timeLeft+also+'</span><br>';}
}
else
{
also='<span style=" line-height: 14px;font-size:12px; color: #442222; text-transform: uppercase"><br>Hail Satan. Shaitan Akbar.</span>'; 
mainAlert='Sacriforce destroys<br>'+theClub[i]+'<br><span style="font-size: 24px;  font-weight: bolder; color: black">'+timeLeft+also+'</span><br>';
}
//
document.getElementById('announce').style.visibility="visible";
document.getElementById('announce').innerHTML= mainAlert;

//extra shit






// HANDLES FOREGROUND + BACKGROUND COLORS
//document.getElementById('announce').style.backgroundColor=bgCol;
//document.getElementById('announce').style.color=fgCol;

}



