var close_up_viewer;


var tempstring='../pictures/360X189/360X189_6.jpg';

//picture object constructor
//function picture(a_picture, a_caption){	this.selected_picture=a_picture; this.selected_caption=a_caption;}
function picture(a_picture, a_caption, a_size ){	this.selected_picture=a_picture; this.selected_caption=a_caption; this.selected_size=a_size;}

function display_close_up(a_picture, a_caption)
{	//close previous window if it exists and is open
	//if(close_up_viewer && !close_up_viewer.closed){close_up_viewer.close();}
	//instantiate picture object
	mypicture=new picture(a_picture, a_caption, null);	
	//show popup window with new picture and caption
	//close_up_viewer=window.open("../html/close_up_viewer.html","r","width=500,height=260, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")
	close_up_viewer=window.open("close_up_viewer.html","r","width=500,height=260, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")

}

function display_close_up_720(a_picture, a_caption, a_size)
{	//close previous window if it exists and is open
	//if(close_up_viewer && !close_up_viewer.closed){close_up_viewer.close();}
	//instantiate picture object
	mypicture=new picture(a_picture, a_caption, a_size);
		
	//show popup window with new picture and caption
	//close_up_viewer=window.open("../html/close_up_viewer.html","r","width=a_size +300,height=560, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")
	close_up_viewer=window.open("close_up_viewer.html","r","width=1000, height=560, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")

}

//function display_close_up_test(a_picture)
//{		//mypicture=new picture(a_picture, a_caption, a_size);


	//mypicture=a_picture;
	//show popup window with new picture and caption
	//close_up_viewer=window.open("../html/close_up_viewer.html","r","width=a_size +300,height=560, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")
	//close_up_viewer=window.open("close_up_viewer.html","r","width=1000, height=560, screenX=300, screenY=300, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1")

//}





//function insert_image(a_url, a_caption, a_size, a_side)
//{	//
//	var tempstring2='\"../pictures/360X189/360X189_6.jpg\"';
	//instantiate picture object
//	mypicture=new picture(a_url, a_caption, a_size);

//	document.writeln("<div id=\"inset_right\"><img src=\""+picture_object.selected_picture+"\" width=170 height=89   onClick=\"display_close_up("+picture_object.selected_picture+","+picture_object.selected_caption+")\"><br> "+picture_object.selected_caption+" <\/div>");
	//document.writeln("picture:"+aa_picture+" the caption:"+aa_caption);

	//document.writeln("		<div id=\"annotated_inset_right\"><a href=\"javascript:display_close_up_720(\'..\/pictures\/720X405\/720X405_53.jpg\', \'geezer gassers visit c & h\', \'10000\')\"><img src=\"..\/pictures\/720X405\/720X405_53.jpg\" width=360 height=203><\/a><br>801 blowing off steam<\/div>		")
	//document.writeln("		<div id=\"annotated_inset_right\"><a href=\"javascript:display_close_up_test("+mypicture.selected_picture+", \'geezer gassers visit c & h\', \'10000\')\"><img src=\"..\/pictures\/720X405\/720X405_53.jpg\" width=360 height=203><\/a><br>801 blowing off steam<\/div>	")
	
	
	
//	if(a_side=="right"){document.writeln("<div id=\"annotated_inset_right\">	")}
//	if(a_side=="left"){document.writeln("<div id=\"annotated_inset_left\">	")}
	
//	document.writeln("<a href=\"javascript:display_close_up_test("+tempstring2+")\">	")
	
	
//	document.write(")\">		")

	
	
//	document.write("		<a href=\"javascript:display_close_up_720(")
//	document.write(a_url)
//	document.write(",")
//	document.write(a_caption)
//	document.write(",")
//	document.write(a_size)
	
	
//	document.write(")\">		")
	
	//document.writeln("		<img src=\"..\/pictures\/720X405\/720X405_53.jpg\" width=360 height=203><\/a><br> 	")
//	document.write("<img src=\")
	
	
	
//	document.write("../pictures/360X189/360X189_6.jpg")
//	document.write(" width=360 height=203><\/a><br> 	")
	
//	document.writeln(a_caption)
//	document.writeln("		<\/div>		")
	
	//test only
	//document.writeln(a_url, a_caption, a_size);
	//document.writeln(mypicture.selected_picture, mypicture.selected_caption, a_size);

//}




















//function draw_image(aa_picture, aa_caption)
//{	document.writeln("<div id=\"inset_right\"><img src=\""+aa_picture+"\" width=170 height=89   onClick=\"display_close_up('+aa_picture+','hhh')\"><br> "+aa_caption+" <\/div>");
//	document.writeln("picture:"+aa_picture+" the caption:"+aa_caption);
//}


/*
Write your function to receive one parameter, the link object
  function clickHandler (link) {
    alert(link.text ? link.text : link.innerText);
    return false;
  }
which you then call as 
  <A HREF="whatever.html"
     ONCLICK="return clickHandler(this)"
  >
Depending on what your function returns (false to cancel link, true to 
execute it), the link will be executed after the function was called.
*/