//this variable sets the folder name that the files are in

	var filename="josh2"
	
//these arrays hold the data that gets inserted into the page
 
	var picture = new Array()
	picture[ 1 ] = "josh1.jpg"
	picture[ 2 ] = "josh2.jpg"
	picture[ 3 ] = "josh3.jpg"
	picture[ 4 ] = "josh4.jpg"
	picture[ 5 ] = "josh5.jpg"
	picture[ 6 ] = "josh6.jpg"
	
	var text = new Array()
	text[ 1 ] = "Merrick taking a \"rest day\" by finding a sweet boulder problem in the Hidden Valley campground."
	text[ 2 ] = "Yuko leading Double Cross, 5.7, in good style."
	text[ 3 ] = "Yuko demonstrating why flexibility is useful while leading Double Cross, 5.7."
	text[ 4 ] = "Angela moving catlike up the mezo-granite waves while following Double Cross, 5.7. "
	text[ 5 ] = "Angela lost in a sea of rock on Double Cross, 5.7."
	text[ 6 ] = "Dr. Seuss must of visited Joshua Tree at some point in his life."
	

//these variables make sure the page exists if loaded incorrectly

	var insertpicture="spacer.gif\" width=\"300\" height=\"300"
	var inserttext="<a href=\"../climbindex.html\">back to index</a>"

//there variables set the URL

	var url=document.location.href
	var url_array=url.split(filename);

//these if-else statements determine which data is matched with each url

	if(window.location.href == url_array[0]+filename+'/pictureframe.html#1'){
	var insertpicture=picture[1]
	var inserttext=text[1] 
	 }

	else if (window.location.href == url_array[0]+filename+'/pictureframe.html#2'){
	var insertpicture=picture[2]
	var inserttext=text[2]
	 }

	else if (window.location.href == url_array[0]+filename+'/pictureframe.html#3'){
	var insertpicture=picture[3]
	var inserttext=text[3]
	 }

	else if (window.location.href == url_array[0]+filename+'/pictureframe.html#4'){
	var insertpicture=picture[4]
	var inserttext=text[4]
	 }

	else if (window.location.href == url_array[0]+filename+'/pictureframe.html#5'){
	var insertpicture=picture[5]
	var inserttext=text[5]
	 }

	else if (window.location.href == url_array[0]+filename+'/pictureframe.html#6'){
	var insertpicture=picture[6]
	var inserttext=text[6]
	 }

	;


//this code actually writes the code for the page

	document.write('<tr>')
	document.write('<td><img src=\"'+insertpicture+'\"></td>')
	document.write('</tr>')
	document.write('<tr>')
	document.write('<td class=\"bodytext\">'+inserttext+'</td>')
	document.write('</tr>') 
  
