function stayTunedChecker(){
var emailAddress = document.getElementById('email').value;
	if(emailAddress!==""){
	re=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
		if(re.test(emailAddress)){return true}
	window.alert(emailAddress + " does not look like an email address to me.\nPlease try again?");
	document.getElementById('email').focus();
	document.getElementById('email').select();
	return false;
	}
}




var blackArrow = new Image(10, 10);
var blueArrow = new Image(10, 10);
var pictureOne = new Image();
var pictureTwo = new Image();
var pictureThree = new Image();
var pictureFour = new Image();
var pictureFive = new Image();
var pictureSix = new Image();
var pictureSeven = new Image();
var pictureEight = new Image();
var pictureNine = new Image();
blackArrow.src="/images/blackArrow.gif";
blueArrow.src="/images/blueArrow.gif";
pictureOne.src = "/images/imageOne.jpg";
pictureTwo.src = "/images/imageTwo.jpg";
pictureThree.src = "/images/imageThree.jpg";
pictureFour.src = "/images/imageFour.jpg";
pictureFive.src = "/images/imageFive.jpg";
pictureSix.src = "/images/imageSix.jpg";
pictureSeven.src = "/images/imageSeven.jpg";
pictureEight.src = "/images/imageEight.jpg";
pictureNine.src = "/images/imageNine.jpg";

VTplayers = new Array (pictureOne.src, pictureTwo.src, pictureThree.src, pictureFour.src, pictureFive.src, pictureSix.src, pictureSeven.src, pictureEight.src, pictureNine.src);
thisImage = 0;
imageCount = VTplayers.length;

function rotate(){
 
 thisImage++;
  if(thisImage == imageCount){
  thisImage = 0}
document.getElementById('VTmusicians').src = VTplayers[thisImage];
window.setTimeout("rotate()", 4 *1000);
}


function theMonth(index){
var month = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
return month[index];
}
function showDate(){
today= new Date();
var thisDay;
var thisMonth;
var state;
thisDay = today.getDate();

if (thisDay == 1 ||thisDay == 21 || thisDay == 31){state = "st"}
	else {if(thisDay == 2 || thisDay == 22){state = "nd"}
	     else {if(thisDay == 3 ||thisDay == 23) {state = "rd"}
		      else{ state = "th"
			  }
		 }
	}
thisMonth = today.getMonth();
thisMonth = theMonth(thisMonth);
document.write( "<p style='font-family:arial;font-size:11px'>" + thisDay + state + " " + thisMonth + "</p>");
}

var activeMenu="";

function action(text){
text.style.color ='#333399';
text.style.backgroundColor = '#FFFF99';
}
function quiet(text){
text.style.color ='#0000FF';
text.style.backgroundColor = '#FFFFFF';
}
function action2(text){
text.style.color ='#0000FF';

}
function quiet2(text){
text.style.color ='#000000';

}

function getObject(M){
obj = "document.getElementById(\"" + M + "\").style";
obj=eval(obj);
return;
}
function clipMenu(M, t, r, b, l){
 var str = navigator.appVersion;
 var browser = str.match("MSIE 8.0");
 if (browser == "MSIE 8.0"){
  getObject(M); 
  obj.clip = "rect(" + t + "px, " + r + "px, " + b + "px, " + l + "px )"
  }

 else if (document.all){
 getObject(M);
 obj.clip="rect(" + t + " " + r + " " + b + " " + l + ")";
 }
 else{
 getObject(M);
 obj.clip = "rect(" + t + "px, " + r + "px, " + b + "px, " + l + "px )";
 }
}

function hideMenu(M){
	if (activeMenu!==""){
	clipMenu(activeMenu, 0,150,50,0);
	activeMenu="";
	getObject(M);
	obj.color='#000000';
	}
}
function pullMenu(M){
getObject(M);
obj.color='#0000FF';
 hideMenu();
 clipMenu(M, 0, 150, 600, 0);
 activeMenu=M;
}

function showEvent(n){
if(n==1) document.getElementById('eventInfo').innerHTML ="Persuasive Percussion<br />Meadowbank Estate 7pm";
if(n==2) document.getElementById('eventInfo').innerHTML ="Persuasive Percussion<br />Home Hill Winery 11am";
if(n==3) document.getElementById('eventInfo').innerHTML ="Persuasive Percussion<br />Barringwood Park 5pm";
if(n==4) document.getElementById('eventInfo').innerHTML ="Brandenburg<br />Meadowbank Estate 7pm";
if(n==5) document.getElementById('eventInfo').innerHTML ="Brandenburg Cascades 11am<br /> Vivaldi at St Helens 6pm";
if(n==6) document.getElementById('eventInfo').innerHTML ="Brandenburg <br />Freycinet Lodge 3:30pm";

if(n==7) document.getElementById('eventInfo').innerHTML ="AGM contact Virtuosi<br /> for details.";
	
	
	
	
	
	}
function deleteEvent(n){
if(n==1 || n==2 || n==3 || n==4 || n==5 ||n==6 || n==7) document.getElementById('eventInfo').innerHTML ="<br /><br />";

}


// function becomes a method for each month object
function getFirstDay(theYear, theMonth){
    var firstDate = new Date(theYear,theMonth,1);
    return firstDate.getDay() + 1;
}
// number of days in the month
function getMonthLen(theYear, theMonth) {
    var oneDay = 1000 * 60 * 60 * 24;
    var thisMonth = new Date(theYear, theMonth, 1);
    var nextMonth = new Date(theYear, theMonth + 1, 1);
    var len = Math.ceil((nextMonth.getTime() - 
        thisMonth.getTime())/oneDay);
    return len;
}

// create basic array
theMonths = new MakeArray(12);
// load array with English month names
function MakeArray(n) {
    this[0] = "January"
    this[1] = "February"
    this[2] = "March"
    this[3] = "April"
    this[4] = "May"
    this[5] = "June"
    this[6] = "July"
    this[7] = "August"
    this[8] = "September"
    this[9] = "October"
    this[10] = "November"
    this[11] = "December"
    this.length = n;
    return this;
}
function virtuosi(){
// initialize some variables for later
var today = new Date();
var theDate=today.getDate();
var theYear = today.getFullYear();
var theMonth = today.getMonth(); // for index into our array

// which is the first day of this month?
var firstDay = getFirstDay(theYear, theMonth);
// total number of <td>...</td> tags needed in for loop below
var howMany = getMonthLen(theYear, theMonth) + firstDay;

// start assembling HTML for table
var content = "<table id='calender'>";
// month and year display at top of calendar
content += "<tr style='text-align:center;color:#F00'><td colspan='7'>" + theMonths[theMonth] + " " + theYear + "</td></tr>";
// days of the week at head of each column
content += "<tr style='text-align:center'><td>Su</td><td>M</td><td>Tu</td><td>W</td>";
content += "<td>Th</td><td>F</td><td>Sa</td></tr>";
content += "<tr>";

// populate calendar
for (var i = 1; i < howMany; i++) {
    if (i < firstDay) {
        // 'empty' boxes prior to first day
        content += "<td></td>";
    } else {
        // enter date number
		if((theMonth==9) && (i-firstDay +1 == 9)) {content += "<td class='dateEvent' onmouseover='showEvent(1)'onmouseout='deleteEvent(1)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==9) && (i-firstDay +1 == 10)) {content += "<td class='dateEvent' onmouseover='showEvent(2)'onmouseout='deleteEvent(2)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==9) && (i-firstDay +1 == 11)) {content += "<td class='dateEvent' onmouseover='showEvent(3)'onmouseout='deleteEvent(3)'>" + (i - firstDay + 1) + "</td>"} 
        else if((theMonth==9) && (i-firstDay +1 == theDate)) {content += "<td id='coloredDateToday'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==10) && (i-firstDay +1 == 27)) {content += "<td class='dateEvent' onmouseover='showEvent(4)'onmouseout='deleteEvent(4)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==10) && (i-firstDay +1 == 28)) {content += "<td class='dateEvent' onmouseover='showEvent(5)'onmouseout='deleteEvent(5)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==10) && (i-firstDay +1 == 29)) {content += "<td class='dateEvent' onmouseover='showEvent(6)'onmouseout='deleteEvent(6)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==10) && (i-firstDay +1 == 15)) {content += "<td id='specialDateEvent' onmouseover='showEvent(7)'onmouseout='deleteEvent(7)'>" + (i - firstDay + 1) + "</td>"} 
		else if((theMonth==10) && (i-firstDay +1 == theDate)) {content += "<td id='coloredDateToday'>" + (i - firstDay + 1) + "</td>"} 
		else {content += "<td align='center'>" + (i - firstDay + 1) + "</td>"}
    }
    // start new row after each week
    if (i % 7 == 0 &&  i  != howMany) {
        content += "</tr><tr>"
    }
}

content += "</table>"

return content;
}