<!--
//check browser, taken from 
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
var galleryMode=false;
var req=new Object();
var portal="./portal"
var currentLink;
var qsChange=new Object();


if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);
 function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

//end browser check

//-->

function PageQuery(q) {
	
	//q = q.split("?")[1];
	//alert(q);
	if(q != null && q.length > 1) this.q = q.substring(0, q.length);
	else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i];
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {

		for(var j=0; j < this.keyValuePairs.length; j++) {
		//alert(this.keyValuePairs[j]);
			if(this.keyValuePairs[j].split("=")[0] == s)
				return this.keyValuePairs[j].split("=")[1];
		}
		return false;
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; }	
}
function queryString(key){
var page = new PageQuery(window.location.search); 
return unescape(page.getValue(key)); 
}
function displayItem(key){
if(queryString(key)=='false') 
{
alert("you didn't enter a ?name=value querystring item.");
}else{
alert(queryString(key));
}
}

function setPage()
{
	
	var a = setPage.arguments;

	if ((a[0]) != null){
		hashListener.setHash(a[0]); 
	}
}



hashListener.onHashChanged = function () {
	
	setContent(document.location.hash);
	 
};

function mergeLinks(query){
	
	var refquery=new PageQuery(document.location.hash.substr(1));
	var currentquery=new PageQuery(query);
	var size, scheme, page
	var allkeys;
	var  currentkeys;
	var newquery=new Object();
	//add all keys from ref to allkeys
	allkeys=refquery.getParameters();
	currentkeys=currentquery.getParameters();
	//add keys from current keys to allkeys if not present in refquery
	var counter;
	counter=allkeys.length;
	
	for(i=0;i<currentkeys.length;i++){
		if(refquery.getValue(currentkeys[i])==false){
			allkeys[counter]=currentkeys[i];
			counter++
		}
	}
	
	qsChange=new Object();

	for(i=0;i<allkeys.length;i++){
		if(refquery.getValue(allkeys[i])=="" && currentquery.getValue(allkeys[i])==""){
			newquery[allkeys[i]]=querydefaults[allkeys[i]];
			qsChange[allkeys[i]]=true;
		} 
		else if(refquery.getValue(allkeys[i])!="" && currentquery.getValue(allkeys[i])==""){
			newquery[allkeys[i]]=refquery.getValue(allkeys[i])
			//alert(refquery.getValue(allkeys[i])+", "+i);
			if(query==""){
				qsChange[allkeys[i]]=true;
			}
			else{
				qsChange[allkeys[i]]=false;
			}
		}
		else{
			newquery[allkeys[i]]=currentquery.getValue(allkeys[i])
			if(refquery.getValue(allkeys[i])== currentquery.getValue(allkeys[i])){
				qsChange[allkeys[i]]=false;
			}
			else{
				qsChange[allkeys[i]]=true;
			}
		}
	}
	
	return newquery;
}

function setContent( hash )
{ 
	  //alert('content: '+ hash.substring(1));
	 if(hash!="#"){
		 
		 var page = new PageQuery(hash.substring(1));
		 
		 if(qsChange["menucat"]){
			//update menu 
			
			if (page.getValue("menucat")=="menu_trigger")
			{ 
				readFile(portal+"/content.aspx?requestType=atomic-fail-over&id="+page.getValue("page")+"&node=menucat","menu_trigger");
				
			}
			else
			{
			
			readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("menucat"),"menu");
			
			}
		 }
		if(qsChange["id"]){
			//update menu 
			readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("id")+"&title=false","gallerycont");
		 }
		 if(qsChange["cat"]){
			//update menu 
			readFile(portal+"/content.aspx?requestType=complex&id=category&term="+page.getValue("cat"),"thumbs");
			
		 }
		 if(qsChange["page"]){
			
			//update menu 
			//readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("page")+"&title=title","cont_titlebox");
			readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("page"),"cont");
			//readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("page")+"&title=sub","cont_sub");
			//readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("menucat")+"&title=main","menu");
			readFile(portal+"/content.aspx?requestType=atomic-fail-over&id="+page.getValue("page")+"&node=rightbanner","rightbanner");
			readFile(portal+"/content.aspx?requestType=atomic-fail-over&id="+page.getValue("page")+"&node=leftbanner","leftbanner");
			readFile(portal+"/content.aspx?requestType=atomic-fail-over&id="+page.getValue("page")+"&node=bannertext","bannertext");
		 	//readFile(portal+"/content.aspx?requestType=atomic-fail-over&id="+page.getValue("page")+"&node=banner","banner");
		 }
		  if(qsChange["find"]){
			  var title = document.getElementById("cont_titlebox");
			  title.innerHTML = "SEARCH RESULTS: "+page.getValue("find").substring(0, 9)+"...";
			  //readFile(portal+"/content.aspx?requestType=page&id="+page.getValue("page")+"&title=title","cont_titlebox");
		  readFile(portal+"/content.aspx?requestType=complex&id=content&term="+page.getValue("find"), "cont_main");
		  }
		
	
		  if( browser == "Internet Explorer" )
		  {
			correctPNG();
		  }
	}
}
function isParent()
{
	return false;
}
function ulRecur()
{
	var a= ulRecur.arguments;
	if (a[0].parentNode != null && a[0].parentNode.parentNode != null&&a[0].className!="makeMenu")
		ulRecur(a[0].parentNode.parentNode)
	else	
		return;
		//a[0].parentNode.style.fontWeight="bold";
	
		/*if (a[0].parentNode.getElementsByTagName('SPAN')[0])
				{	
					a[0].parentNode.getElementsByTagName('SPAN')[0].style.backgroundImage = "url(images/menu_indicator.jpg)"; 
				}*/
	a[0].className="CSStoShow";
}
function menuRecur()
{
	var a= menuRecur.arguments;

	if (a[0].parentNode.parentNode != null)
		ulRecur(a[0].parentNode.parentNode)
	else	
		return;
	if (a[0].parentNode.getElementsByTagName("UL")[0])
	{ 
		a[0].parentNode.getElementsByTagName("UL")[0].className="CSStoShow";
	}
	/*if (a[0].parentNode.getElementsByTagName('SPAN')[0])
				{	
					a[0].parentNode.getElementsByTagName('SPAN')[0].style.backgroundImage = "url(images/menu_indicator.jpg)"; 
				}*/
	a[0].parentNode.style.fontWeight="bold";
	a[0].parentNode.parentNode.parentNode.style.fontWeight="bold";
}
function readFile(url, type)
{
	
		  
  if(window.ActiveXObject){
  //alert("bugger");
    req[type] = new ActiveXObject("Microsoft.XMLHTTP");
  }
  else{
      req[type] = new XMLHttpRequest(); 
  }
 
  req[type].open("GET",url,true);
	req[type].onreadystatechange=function(){
		if (req[type].readyState == 4 && req[type].status == 200)
		{
			contentDiv = document.getElementById(type);
			if(req[type].responseText){
				if (type =="rightbanner" || type =="leftbanner")
				{
					contentDiv.style.backgroundImage = "url(images/"+type+"/"+req[type].responseText+")";
				}
				else if (type =="menu_trigger")
				{
					
					var page = new PageQuery(document.location.hash.substring(1))
					
					if (req[type].responseText != page.getValue("menucat"))
						{
							//alert(req[type].responseText+","+page.getValue("menucat"));
							newhash="menucat="+req[type].responseText+"&page="+page.getValue("page")
							
							//setPage(newhash)
							readFile(portal+"/content.aspx?requestType=page&id="+req[type].responseText+"&title=title","menuheader");		
							readFile(portal+"/content.aspx?requestType=page&id="+req[type].responseText+"&title=main","menu");
						}
				}
				else{
					
					contentDiv.innerHTML=req[type].responseText;
					if (type =="menu")
					{
						//alert('changing menu: '+contentDiv.innerHTML);
						var mnu=contentDiv.getElementsByTagName("A");
						var currpage = new PageQuery(document.location.hash.substring(1));
						var temppage;
						//alert(document.getElementById('menu').innerHTML);
						for (i=mnu.length-1; i>-1; i--)
						{
								
							temppage = new PageQuery(mnu[i].href.substring(mnu[i].href.indexOf("?") + 1));
							//alert(temppage.getValue("page"));
							if (temppage.getValue("page") == currpage.getValue("page"))
							{
								menuRecur(mnu[i]);
								break;
							}
						}
						
						
						
						
					}
					if(contentDiv.style.display=="none"){
						contentDiv.style.display="";
						contentDiv = document.getElementById("cont_main");
						contentDiv.className="hasWidth";
						
					}
				}
				newHeight=document.getElementById("menu").offsetHeight+20;
				document.getElementById("cont_left").style.paddingTop=newHeight+"px";
				init();
				
			}
			else{
				
				contentDiv.style.display="none";
				contentDiv = document.getElementById("cont_main");
				contentDiv.className="";
			}
		
		}
	}
  
  //req.open("GET",url,false);
  req[type].send(null);
  //return req.responseText;
}

function readFileNA(url, type)
{

		  
  if(window.ActiveXObject){
  //alert("bugger");
    reqNA = new ActiveXObject("Microsoft.XMLHTTP");
  }
  else{
      reqNA = new XMLHttpRequest(); 
  }
 
  reqNA.open("GET",url,false);
  
  //req.open("GET",url,false);
  reqNA.send(null);
  return reqNA.responseText;
}

function pageReady(){
	return 0;
	if (req[type].readyState==4)
  {
  // if "OK"
  if (req[type].status==200)
    {
		
    	contentDiv = document.getElementById('cont');
		contentDiv.innerHTML=req[type].responseText;		
		
		var ran_number=Math.round(Math.random()*12);
		
    }
  else
    {
    //alert("Error processing request, try again later");
    }
  }
}

function bannerReady(){
	return 0;
	if (req.readyState==4)
  {
  // if "OK"
  if (req.status==200)
    {
		semaphore = 0;
		contentDiv = document.getElementById('banner');
    	contentDiv.style.backgroundImage=req.responseText;
		
    }
  else
    {
    	alert("bannererror");
    }
  }
}
function changeSize(){
	return 0;
	contentDiv =document.getElementById("cont");
	
	classes=contentDiv.className;
	classArray=classes.split(' ');
	num=classArray[0].charAt(classArray[0].length -1);
	num=(num % 3)+1;
	classArray[0]="size"+num;
	
	contentDiv.className=classArray[0] +" "+classArray[1];
	return classArray[0];
}

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
			 
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }

function openGallery(){
	winref=window.open('gallery.asp','popup', 'width=700, height=680 resize=false');
winref.document.title="Philadelphia Fire Department Photo Gallery";
}


function activate() {

try {

		//get li parent
		liParent=this.parentNode;
		//get ul parent
		ulGrandparent=liParent.parentNode;

		//get all li decendents of Grandparent and set fontweight to normal
		liGrandChildren=ulGrandparent.getElementsByTagName("LI");
		aList=ulGrandparent.getElementsByTagName("a");
		for(j=0;j<aList.length;j++){
			aList[j].style.textDecoration='none';

			aList[j].className = '';
			if (aList[j].parentNode)
			aList[j].parentNode.className = '';

			}
		for(i=0;i<liGrandChildren.length;i++){
		if (liGrandChildren[i].parentNode.parentNode.tagName=="LI")
		{
			liGrandChildren[i].style.fontWeight='normal';

		}
			//set all ul children class to normal
			for( x = 0; liGrandChildren[i].childNodes[x]; x++ )
			{
				if( liGrandChildren[i].childNodes[x].tagName == 'UL')
				{
				  liGrandChildren[i].childNodes[x].className ='';

				}

			}
		}



		liParent.style.fontWeight='bold';

		if (liParent.parentNode.parentNode.tagName=="LI")
			this.style.textDecoration='underline';
		else
		{

			this.parentNode.className = "CSStoHighlight";

		}


		//set liParent's ul children to show
		for( x = 0; liParent.childNodes[x]; x++ )
		{
			if( liParent.childNodes[x].tagName == 'UL')
			{
			  liParent.childNodes[x].className += (liParent.childNodes[x].className?' ':'') + 'CSStoShow';

			}
		}
		//alert(document.getElementById("menu").offsetHeight);




	}
	catch(e) {}
		return false;

}

function init() {
var height=document.getElementById("menu").offsetHeight;

var height1=height +20;


document.getElementById("cont_left").style.paddingTop=height1+"px";

var al = document.getElementsByTagName("A");
	for ( i=0; i<al.length; i++) {
		
		//var page = new PageQuery(al[i].href);
			
		if (al[i].parentNode.tagName == "LI")
		{

			al[i].onmouseup=activate;
			al[i].onkeydown=activate;

			if(al[i].href==window.location.href)
			{
				
				try {
				 	thisNode = al[i];
					
					liParent = thisNode.parentNode;
					var children = liParent.childNodes;
					
					//set liParent's ul children to show
					for( x = 0; liParent.childNodes[x]; x++ )
					{
						if( liParent.childNodes[x].tagName == 'UL')
						{
						  liParent.childNodes[x].className += (liParent.childNodes[x].className?' ':'') + 'CSStoShow';
						}
					}		
					
					//set grandparent ul to show
					ulGrandparent = liParent.parentNode;
					ulGrandparent.className += (ulGrandparent.className?' ':'') + 'CSStoShow';
					
					//set greatgreatgrandparent UL to show
					ulGGGrandparent = ulGrandparent.parentNode.parentNode;
					ulGGGrandparent.className += (ulGrandparent.className?' ':'') + 'CSStoShow';
					
					//SET FONT STYLE
					liParent.style.fontWeight='bold';

					if (liParent.parentNode.parentNode.tagName=="LI")
						this.style.textDecoration='underline';
					else
					{

						this.parentNode.className = "CSStoHighlight";

					}					
					
				}catch(e){}
	
			}

		}

	}

}



function boxboy()
{

	box=document.getElementById("boxboy")
	window.location=box.options[box.selectedIndex].value;
}

function mainbuttonSet()
{
	var par = document.getElementById("menu_buttons");
	var ar = par.getElementsByTagName("span");
	for (i=0; i<ar.length;i++)
		ar[i].className = "";
	mainbuttonSet.arguments[0].className = "down";

}

function swap(button)
{
	var child=button.parentNode.getElementsByTagName("UL")[0];

	if(child.className=="show"){
		child.className="hide";
	}
	else{
		child.className="show";
	}
}

/***************************************************************************************/
/*   News Features  */


var imageURL=new Array();var captions=new Array();

imageURL[0]='images/slideshowimg/grad07_feature.jpg';
captions[0]=' <strong>Graduation Exercises for Class 07-01</strong><br><a href="images/slideshowimg/grad07.jpg">Click to view larger photo</a><BR>';
			
imageURL[1]='images/slideshowimg/CJOGROUP.jpg';
captions[1]='Wilfredo Rojas, Director of CJO, is MC for the PPS retirement banquet of 2006.';
			
imageURL[2]='images/slideshowimg/pulaski1.jpg';
captions[2]='The PPS Honor Guard marching in the Pulaski Day Parade.';
			
imageURL[3]='images/slideshowimg/PPSCookOff_feature.jpg';
captions[3]='Staff who participated in the first annual PPS cook-off 2007.';
			
imageURL[4]='images/slideshowimg/PPSCookOff_table_feature.jpg';
captions[4]='Employees sampling the food at the first annual PPS cook-off.  A good time was had by all!';
			
imageURL[5]='images/slideshowimg/CFCFwinners_feature.jpg';
captions[5]='The 2007 winning team in the PPS cook-off representing Curran - Fromhold Correctional Facility!';
			
imageURL[6]='images/slideshowimg/softball_staffandfamily_feature.jpg';
captions[6]='PPS staff and family enjoying the game at the 4th Annual Michael Hyrnko Softball Tournament of 2007.';
			
imageURL[7]='images/slideshowimg/softball_hocteam_feature.jpg';
captions[7]='One of the teams that participated in the 4th Annual Michael Hyrnko Softball Tournament,  representing the House of Correction!';
			
imageURL[8]='images/slideshowimg/softball_brockfarrelandgordon_feature.jpg';
captions[8]='Deputy Commissioner Brockenbrough, Majors\' Farrel and Gorden cheering on their teams!';
			
imageURL[9]='images/slideshowimg/emply_banquet_staff_feature.jpg';
captions[9]='PPS staff enjoying themselves at the annual banquet that recognizes the Employee of the Year, in 2007!';
			
imageURL[10]='images/slideshowimg/emply_banquet_CFCF_feature.jpg';
captions[10]='CFCF\'s Warden Clyde Gainey and some of his staff at the annual Employee of the Year Banquet of 2007.';
			
imageURL[11]='images/slideshowimg/asian_syed_feature.jpg';
captions[11]='Police Captain Khalid Mohammed Syed was keynote speaker at our first annual PPS Asian Heritage Celebration on August 17, 2007';
			
imageURL[12]='images/slideshowimg/asian_foodandstaff_feature.JPG';
captions[12]='About 100 PPS staff of Asian origin gathered for the Asian Heritage Celebration and enjoyed a wide varity of Asian cuisine!';
			
imageURL[13]='images/slideshowimg/asian_ohandabello _feature.JPG';
captions[13]='In attendance, Philadelphia attorney David Oh, who spoke words of encouragement to the audience, seen here with Capt. Abello to the right.';
			
imageURL[14]='images/slideshowimg/Asian_layannadance_feature.jpg';
captions[14]='A big PPS \"thanks\" goes out to the Layanna School of Dance, who entertained us with a beautiful ethnic dance performance.';
			
imageURL[15]='images/slideshowimg/asian_dancers.jpg';
captions[15]='More entertainment from the Layanna School of Dance!';
			
imageURL[16]='images/slideshowimg/asian_dancers2.jpg';
captions[16]='More of the dance routine from the Layanna School of Dance!';
			
imageURL[17]='images/slideshowimg/asian_cuisine.jpg';
captions[17]='There was plenty of food for everyone at the first annual Asian Heritage Celebration!';
			
imageURL[18]='images/slideshowimg/columbus_honorguard_feature.jpg';
captions[18]='PPS Honor Guard preparing for the Columbus Day Parade 2007.';
			
imageURL[19]='images/slideshowimg/columbus_staff_feature.jpg';
captions[19]='Prison staff lining up for the start of the Columbus Day parade!';
			
imageURL[20]='images/slideshowimg/columbus_march_feature.jpg';
captions[20]='PPS Honor Guard takes their position in anticipation of marching in this great Philadelphia Parade!';

imageURL[21]='images/slideshowimg/columbus_erica_feature.jpg';
captions[21]='PPS staff with Erica Mendez, who is the granddaughter of Wilfredo Rojas, the Director of Community Justice & Outreach.  The very talented Erica sang Coro Mio Ben (which means My Dear Beloved) at the 2007 Columbus Day Parade.';
			
imageURL[22]='images/slideshowimg/puertorican_pps_feature.jpg';
captions[22]='The Philadelphia Prison System prepares to march in the Puerto Rican Day Parade 2007.';

imageURL[23]='images/slideshowimg/puertorican_ppsstaffmarch_feature.jpg';
captions[23]='Puerto Rican Day Parade 2007 - PPS staff take their places in the march!';

imageURL[24]='images/slideshowimg/puertorican_corrofficers_feature.jpg';
captions[24]='The Correctional Officers who participated in this year\'s Puerto Rican Day Parade!';

imageURL[25]='images/slideshowimg/puertorican_ppsproud_feature.jpg';
captions[25]='Philadelphia Prison Systems Honor Guard doing their thing and making us proud !';

imageURL[26]='images/slideshowimg/puertorican_ppshonorguard_feature.jpg';
captions[26]='PPS Honor Guard representing us at Puerto Rican Day Parade 2007!';

imageURL[27]='images/slideshowimg/puertorican_kellyweaver_feature.jpg';
captions[27]='Correctional Officers Kelly & Weaver lead the contingent during the Puerto Rican Day Parade 2007!';

imageURL[28]='images/slideshowimg/puertorican_marcher_feature.jpg';
captions[28]='The PPS marchers in the Puerto Rican Day Parade 2007 prepare to perform for the television audience, led by Erica Mendez, a 15 year old vocal major student at the Philadelphia High School for Creative and Performing Arts.  She is the granddaughter of Wilfredo Rojas, the Director of Community Justice & Outreach at the Prisons.';

imageURL[29]='images/slideshowimg/puertorican_performing_feature.jpg';
captions[29]='The beautiful Erica Mendez performing at the Puerto Rican Day Parade 2007, representing the Philadelphia Prisons System.  She sang Verde Luz (which means Green Light).';

imageURL[30]='images/slideshowimg/puertorican_ppsparticipants_feature.jpg';
captions[30]='The Philadelphia Prison Systems participants in the Puerto Rican Day Parade 2007!';

imageURL[31]='images/slideshowimg/retirement_banquet_07_1.jpg';
captions[31]='Warden Giorla and staff enjoying themselves at the Philadelphia Prisons Retirement Banquet 2007.';

imageURL[32]='images/slideshowimg/retirement_banquet_07_2.jpg';
captions[32]='Deputy Commissioners Tomaszewski & Brockenbrough along with Chief of Staff Mike Resnick presenting well-wishes to Mike Long with his retirement!';

imageURL[33]='images/slideshowimg/retirement_banquet_07_3.jpg';
captions[33]='More well-wishes to our retirees from Deputy Commissioners Tomaszewski & Brockenbrough along with our Chief of Staff Mike Resnick!';

imageURL[34]='images/slideshowimg/retirement_banquet_07_4.jpg';
captions[34]='The food was delicious at the Philadelphia Prisons Retirement Banquet 2007!';

imageURL[35]='images/slideshowimg/retirement_banquet_07_5.jpg';
captions[35]='A group shot of our honorees - \" The Philadelphia Prison System Salutes you All\"';

imageURL[38]='images/slideshowimg/retirement_banquet_07_6.jpg';
captions[38]='The top brass of the Philadelphia Prison System send out a heart felt thanks to the folks from Community Justice & Outreach along with the volunteers who made the 2007 retirement banquet a success!';

imageURL[39]='images/slideshowimg/PRparadeawards07-02.jpg';
captions[39]='The Philadelphia Prison System marched in the 2007 Puerto Rican Day Parade and won 1st place in the nonprofit category! Here we have Wilfredo Rojas, the Director of Community Justice and Outreach and his granddaughter Erica Mendez accepting the trophy on behalf of the PPS. (This is the 2nd first place finish for the PPS in 4 years.)';

imageURL[40]='images/slideshowimg/PRparadeawards07-01.jpg';
captions[40]='Here\'s another photo of our trophy with Wilfredo Rojas and his granddaughter Erica Mendez who performed for the PPS in the Puerto Rican Day Parade 2007.';

var top = imageURL.length-1;
var count = 1;
			
function changeImage1(){
  
	count=count+1;
	if(count<0)
      		count=top;
  	else if(count>top)
  		count=0;
    document.getElementById("myImage").src=imageURL[count];
    document.getElementById("img_caption").innerHTML=captions[count];
    
}
		  
function changeImage2()
{	
		
	count=count-1;  
	if(count<0)
      		count=top;
  	else if(count>top)
  		count=0;

 document.getElementById("myImage").src=imageURL[count];
 document.getElementById("img_caption").innerHTML=captions[count];

}

//preloads all news images
function preload(){
	var i, pic;
	
	for (i=0;i<imageURL.length;i++){
		pic = new Image(); 
		pic.src = imageURL[i];
	}
}

/***************************************************************************************/

function popRedirect(url) {
	var strURL = "http://www.phila.gov/redirect/redirect.asp?url=" + url;
	window.open( strURL,"Redirected from www.phila.gov","status=0,height=600,width=400,resizable=1");
}
