<!-- hide script from old browsers

function PopWindow (url) { 
var prams = 'menubar=0,location=0,resizable=1,scrollbars=1,width=600,height=550';
newWin = window.open(url,'',prams);
newWin.focus();
return;}



function popUp(url) 
{
 var width  = 920;
 var height = 570;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUpS(url) 
{
 var width  = 920;
 var height = 570;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}


function popUp1(url) 
{
 var width  = 750;
 var height = 540;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp2(url) 
{
 var width  = 600;
 var height = 375;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=auto';
 params += ', scrollbars=auto';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp3(url) 
{
 var width  = 760;
 var height = 575;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=auto';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp4(url) 
{
 var width  = 760;
 var height = 750;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp4b(url) 
{
 var width  = 750;
 var height = 850;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}
function popUp4c(url) 
{
 var width  = 840;
 var height = 615;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp4s(url) 
{
 var width  = 760;
 var height = 750;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp5(url) 
{
 var width  = 300;
 var height = 300;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp5b(url) 
{
 var width  = 400;
 var height = 400;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp7(url) 
{
 var width  = 410;
 var height = 450;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp7b(url) 
{
 var width  = 420;
 var height = 500;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp6(url) 
{
 var width  = 650;
 var height = 600;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}


function popUpCardV(url) 
{
 var width  = 315;
 var height = 435;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUpCardH(url) 
{
 var width  = 435;
 var height = 315;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp8(url) 
{
 var width  = 850;
 var height = 550;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=yes';
 params += ', menubar=yes';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=yes';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname8', params);
  if (window.focus) {newwin.focus()}
 return false
}

function popUp9(url) 
{
 var width  = 920;
 var height = 770;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=yes';
 params += ', menubar=yes';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=yes';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname9', params);
 
 if (window.focus) {newwin.focus()}
 return false
}

function popUp9r(url) 
{
 var width  = 800;
 var height = 770;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=yes';
 params += ', menubar=yes';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=yes';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname9r', params);
 
 if (window.focus) {newwin.focus()}
 return false
}

function popUp10(url) 
{
 var width  = 1000;
 var height = 1000;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}

function popUp11(url) 
{
 var width  = 1020;
 var height = 670;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false
}


/* Created by: Ultimater, Mr J :: http://www.webdeveloper.com/forum/showthread.php?t=77389 but modified for UWGT*/



function toggleArrow(a, b){
  var e=document.getElementById(a);
  var f=document.getElementById(b);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block";
	f.src="http://www.unitedwaytoronto.com/images/common/arrowDown.gif";
  } else {
    e.style.display="none";
	f.src="http://www.unitedwaytoronto.com/images/common/arrow.gif";

  }
  return true;
}

//This function turns all the red hidden areas ON when there are more than half of the "Sections" are ON.  It turns them all OFF if more than half of the "Sections" are currently ON.
//The number of "Sections" is passed in variable b.
function toggleAll(a,b){
	var obj=a;
	var noOfSections=b;
	var currentSection;
	var currentSectionArrow;
	var numON=0;
	var turnON=false;

	for (i = 1; i < noOfSections+1; i++) {
		currentSection = document.getElementById(obj + i);
		//alert(obj + i);
		if(currentSection.style.display=="block"){
			numON++;
			//alert('numON = ' + numOn);
		}
		
	}
	//alert('hi lisa');
	if (numON <= (noOfSections*.5)) {
		//alert("less than half, so turn them all on");
		turnON=true;	
	}
	else {
		turnON=false;	
	}

	for (i = 1; i < noOfSections+1; i++) {
  		//alert('inside the for loop');
		currentSection = document.getElementById(obj + i);
  		currentSectionArrow = document.getElementById("arrow" + i);

		  if(turnON==true){
			currentSection.style.display="block";
			currentSectionArrow.src="http://www.unitedwaytoronto.com/images/common/arrowDown.gif";
		  } else if(turnON==false){
			currentSection.style.display="none";
			currentSectionArrow.src="http://www.unitedwaytoronto.com/images/common/arrow.gif";
			//document.getElementById('sectionA7').style.backgroundColor ="#ffffff"; 

		  }
		  //return true;
	 }
	 return true;

}
function goToAndOpenSection(a,b,c){
	var section=a;
	var number=b;
	var point=c;
	//alert (section+number);
	if(document.getElementById(section+number).style.display=="none"){
		toggleArrow(section+number, 'arrow'+number);
	}
	 
	//alert('still going');
	document.getElementById('input'+point).focus();
	document.getElementById('section'+point).style.backgroundColor ="#eeeeee"; 
	}
// end hiding script from old browsers -->

//Rollover image javascript (for buttons)
<!--
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];}
}
//-->
//Rollover nav on tabs (Sept 08)
<!--

//-->

<!-- Copyright 2006 Bontrager Connection, LLC
// 25mar2010 LH - to pass email sign up to newsletter subscription page

// Put JavaScript somewhere below the form.
//

// The function that does the work.
function FillForm() {

//
// To customize your form, specify form's name 
//   between the quotes on the next line.
var FormName = "xxx";

// Find the location of the ? in the URL.
var questionlocation = location.href.indexOf('?');

// If no ?, return out of the function.
if(questionlocation < 0) { return; }

// Assign the text following the ? to variable q
// The text might look something like (just an example):
//   name=will%20%22B%22&email=will%40example.com&fun=yes
var q = location.href.substr(questionlocation + 1);

// Split q on & characters and assign to array variable list.
// (In other words, chop the string at each & character 
//    and store the pieces in an array variable named list.)
// The array elements, using the above example, are:
//      name=will%20%22B%22
//      email=will%40example.com
//      money=enough
var list = q.split('&');

// For each element of array list, execute the {} block.
for(var i = 0; i < list.length; i++) {

   // Split the list array element on = character and 
   //   assign the pieces to array variable kv.
   // kv[0] will then contain the field name and kv[1] 
   //   will contain the field value.
   var kv = list[i].split('=');

   // If the form does not have a field name kv[0], 
   //   go to the top of the {} loop and continue there.
	if(! eval('document.'+FormName+'.'+kv[0])) { continue; }

   // Convert %##'s to the actual characters.
   //    will%20%22B%22 becomes: will "B"
   //    will%40example.com becomes: will@example.com
   kv[1] = unescape(kv[1]);

   // If value kv[1] contains a " character, execute the 
   //   {} loop.
   // (The " character needs to be escaped because the 
   //   value in the eval() function below uses " for field 
   //   value delimiters.)
   if(kv[1].indexOf('"') > -1) {

      // Assign a regular expression to variable re. The 
      //   expression looks for all " characters.
      var re = /"/g;

      // In kv[1], replace each " character with: \"
      // (The \ itself needs to be escaped here.)
      kv[1] = kv[1].replace(re,'\\"');
      }

   // Create an evaluation expression for the eval() 
   //   function that assigns the value kv[1] to the 
   //   form field kv[0].
   eval('document.'+FormName+'.'+kv[0]+'.value="'+kv[1]+'"');
   }

// end of function
}

// Execute the above function to pre-fill in the form fields.
FillForm();

//-->


