var n1 = 10;
var n2 = 10;
var n3 = 0;
var newLogo;
var t1, t2, t3, tOther;
function chgOrganizerLogoSize1()
{	   	var loopThis = true;
	   	if(n1 > 30 ){
		   //n1=20;
		   clearTimeout(t1);
		   loopThis=false;
		}
	   	newLogo = "<font style='font-family: \"varsity\", \"broadway\", \"serif\", \"sans-serif\", \"monospace\";color: #E40000;font-size:" + (n1+=1) + "px;margin: 0 0 1em 0;padding: .25em .5em;background-color: #DFE8F6; ' >" + javascriptFunctions.getPhotoAlbumLogo1() + "</font>";
		document.getElementById('blasterLogo').innerHTML= newLogo;
		if(loopThis)
			t1 = setTimeout("chgOrganizerLogoSize1()",30);
		else
			n1 = 0;
		
}
function chgOrganizerLogoSize2()
{	   	var loopThis = true;
	   	if(n2 > 30 ){
		 //  n2=20;
		   clearTimeout(t2);
		   loopThis=false;
		}
	   	newLogo = "<font style='font-family: \"varsity\", \"broadway\", \"serif\", \"sans-serif\", \"monospace\";color: #E40000;font-size:" + (n2+=1) + "px;margin: 0 0 1em 0;padding: .25em .5em;background-color: #DFE8F6; ' >" + javascriptFunctions.getPhotoAlbumLogo2() + "</font>";
		document.getElementById('blasterLogo2').innerHTML= newLogo;
		if(loopThis)
			t2 = setTimeout("chgOrganizerLogoSize2()",30);
		else
			n2 = 0;
}

function startLogoChange()
{
	var loopThis = true;
	if(n3 > 6){
		loopThis = false;
		//n3 = 0;
	}
	chgOrganizerLogoSize1();
	chgOrganizerLogoSize2();
	if(loopThis)
		setTimeout("startLogoChange()",10000);
}

function createDiv(newDivId, parentDivId)
{
	var newDivObj = document.createElement("div");
	newDivObj.setAttribute("id", newDivId);
	newDivObj.style.cssText = "visibility: visible";
	
	document.getElementById(parentDivId).appendChild(newDivObj);
}

function addToPicDiv(picsDivId, innerPicsDivId, numImgs){

	var i;
	
	var addToPicDivObj = document.createElement("div");
	addToPicDivObj.setAttribute("id", innerPicsDivId);
  	addToPicDivObj.style.cssText = "visibility: visible";
  	
  	if(picsDivId != "someName")
  	{
  		var txt = document.createTextNode("Double Click on an Image to Enlarge:");
  		addToPicDivObj.appendChild(txt);
  	}
	document.getElementById(picsDivId).appendChild(addToPicDivObj);
  	
  	var jsonText="";
  	jsonText += "{\"images\":[";
  	
  	if(picsDivId == "Time Trials")
  	{  	  	
  	  	//add each picDiv and image
		for(i=1; i<=271; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/" + picsDivId + "/272.jpg";
		jsonText += "{\"name\":\"272.jpg\",\"shortName\":\"272.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Bridlewood")
	{
		//add each picDiv and image
		for(i=1; i<=424; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/" + picsDivId + "/425.jpg";
		jsonText += "{\"name\":\"425.jpg\",\"shortName\":\"425.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Montclair")
	{
		//add each picDiv and image
		for(i=1; i<=746; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/" + picsDivId + "/747.jpg";
		jsonText += "{\"name\":\"747.jpg\",\"shortName\":\"747.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Family Relay Night")
	{
		//add each picDiv and image
		for(i=1; i<=120; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/" + picsDivId + "/121.jpg";
		jsonText += "{\"name\":\"121.jpg\",\"shortName\":\"121.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Practice")
	{
		//add each picDiv and image
		for(i=1; i<=104; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/" + picsDivId + "/105.jpg";
		jsonText += "{\"name\":\"105.jpg\",\"shortName\":\"105.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "June 13 Pep-Rally")
	{
		//add each picDiv and image
		for(i=1; i<=44; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/45.jpg";	
		jsonText += "{\"name\":\"45.jpg\",\"shortName\":\"45.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Magic Putting Place")
	{
		//add each picDiv and image
		for(i=1; i<=14; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/15.jpg";	
		jsonText += "{\"name\":\"15.jpg\",\"shortName\":\"15.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blaster Images")
	{				
		//add each picDiv and image
		for(i=1; i<=3; i++)
		{
			var tmpUrl = "../images/Blaster Images/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		}  
		tmpUrl = "../images/Blaster Images/4.jpg";
		jsonText += "{\"name\":\"4.jpg\",\"shortName\":\"4.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	    
	}
	else if(picsDivId == "Luau Pep-Rally")
	{
		//add each picDiv and image
		for(i=1; i<=140; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/141.jpg";	
		jsonText += "{\"name\":\"141.jpg\",\"shortName\":\"141.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Kingsbrooke")
	{
		//add each picDiv and image
		for(i=1; i<=108; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/109.jpg";	
		jsonText += "{\"name\":\"109.jpg\",\"shortName\":\"109.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "PJ Pep Rally")
	{
		//add each picDiv and image
		for(i=1; i<=13; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/14.jpg";	
		jsonText += "{\"name\":\"14.jpg\",\"shortName\":\"14.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Annie Shower")
	{
		//add each picDiv and image
		for(i=1; i<=45; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/46.jpg";	
		jsonText += "{\"name\":\"46.jpg\",\"shortName\":\"46.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "9-12 breakfast with the coaches")
	{
		//add each picDiv and image
		for(i=1; i<=2; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/3.jpg";	
		jsonText += "{\"name\":\"3.jpg\",\"shortName\":\"3.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "July 4 picnic")
	{
		//add each picDiv and image
		for(i=1; i<=156; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/157.jpg";	
		jsonText += "{\"name\":\"157.jpg\",\"shortName\":\"157.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Ridgewood")
	{
		//add each picDiv and image
		for(i=1; i<=219; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/220.jpg";	
		jsonText += "{\"name\":\"220.jpg\",\"shortName\":\"220.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Victory Lakes")
	{
		//add each picDiv and image
		for(i=1; i<=69; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/70.jpg";	
		jsonText += "{\"name\":\"70.jpg\",\"shortName\":\"70.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Bowling")
	{
		//add each picDiv and image
		for(i=1; i<=37; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/38.jpg";	
		jsonText += "{\"name\":\"38.jpg\",\"shortName\":\"38.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Ice Cream Social")
	{
		//add each picDiv and image
		for(i=1; i<=77; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/78.jpg";	
		jsonText += "{\"name\":\"78.jpg\",\"shortName\":\"78.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Picture Day")
	{
		//add each picDiv and image
		for(i=1; i<=33; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/34.jpg";	
		jsonText += "{\"name\":\"34.jpg\",\"shortName\":\"34.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Swim A Lap")
	{
		//add each picDiv and image
		for(i=1; i<=17; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/18.jpg";	
		jsonText += "{\"name\":\"18.jpg\",\"shortName\":\"18.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Kingsbrooke_2")
	{
		//add each picDiv and image
		for(i=1; i<=364; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/365.jpg";	
		jsonText += "{\"name\":\"365.jpg\",\"shortName\":\"365.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Victory Lakes_2")
	{
		//add each picDiv and image
		for(i=1; i<=205; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/206.jpg";	
		jsonText += "{\"name\":\"206.jpg\",\"shortName\":\"206.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Pirate and Princess Pep Rally")
	{
		//add each picDiv and image
		for(i=1; i<=38; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/39.jpg";	
		jsonText += "{\"name\":\"39.jpg\",\"shortName\":\"39.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters VS Virginia Oaks")
	{
		//add each picDiv and image
		for(i=1; i<=50; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/51.jpg";	
		jsonText += "{\"name\":\"51.jpg\",\"shortName\":\"51.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Teen Night")
	{
		//add each picDiv and image
		for(i=1; i<=6; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/7.jpg";	
		jsonText += "{\"name\":\"7.jpg\",\"shortName\":\"7.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	
	
	else if(picsDivId == "2008 Divisionals")
	{
		//add each picDiv and image
		for(i=1; i<=100; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/101.jpg";	
		jsonText += "{\"name\":\"101.jpg\",\"shortName\":\"101.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2008 Awards Ceremony")
	{
		//add each picDiv and image
		for(i=1; i<=24; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/25.jpg";	
		jsonText += "{\"name\":\"25.jpg\",\"shortName\":\"25.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Jeremy Linn Clinic")
	{
		//add each picDiv and image
		for(i=1; i<=87; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/88.JPG";	
		jsonText += "{\"name\":\"88.JPG\",\"shortName\":\"88.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Winter Party 09 WARF")
	{
		//add each picDiv and image
		for(i=1; i<=69; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/70.JPG";	
		jsonText += "{\"name\":\"70.JPG\",\"shortName\":\"70.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters evening practice")
	{
		//add each picDiv and image
		for(i=1; i<=51; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/52.JPG";	
		jsonText += "{\"name\":\"52.JPG\",\"shortName\":\"52.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Blasters vs kingsbrooke_09")
	{
		//add each picDiv and image
		for(i=1; i<=631; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/632.JPG";	
		jsonText += "{\"name\":\"632.JPG\",\"shortName\":\"632.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "PJ Pep Rally")
	{
		//add each picDiv and image
		for(i=1; i<=99; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".jpg";
			jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/100.jpg";	
		jsonText += "{\"name\":\"100.jpg\",\"shortName\":\"100.jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "picture night_09")
	{
		//add each picDiv and image
		for(i=1; i<=135; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/136.JPG";	
		jsonText += "{\"name\":\"136.JPG\",\"shortName\":\"136.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "braemar vs ben lomand_09")
	{
		//add each picDiv and image
		for(i=1; i<=475; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/476.JPG";	
		jsonText += "{\"name\":\"476.JPG\",\"shortName\":\"476.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "family relay night_09")
	{
		//add each picDiv and image
		for(i=1; i<=375; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/476.JPG";	
		jsonText += "{\"name\":\"376.JPG\",\"shortName\":\"376.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "blasters practice and micro blasters_09")
	{
		//add each picDiv and image
		for(i=1; i<=111; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/112.JPG";	
		jsonText += "{\"name\":\"112.JPG\",\"shortName\":\"112.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "braemar vs wellington_09")
	{
		//add each picDiv and image
		for(i=1; i<=221; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/222.JPG";	
		jsonText += "{\"name\":\"222.JPG\",\"shortName\":\"222.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Time Trials_09")
	{
		//add each picDiv and image
		for(i=1; i<=380; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/381.JPG";	
		jsonText += "{\"name\":\"381.JPG\",\"shortName\":\"381.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	} 
	else if(picsDivId == "3 men_09")
	{
		//add each picDiv and image
		for(i=1; i<=3; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/4.JPG";	
		jsonText += "{\"name\":\"4.JPG\",\"shortName\":\"4.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	} 
	else if(picsDivId == "2009-06-11 Red White Blue Pep Rally")
	{
		//add each picDiv and image
		for(i=1; i<=93; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/94.JPG";	
		jsonText += "{\"name\":\"94.JPG\",\"shortName\":\"94.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-07 bowling and firecracker relay")
	{
		//add each picDiv and image
		for(i=1; i<=39; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/40.JPG";	
		jsonText += "{\"name\":\"40.JPG\",\"shortName\":\"40.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-07 swim practice - tshirts and tennis shoes")
	{
		//add each picDiv and image
		for(i=1; i<=84; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/85.JPG";	
		jsonText += "{\"name\":\"85.JPG\",\"shortName\":\"85.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-12 blake cash pictures")
	{
		//add each picDiv and image
		for(i=1; i<=27; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/28.JPG";	
		jsonText += "{\"name\":\"28.JPG\",\"shortName\":\"28.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-17 princess and pirate pep rally")
	{
		//add each picDiv and image
		for(i=1; i<=191; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/192.JPG";	
		jsonText += "{\"name\":\"192.JPG\",\"shortName\":\"192.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "princess and pirate pep favorites")
	{
		//add each picDiv and image
		for(i=1; i<=27; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/28.JPG";	
		jsonText += "{\"name\":\"28.JPG\",\"shortName\":\"28.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-17 swim a lap")
	{
		//add each picDiv and image
		for(i=1; i<=47; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/48.JPG";	
		jsonText += "{\"name\":\"48.JPG\",\"shortName\":\"48.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-18 braemar vs dominion valley")
	{
		//add each picDiv and image
		for(i=1; i<=760; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/761.JPG";	
		jsonText += "{\"name\":\"761.JPG\",\"shortName\":\"761.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "2009-07-20 practice - group shots and coaches")
	{
		//add each picDiv and image
		for(i=1; i<=229; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/230.JPG";	
		jsonText += "{\"name\":\"230.JPG\",\"shortName\":\"230.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Ben Lomond")
	{
		//add each picDiv and image
		for(i=1; i<=168; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/169.JPG";	
		jsonText += "{\"name\":\"169.JPG\",\"shortName\":\"169.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "bowling 2")
	{
		//add each picDiv and image
		for(i=1; i<=53; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/54.JPG";	
		jsonText += "{\"name\":\"54.JPG\",\"shortName\":\"54.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "crazy hat pep rally")
	{
		//add each picDiv and image
		for(i=1; i<=89; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/89.JPG";	
		jsonText += "{\"name\":\"89.JPG\",\"shortName\":\"89.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Family Relay Night 2")
	{
		//add each picDiv and image
		for(i=1; i<=332; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/333.JPG";	
		jsonText += "{\"name\":\"333.JPG\",\"shortName\":\"333.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Firecracker Relay")
	{
		//add each picDiv and image
		for(i=1; i<=72; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/73.JPG";	
		jsonText += "{\"name\":\"73.JPG\",\"shortName\":\"73.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Kingsbrooke 2")
	{
		//add each picDiv and image
		for(i=1; i<=143; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/144.JPG";	
		jsonText += "{\"name\":\"144.JPG\",\"shortName\":\"144.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Picture Night_09 2")
	{
		//add each picDiv and image
		for(i=1; i<=44; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/45.JPG";	
		jsonText += "{\"name\":\"45.JPG\",\"shortName\":\"45.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Practice_09")
	{
		//add each picDiv and image
		for(i=1; i<=11; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/12.JPG";	
		jsonText += "{\"name\":\"12.JPG\",\"shortName\":\"12.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Social Events")
	{
		//add each picDiv and image
		for(i=1; i<=10; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/11.JPG";	
		jsonText += "{\"name\":\"11.JPG\",\"shortName\":\"11.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Time Trials_09 2")
	{
		//add each picDiv and image
		for(i=1; i<=11; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/12.JPG";	
		jsonText += "{\"name\":\"12.JPG\",\"shortName\":\"12.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "victory lakes practice and pep rally_09 2")
	{
		//add each picDiv and image
		for(i=1; i<=144145; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/145.JPG";	
		jsonText += "{\"name\":\"145.JPG\",\"shortName\":\"145.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "victory lakes practice and pep rally_09")
	{
		//add each picDiv and image
		for(i=1; i<=144; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/145.JPG";	
		jsonText += "{\"name\":\"145.JPG\",\"shortName\":\"145.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Wellington Meet_09")
	{
		//add each picDiv and image
		for(i=1; i<=99; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/100.JPG";	
		jsonText += "{\"name\":\"100.JPG\",\"shortName\":\"100.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	}
	else if(picsDivId == "Wellington Meet_09 2")
	{
		//add each picDiv and image
		for(i=1; i<=101; i++)
		{
			var tmpUrl = "../images/" + picsDivId + "/" + i + ".JPG";
			jsonText += "{\"name\":\"" + i + ".JPG\",\"shortName\":\"" + i + ".JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"},";	
		} 	
		tmpUrl = "../images/" + picsDivId + "/102.JPG";	
		jsonText += "{\"name\":\"102.JPG\",\"shortName\":\"102.JPG\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";	
	} 	 
	else
	{
		var tmpUrl = "../images/" + picsDivId + "/1.jpg";
		jsonText += "{\"name\":\"" + i + ".jpg\",\"shortName\":\"" + i + ".jpg\",\"size\":2067,\"lastmod\":1208568760000,\"url\":\"" + tmpUrl + "\"}]}";
		
	}
	javascriptFunctions.setJsonImgObj(jsonText);
	
	
}

function createCell(objCell)
{
	oCell = document.createElement("TD");
	oCell.style.fontSize = "8pt";
	oCell.style.fontWeight = "bold";
	oCell.style.fontFamily = "Verdana, Trebuchet MS, Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif";
	oCell.style.background = "#DFE8F6";
	oCell.style.width = "8%";
	return oCell;
}

function organizerPicRotate(outterImgPrePath, outterImgStr, innerImgPrePath, innerImgStr)
{
	if(outterImgPrePath == "" || outterImgStr == "" || innerImgPrePath == "" || innerImgStr == "")
		return;
	//removeDivElements("orgImg0");
	removeDivElements("orgImg1");
	removeDivElements("orgImg2");
	//removeDivElements("orgImg3");
	
	var outImgPrePath = outterImgPrePath.substr(0,outterImgPrePath.indexOf(","));
	var updatedOutImgPrePath = outterImgPrePath.substr(outterImgPrePath.indexOf(",")+1, outterImgPrePath.length);
	var outImg = outterImgStr.substr(0,outterImgStr.indexOf(","));
	var updatedOutterImgStr = outterImgStr.substr(outterImgStr.indexOf(",")+1, outterImgStr.length);
	/*
	var image = document.createElement("img");
	image.border = "0";
	image.alt = "";
	image.id = outImg;
	image.name = outImg;
	image.src = outImgPrePath + outImg + ".jpg" ;
	image.height = "200";
	image.width = "280";
	document.getElementById("orgImg0").appendChild(image);
	*/
	outImgPrePath = updatedOutImgPrePath.substr(0,updatedOutImgPrePath.indexOf(","));
	updatedOutImgPrePath = updatedOutImgPrePath.substr(updatedOutImgPrePath.indexOf(",")+1, updatedOutImgPrePath.length);	
	outImg = updatedOutterImgStr.substr(0,updatedOutterImgStr.indexOf(","));	
	updatedOutterImgStr = updatedOutterImgStr.substr(updatedOutterImgStr.indexOf(",")+1, updatedOutterImgStr.length);
	/*
	var image = document.createElement("img");
	image.border = "0";
	image.alt = "";
	image.id = outImg;
	image.name = outImg;
	image.src = outImgPrePath + outImg + ".jpg" ;
	image.height = "200";
	image.width = "280";
	document.getElementById("orgImg3").appendChild(image);
	*/
	var inImgPrePath = innerImgPrePath.substr(0,innerImgPrePath.indexOf(","));
	var updatedInnerImgPrePath = innerImgPrePath.substr(innerImgPrePath.indexOf(",")+1, innerImgPrePath.length);	
	var inImg = innerImgStr.substr(0,innerImgStr.indexOf(","));
	var updatedInImg = innerImgStr.substr(innerImgStr.indexOf(",")+1, innerImgStr.length);
	
	var image = document.createElement("img");
	image.border = "0";
	image.alt = "";
	image.id = inImg;
	image.name = inImg;
	image.src = inImgPrePath + inImg + ".jpg" ;
	image.height = "200";
	image.width = "400";
	document.getElementById("orgImg1").appendChild(image);	
	
	inImgPrePath = updatedInnerImgPrePath.substr(0,updatedInnerImgPrePath.indexOf(","));
	updatedInnerImgPrePath = updatedInnerImgPrePath.substr(updatedInnerImgPrePath.indexOf(",")+1, updatedInnerImgPrePath.length);	
	inImg = updatedInImg.substr(0,updatedInImg.indexOf(","));
	updatedInImg = updatedInImg.substr(updatedInImg.indexOf(",")+1, updatedInImg.length);
	
	var image = document.createElement("img");
	image.border = "0";
	image.alt = "";
	image.id = inImg;
	image.name = inImg;
	image.src = inImgPrePath + inImg + ".jpg" ;
	image.height = "200";
	image.width = "400";
	document.getElementById("orgImg2").appendChild(image);	
		
	//set the list to be 1 less than what was there
	if(updatedOutImgPrePath.length > 0 && updatedOutterImgStr.length > 0 && updatedInnerImgPrePath.length > 0 && updatedInImg.length > 0)
		tOther = setTimeout("organizerPicRotate(\"" + updatedOutImgPrePath + "\",\"" + updatedOutterImgStr + "\",\"" + updatedInnerImgPrePath + "\",\"" + updatedInImg + "\")",30000);	
	else{
		clearTimeout(tOther);
		tOther = setTimeout("organizerPicRotate(\"" + javascriptFunctions.getOutterPrePaths() + "\",\"" + javascriptFunctions.getOutterImgs() + "\",\"" + javascriptFunctions.getInnerPrePaths() + "\",\"" + javascriptFunctions.getInnerImgs() + "\")",30000);
	}
}

function displayJSProperties(obj)
{
	//var img = new Image();
	var str = '';
	
	for(x in obj){
		str += obj + '.' + x + '=' + typeof(obj[x]) + '\n' + '<br>';
	}
	//alert(str);
	document.write(str);
}

function appendImg(imgId, imgAlt, imgSrc, imgHgt, imgWidth, objectCell)
{
	var addToPicDivObj = document.createElement("div");
	
	var image = document.createElement("img");
	image.border = "0";
	image.alt = imgAlt;
	image.id = imgId;
	image.name = imgId;
	image.src = imgSrc;
	if(imgHgt)
		image.height = imgHgt;
	if(imgWidth)
		image.width = imgWidth;
				
	addToPicDivObj.appendChild(image);
	objectCell.appendChild(addToPicDivObj);
	//document.getElementById(divId).appendChild(addToPicDivObj);
}

function createResizableBorders()
{
	for(i=1; i<javascriptFunctions.getNumImages(); i++)
	{
		var wrapped = new Ext.Resizable(i+"", {
		    wrap:true,
		    pinned:true,
		    minWidth:50,
		    minHeight: 50,
		    preserveRatio: true
		});
		//ResizableExample.create(i+"");
	}
}

function loadPicPage(someText)
{
	removeDivElements("picsOuterContainer");
	createDiv(someText, "picsOuterContainer");
	//now add img objects to this div
	addToPicDiv(someText,"innerPicsDiv");
}

function changePicPage(treeNode)
{
	removeDivElements("picsOuterContainer");
	createDiv(treeNode.text, "picsOuterContainer");
	//now add img objects to this div
	
	addToPicDiv(treeNode.text,"innerPicsDiv");
}


function removeDivElements(nameOrNode)
{
  	var tempDiv = null;
  	if(typeof(nameOrNode) == 'string')
		tempDiv = document.getElementById(nameOrNode);
	else
		tempDiv = nameOrNode;

	if(tempDiv == null)
		return;

	while(tempDiv.childNodes.length > 0)
		tempDiv.removeChild(tempDiv.childNodes[0]);
}

function jsonDecode(str){
	var json = null;
	try {
		json = Ext.util.JSON.decode(str);
	}
	catch(error){
		var message = "Unable to de-serialize ajax response object.<br><br>";
		if(typeof(error) != 'undefined' && typeof(error.description) != 'undefined')
			message += "Description: " + error.description + "<br><br>";
		else if(typeof(error) == 'string')
			message += "Description: " + error + "<br><br>";
		
		if(typeof(response) != 'undefined' && typeof(response.responseText) != 'undefined')
			message += "Response: " + response.responseText;
		displayErrorMessageBox('Failed',message);
		return null;
	}
	return json;
}

function displayErrorMessageBox(title,message){
	var tmp = message.toLowerCase();
	if(tmp.indexOf("<html>") != -1){
		//remove most html tags (preserve any <br> tags)
		message = message.split("<br>").join("-¿-");
		message = message.split("\n").join("_¿_");
		while((pos = message.indexOf("<")) != -1){
			var left = message.substr(0,pos);
			message = message.substr(pos + 1,message.length);
			pos = message.indexOf(">");
			if(pos != -1){
				message = message.substr(pos + 1,message.length);
			}
			
			message = left + " " + message;
		}
		
		message = message.split("-¿-").join("<br>");
		message = message.split("_¿_").join("<br>");
	}
	Ext.Msg.show({
			title: title,
			msg: message,
			buttons: Ext.Msg.OK,
			icon: Ext.MessageBox.ERROR,
			minWidth: 500,
			maxWidth: 900,
			shim: true
	});
}
