var CUR_PAGE;

// change delay time in seconds 

var timeDelay = 2; 

// change picture file names 
var Pix = new Array 
("images/tim_horton_logo.gif" 
,"images/eastsidemarios_logo.jpg"
,"images/barrhaven_logo.gif" 
,"images/adidas_logo.gif" 
,"images/mcdonalds_logo.gif" 
,"images/law18_logo.gif" 
,"images/bell_logo.gif" 
//,"images/shiners_logo.gif" 
,"images/csa_mini_bmo_logo.gif" 
,"images/algonquin_logo.gif" 
,"images/filosofi_logo.gif" 
,"images/tourette_logo.gif" 
,"images/shoelessjoes_logo.gif" 
,"images/tobacco_free_logo.gif"
,"images/kumon_logo.gif" );

//,"images/afore_logo.gif" 
//,"images/breconridge_logo.gif" 
//,"images/surgenor_logo.gif" 
//,"images/bugs_logo.gif" 
//,"images/tidemini_logo.jpg" 
//,"images/tide_logo.gif" 
//,"images/cibc_logo.gif" 
//,"images/sunnyd_logo.jpg" 
//,"images/littlechips_logo.gif" 
//,"images/dundee_logo.gif" 
//,"images/sylvan_logo.gif" 
//,"images/sun_rpe_logo.gif" 
//,"images/bearpaws_logo.gif" 
//,"images/sony_logo.gif" 
//,"images/tekk_logo.gif" 


// do not change below here 
timeDelay *= 1000; 
var PicCurrentNum = 0; 



function switchTab(name, num)
{

	var l = document.images.length

	for(var i =0; i < l; i++)
    {
	var n = document.images[i].name
		if (n!="")
		//	alert(n)
	document.images[i].src = "images/" + n + "_0.gif";
		
	}
	
	document.images[name].src = "images/" + name + "_" + num + ".gif";
	
	parent.frames[1].location="http://www.nepeansoccer.ca/" + "left_" + name + ".htm"  ;
}

function printWeatherTab()
{
//	document.write("<iframe marginheight='0' marginwidth='0' name='wxButtonFrame' id='wxButtonFrame' height='86' src='http://btn.weather.ca/weatherbuttons/template3.php?placeCode=CAON0512&category0=Cities&containerWidth=150&	btnNo=4982&backgroundColor=blue&multipleCity=0&citySearch=1&celsiusF=C' align='top' frameborder='0' width='150' scrolling='no'></iframe>");
	document.write("<iframe marginheight='0' marginwidth='0' name='wxButtonFrame' id='wxButtonFrame' height='80' src='http://btn.weather.ca/weatherbuttons/template1.php?placeCode=CAON0512&category0=Cities&containerWidth=150&	btnNo=4984&backgroundColor=clouds&multipleCity=0&citySearch=1&celsiusF=C' align='top' frameborder='0' width='150' scrolling='no'></iframe>");

}

function printSideTab()
{

        startPix();

	document.write("<div class='div_class2'>");
	document.write("<a href='sponsors.htm' class='noline'><img border='0' id='ChangingPix' src='images/tim_horton_logo.gif'></a>");
      	document.write("</div>");

        document.write("<div class='div_class1'>");
      	document.write("<font class='text'><span style='background-color: #FFFF00'><b>Quick Links</b></span></font><br>");

//      	document.write("<a href='coaches.htm' id='id0' onMouseOver='javascript:changeTdBg(this.id)' onMouseOut='javascript:changeTdBg(this.id)'  bgcolor='#eeeeee'>House League FAQ</a></font><br>");

	document.write("<font class='text'><a href='hl_faq.htm' class='noline'>House League FAQ</a></font><br>");
      	document.write("<font class='text'><a href='hl_manual.htm' class='noline'>HL Parent Manuals</font></a></font><br>");
      	document.write("<font class='text'><a href='hl_schedules.htm' class='noline'>HL Schedules</a></font><br>");
//      	document.write("<font class='text'><a href='hl_discipline.htm' class='noline'>HL Discipline Procedure</a></font><br>");
      	document.write("<font class='text'><a href='field_maps.htm' class='noline'>Field Maps</a></font><br>");
//      	document.write("<font class='text'><a href='accident_report.htm' class='noline'>Accident Report/Claims</a></font>");
      	document.write("<font class='text'><a href='important_dates.htm' class='noline'>Important Dates</a></font><br>");
      	document.write("<font class='text'><a href='fee_schedule.htm' class='noline'>Registration Fees</font></a></font><br>");
      	document.write("<font class='text'><a href='weather2.htm' class='noline'>Extreme Weather</a></font><br>");
      	document.write("<font class='text'><a href='tax_receipt.htm' class='noline'>Tax Receipts</font></a></font><br>");
      	document.write("<font class='text'><a href='newsletters.htm' class='noline'>Club Newsletters</font></a></font><br>");
      	document.write("<font class='text'><a href='ltpd_news.htm' class='noline'>CSA  LTPD</font></a></font><br>");

      	document.write("</div>");

	document.write("<div class='div_class2'>");
	 document.write("<img src='images/storm_tt_150.jpg'><br>");	
	document.write("<font class='text'><a href='yc_girls_tournament.htm' class='noline'>Girls - </font></a></font><font class='text'><a href='yc_boys_tournament.htm' class='noline'> Boys</font></a></font>");
      	document.write("</div>");

	document.write("<div class='div_class2'>");
	document.write("<a href='online_reg.htm' class='noline'><img border='0' src='images/registration_icon_large.gif'></a>");
      	document.write("</div>");

  	document.write("<div class='div_class2'>");
	document.write("<a href='pdf/OSA Club Excellence Bronze Award Notification.pdf'><img border='0' src='images/ClubExcellence.gif'></a>");
      	document.write("</div>");

  	document.write("<div class='div_class2'>");
	document.write("<a href='http://www.truesportpur.ca/en/home'><img border='0' src='images/ts_lives_logo.gif'></a>");
      	document.write("</div>");

  	document.write("<div class='div_class2'>");
	document.write("<a href='ltpd_news.htm' class='noline'><img border='0' src='images/csa_ltpd.gif'></a>");
      	document.write("</div>");

      document.write("<div class='div_class3'>");
        document.write("<font class='text'><b>Nepean City Soccer Club</b><br>250-B Greenbank Road<br>Suite 221,<br>Ottawa, Ontario, K2H 8X4<br>Tel: (613)  288-2160<br><a href='mailto:%61%64%6d&#105%6e%40%6ee%70ea%6e%73&#111c&#099%65%72.c&#097'>Email  <img src='images/mailto_icon.gif' alt='Email the Club'  border=0></a></font></div>");

        document.write("<div class='div_class2'>");
        document.write("<img src='images/pdf.gif'> PDF files require<br>Adobe Reader<br><a href='http://www.adobe.com/products/acrobat/readstep2.html'target='_blank' ><img src='images/getreader.gif' border='0' alt='Download Adobe Reader for Free' width='88' height='31'></a></div>");

        document.write("<div class='div_class3'>");
        document.write("<font face='Arial, Helvetica, sans-serif' size='1'>Comments or Questions<br>about this web site?<br>Contact the <a href='mailto:dg&#111%6cd%6ee&#121%40sy%6d%70at%69c%6f&#046&#099%61'>Webmaster</a></font></div>");

}

function popup(url,h,w)
     {
       var options = "width=" + w + ",height=" + h + ",toolbars=0,menubar=0,resizable,location=0,scrollbars=yes,top=50,left=50";
       popupw=window.open(url,"Announcement",options);
       popupw.focus();
     }
	 
	 
function popupUrl(url,h,w)
     {
       var options = "width=" + w + ",height=" + h + ",toolbars=2,menubar=2,resizable,location=2,scrollbars=yes,top=50,left=50";
       popupw=window.open(url,"Announcement",options);
       popupw.focus();
     }

function changeTdBg(id)
	{
	if (document.all[id].bgColor=='#eeeeee')
		document.all[id].bgColor='#FFFFCA';
	else 
		document.all[id].bgColor='#eeeeee';
		
	}
	
function switchColor(name, num)
{


    document.images[name].src = "images/" + name + "_" + num + ".gif";
}

  function GetDay(intDay){
    var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", 
                         "Thursday", "Friday", "Saturday")
    return DayArray[intDay]
    }

  function GetMonth(intMonth){
    var MonthArray = new Array("January", "February", "March",
                               "April", "May", "June",
                               "July", "August", "September",
                               "October", "November", "December") 
    return MonthArray[intMonth] 	  	 
    }
  function getDateStrWithDOW(){
    var today = new Date()
    var year = today.getYear()
    if(year<1000) year+=1900
    var todayStr = GetDay(today.getDay()) + ", "
    todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
    todayStr += ", " + year
    return todayStr
    }


function startPix() { 
  setInterval("slideshow()", timeDelay); 
} 

function slideshow() { 
  PicCurrentNum++; 
  if (PicCurrentNum == Pix.length) { 
    PicCurrentNum = 0; 
  } 
  document.getElementById('ChangingPix').src = Pix[PicCurrentNum]; 
} 
