// Javascript image_popup -- pops up new window, displays image
// Usage: note that all fields are required!
// url = url of image to pop up
// title = what to name the browser window that pops up (essentially the <title> HTML tag)
// caption = the caption to go below the photo
// width = the width of the photo (not of the window to pop up!)
// height = the height of the photo (not of the window to pop up!)
// buffer = the amount of space to add below the photo.  Longer captions need more buffer.  Use default
//          of '0' to use default amount of buffer space (currently 50 pixels)

function image_popup(url, title, caption, width, height, buffer) {

	if (buffer == "0") {
		newheight=parseInt(height)+50
	} else {
	newheight=parseInt(height)+parseInt(buffer)
	}
		
	newwidth=parseInt(width)+12
	
 top.ConsoleRef=window.open('','_blank',
   'width='
	 +newwidth
	 +',height='
	 +newheight
   +',menubar=0'
   +',toolbar=0'
   +',status=0'
   +',scrollbars=0'
   +',resizable=0')

	top.ConsoleRef.document.writeln(
	'<html><head><title>'
	+title
	+'</title>'
	+'<link rel=\"STYLESHEET\" type=\"text/css\" href=\"/corp/docs/company/history/timeline/timeline.css\">'
	+'</head>'
	+'<body bgcolor=\"#F6E8C3\" leftmargin=\"0\" topmargin=\"0\">'
	+'<table width=\"'
	+width
	+'\" '
	+'bgcolor=\"#F6E8C3\" cellpadding=\"0\" cellspacing=\"6\" align=\"center\">'
	+'<tr><td valign=\"top\" align=\"center\">'
	+'<img src=\"'
	+url
	+'\" width=\"'
	+width
	+'\" '
	+'height=\"'
	+height
	+'\" border=\"1\">'
	+'</td></tr>'
	+'<tr><td align=\"right\" class=\"caption\">'
	+caption
	+'</td></tr>'
	+'</table>'
	+'</body>'
	+'</html>'
	)
}

function Add_A_Favorite() 
{ 
if (window.external) 
// if the browser is IE open the add favorite window
{
external.AddFavorite(location.href, document.title)
// Add the document location and title to the AddFavorite window
}
else 
// Display and alert box for any other browser.
{
alert("Sorry, your browser doesn't support this feature." + 
"\nPlease use the bookmark feature of your browser to save the location of this page.");
}

}

function open_external(url)
{
	new_window=window.open(url,"external","toolbar=yes, location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=625, height=350, left=100, top=100")
	new_window.focus()
}

function open_text(url)
{
	new_window=window.open(url,"external","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=550, height=400, left=100, top=100")
	new_window.focus()
}