// JavaScript Document

// This function chooses from consecutively-numbered random images numbered 01 through the number defined by imgCount.
// To expand to the set of images: (1) save additional 171 x 134 pixel images in /images/photos, named pg_pics_NN.jpg,
// where NN is a two-digit consecutive number; (2) change the value of imgCount in the script below to reflect the new
// number of images. This should correspond with the the highest numbered image.

function randomImage()
{
  var imgCount = 20; // Change the value after the equals sign to reflect the number of available images.
  var r;
  r = randomNumber(imgCount)+1;
  if (r > 9) {
	  document.write('<img src="/images/photos/pg_pics_'+r+'.jpg" alt="[Youth photo]" width="171" height="134">')
	  } else {
	  document.write('<img src="/images/photos/pg_pics_0'+r+'.jpg" alt="[Youth photo]" width="171" height="134">')};
}

// This function chooses from consecutively-numbered random quotes, numbered 0 through the number defined by quoteCount.
// To expand to the set of quotes: (1) insert additional quotes at the end of the list--follow the example and increment
// each quote by 1; (2) change the value of quoteCount in the script below to reflect the new number of quotes. This
// should be equal to the highest-numbered quote plus 1 (since the numbers for the list of quotes starts at 0).

function randomQuote()
{
	var quoteCount = 23; // Change the value after the equals sign on this line to reflect the number of available quotes.
	                     // This value should be one greater than the highest-numbered quote (since numbering starts at 0).
	var r;
//store the quotes in an array
	quotes = new Array(23);
	quotes[0] = "AYPF publications are invaluable and have real reach rather than being limited to parochial youth issues.";
	quotes[1] = "The information on programs and results helps shape ideas that I convey to other staff and the mayors we serve.";
	quotes[2] = "The networking and community building on each AYPF field trip strengthens the work we do for children.";
	quotes[3] = "I would definitely recommend an AYPF trip to colleagues.  Exposure to new ideas and a wide range of thinking is stimulating!  The trips that I have attended have offered excellent learning opportunities.";
	quotes[4] = "Thank you for the opportunity to take this trip and to meet others who are concerned with these issues.  It is too easy to get stuck in one little corner of the school reform box and forget all the other components.";
	quotes[5] = "The events are outstanding!  There is no other venue for obtaining this type of information... always of high quality.";
	quotes[6] = "AYPF gets me inside schools and programs in a way that allows me to ask policy-related questions and hear the questions others are asking.";
	quotes[7] = "AYPF brings forth issues of major concern and allows persons from various professions the opportunity to come together to hear and debate these issues.";
	quotes[8] = "The forums are a great service to the DC policy community.  The guests are always well regarded and knowledgeable.";
	quotes[9] = "I enjoy the trips AYPF plans for congressional staffers and other colleagues.  They have broadened my awareness and kept me informed.";
	quotes[10] = "For the past ten years I have used the Forum as a policy training ground for myself and my staff.  The trips and the Forums have provided us all with invaluable information and experiences.  The publications have been distributed widely to state policy makers.";
	quotes[11] = "One of the intangible benefits that's gained from AYPF trips is the ability for Republican and Democrat staff to sit down in a non-partisan arena to discuss policy issues.  The field trips give staff time to get to know each other and develop friendships outside of work.  It is much easier to go to conference on bills when you have spent time with the 'other side.'";
	quotes[12] = "Through AYPF, many of us who are usually confined to Washington have had the opportunity to get out and actually visit real programs, to see real success stories.  When we cannot travel outside of the Washington area, AYPF brings the experts, program operators, and youth who have benefited from successful programs to us, through the Policy Forum lunches, symposiums, and reports.  Without this interaction with the 'real world' I am convinced that many misguided policy decisions would be reached.";
	quotes[13] = "AYPF is an invaluable resource, convener and facilitator in the policy discussion and information sharing.";
	quotes[14] = "It is not often that we in Washington have such a valuable resource&nbsp;- one that is non-partisan, that both Republicans and Democrats alike can trust to give an objective look at what works and what does not in the area of youth policy and programs.  AYPF covers a wide range of issues, without any particular ideological agenda.";
	quotes[15] = "I value the professionalism and dedication of the staff, participant preparedness for the forums and accuracy of the information.";
	quotes[16] = "AYPF does a fabulous job of offering a mix of experiences that informs, provokes thought, builds relationships, and reminds policy wonks of the reasons they come to work in the mornings and put up with all the frustrations that are inherent in our jobs.";
	quotes[17] = "AYPF forums, publications and events provide an incredible source of information for the education community.";
	quotes[18] = "No matter how much one reads, seeing is always better.  The events offered by AYPF truly bring much needed practical information into the fold.";
	quotes[19] = "[AYPF events] provide balanced, in-depth discussions on emerging and current issues....";
	quotes[20] = "[AYPF] brought the abstract concept of high school redesign down to a concrete example that could be shared with legislators and staff.";
	quotes[21] = "If not for AYPF, many of the national youth issues would not see the light of day.";
	quotes[22] = "Your publications are invaluable and have real reach, rather than being limited to parochial youth issues.";
// Add additional quotes here. For example
//	quotes[23] = "AYPF's web site is an incredible resource for our organization.";
	
//calculate a random index
	r = randomNumber(quotes.length);
	
//display the quote
	document.write("\"" + quotes[r] + "\"");
}

// Both the randomImage and randomQuote functions use this function to generate a random number.

function randomNumber(limit){
  return Math.floor(Math.random()*limit);
}

// The MM_ functions were generated by Dreamweaver to support Behaviors

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_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_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];}
}

