function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//table section
function incReturn(theText){
	return "<img src='/images/system/Black_British/british_american_"+theText+".gif' border='0'>"	
}
function printTable(thisSection){
	switch(thisSection)
	{
		case 'home':   var theX = 65;var theW = 59;var theC = 'fc0019';tdHome.innerHTML = "<a href='/index.html'>"+incReturn("r3_c2_f2")+"</a>";break
		case 'news':   var theX = 144;var theW = 55;var theC = 'ff9900';tdNews.innerHTML = "<a href='/news'>"+incReturn("r3_c4_f2")+"</a>"; break
		case 'members':   var theX = 220;var theW = 75;var theC = '00ad4e';tdMembers.innerHTML = "<a href='/members/search.asp'>"+incReturn("r3_c6_f2")+"</a>"; break
		case 'events':   var theX = 316;var theW = 63;var theC = '00a0c6';tdEvents.innerHTML = "<a href='/events'>"+incReturn("r3_c9_f2")+"</a>"; break
		case 'businesses':   var theX = 399;var theW = 84;var theC = 'Ba00ff';tdBusinesses.innerHTML = "<a href='/businesses'>"+incReturn("r3_c11_f2")+"</a>"; break
		case 'celebs':   var theX = 504;var theW = 104;var theC = '005e9d';tdCelebs.innerHTML = "<a href='/celebs'>"+incReturn("r3_c13_f2")+"</a>"; break
		case 'links':   var theX = 629;var theW = 55;var theC = 'ff007e';tdLinks.innerHTML = "<a href='/links'>"+incReturn("r3_c15_f2")+"</a>"; break
		case 'about':   var theX = 705;var theW = 61;var theC = '084081';tdAbout.innerHTML = "<a href='/about'>"+incReturn("r3_c17_f2")+"</a>"; break
		default:   var theX = 65;var theW = 59;var theC = 'fc0019';      
	}
	if(thisSection!="false"){
		document.write("<table width='775' height='2' cellspacing='0' cellpadding='0' border='0'><tr><td width='"+(theX)+"' bgcolor='#"+(theC)+"' height='2'><img src='/images/transparent.gif' height='2' width='"+(theX)+"'></td><td width='"+(theW)+"' bgcolor='#FFFFFF' height='2'><img src='/images/transparent.gif' height='2' width='"+(theW)+"'></td><td width='"+(775 - (theW + theX))+"' bgcolor='#"+(theC)+"' height='2'><img src='/images/transparent.gif' height='2' width='"+(775 - (theW + theX))+"'></td></tr></table>")
	}
	else{
		document.write("<table width='775' height='2' cellspacing='0' cellpadding='0' border='0'><tr><td width='775' bgcolor='#fc0019' height='2'><img src='/images/transparent.gif' height='2' width='775'></td></tr></table>")
	}
}

//World Times
function textDay(weekDay){
   var textDay;
   if (weekDay == 0){ textDay = "Sun"; }
   if (weekDay == 1){ textDay = "Mon"; }
   if (weekDay == 2){ textDay = "Tue"; }
   if (weekDay == 3){ textDay = "Wed"; }
   if (weekDay == 4){ textDay = "Thu"; }
   if (weekDay == 5){ textDay = "Fri"; }
   if (weekDay == 6){ textDay = "Sat"; }
   return textDay;
}

function worldTimes(){
   var local = new Date();
   var UCT;
   var localOffset;
   var startDST;
   var endDST;

   var London;
   var Reading;

   var LondonOffset = + 0;
   var ReadingOffset = - 5;

   //This sets localOffset to the number of minutes difference
   //between local time and UCT
   localOffset = local.getTimezoneOffset();
   //Convert localOffset to milliseconds
   localOffset = localOffset * 60 * 1000;

   //Make 'UCT' a number, instead of a date variable.
   UCT = local - 1;

   //adjust for localOffset
   UCT = UCT + localOffset;

   //Convert UCT back into a date variable
   UCT = new Date(UCT);

   //figure out Daylight Saving Time info
   //Reading DST
   startDST = new Date("4/1/" + UCT.getFullYear());
   endDST = new Date("11/1/" + UCT.getFullYear());
   while(startDST.getDay() != 0){
      startDST = startDST - 1;
      startDST = new Date(startDST + 60 * 60 * 1000);
   }
   while(endDST.getDay() != 0){
      endDST = endDST - 1;
      endDST = new Date(endDST - 60 * 60 * 1000);
   }
   if ((UCT >= startDST) && (UCT < endDST)){
      ReadingOffset = ReadingOffset + 1;
   }

   //London DST
   startDST = new Date("3/27/" + UCT.getFullYear());
   endDST = new Date("10/30/" + UCT.getFullYear());
   while(startDST.getDay() != 0){
      startDST = startDST - 1;
      startDST = new Date(startDST - 60 * 60 * 1000);
   }
   while(endDST.getDay() != 0){
      endDST = endDST - 1;
      endDST = new Date(endDST - 60 * 60 * 1000);
   }
   if ((UCT >= startDST) && (UCT < endDST)){
      LondonOffset = LondonOffset + 1;
   }

   //Get world times
   Reading = UCT - 1;
   Reading = new Date(Reading + (ReadingOffset * 60 * 60 * 1000));
   London = UCT - 1;
   London = new Date(London + (LondonOffset * 60 * 60 * 1000));
   if(London.getDate() == Reading.getDate()){
   		timeDisplay.innerHTML = "<strong><img src='/images/ukflag_sm.gif' align='absmiddle' hspace='5'>London:</strong> "+showTime(London,'partial')+" <strong><img src='/images/usflag_sm.gif' align='absmiddle' hspace='5'>New York:</strong> "+showTime(Reading,'partial')+" | <B>"+showTime(Reading,'none')+"</b>";
   }
   else{
   		timeDisplay.innerHTML = "<strong><img src='/images/ukflag_sm.gif' align='absmiddle' hspace='5'>London:</strong> "+showTime(London,'full')+" | <strong><img src='/images/usflag_sm.gif' align='absmiddle' hspace='5'>New York:</strong> "+showTime(Reading,'full');
   }
   setTimeout('worldTimes()', 60000);
}

function showTime(dateTime,clauses){
   var ampm;
   var x;
   var y;
   var hours;
   var minutes;
   var seconds;
   var weekDay;
   hours = dateTime.getHours();
   minutes = dateTime.getMinutes();
   seconds = dateTime.getSeconds();
   weekDay = dateTime.getDay();
   dmonth = dateTime.getMonth();
   ddate  = dateTime.getDate();
   //Hours
   ampm = 'AM';
   if (hours == 0){
      hours = 12;
   }
   if (hours > 12){
      ampm = 'PM';
      hours -= 12;
   }
   //Minutes
   if (minutes < 10){
      minutes = '0' + minutes;
   }
   //Seconds
   if (seconds < 10){
      seconds = '0' + seconds;
   }
   //
   switch(dmonth)
        {
            case 0:
                strMonth = "Jan"
                break;
            case 1:
                strMonth = "Feb"
                break;
            case 2:
                strMonth = "Mar"
                break;
            case 3:
                strMonth = "Apr"
                break;
            case 4:
                strMonth = "May"
                break;
            case 5:
                strMonth = "Jun"
                break;
            case 6:
                strMonth = "Jul"
                break;
            case 7:
                strMonth = "Aug"
                break;
            case 8:
                strMonth = "Sep"
                break;
            case 9:
                strMonth = "Oct"
                break;
            case 10:
                strMonth = "Nov"
                break;
            case 11:
                strMonth = "Dec"
                break;
        }

        // Get Suffix of date (th, rd, st)
        switch(ddate)
        {
            case 1,21,31:
                strSuffix = "st";
                break;
            case 2,22:
                strSuffix = "nd";
                break;
            case 3,23:
                strSuffix = "rd";
                break;
            default:
                strSuffix = "th";
                break;
        }
		switch(clauses){
				case 'full':
					return hours + ':' + minutes + ' ' + ampm + ' ' + textDay(weekDay)+ ", "+strMonth+" "+ddate+strSuffix;
					break;
				case 'none':
					return  textDay(weekDay)+ ", "+strMonth+" "+ddate+strSuffix;
					break;
				default:
					return hours + ':' + minutes + ' ' + ampm;
					break;
		}
}

//begin_poll
var polls="<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\"><form action=\"/polls/vote.asp\" method=\"post\"><tr><td colspan=\"2\"><strong>Do you think America is ready for a Black President?</strong></td></tr><tr><td valign=\"top\"><input type=\"radio\" name=\"question_id\" value=\"25\"></td><td valign=\"top\">Yes. America is ready to make REAL change.</td></tr><tr><td valign=\"top\"><input type=\"radio\" name=\"question_id\" value=\"26\"></td><td valign=\"top\">Not sure. </td></tr><tr><td valign=\"top\"><input type=\"radio\" name=\"question_id\" value=\"27\"></td><td valign=\"top\">No. For the majority, it would be too hard to handle.</td></tr><tr><td>&nbsp;</td><td><input type=\"submit\" name=\"submit\" value=\"vote\" class=\"leftButton\"></td></tr><tr><td>&nbsp;</td><td>. <a href=\"/polls/index.asp?poll_id=5\">view results</a></td></tr><input type=\"hidden\" name=\"poll_id\" value=\"5\"></form></table>"
//end_poll