// JavaScript Document

var title = 'The HHC Foundation Second Annual Breakfast Benefit Raises Over Half a Million Dollars to Support the City\'s Public Hospitals.';

var description = new Array(); 
description[description.length] = 'Award recipient Mary Sansone';
description[description.length] = 'Breakfast Chair Daniel D. Ricciardi,MD. and Co-chair Edward J. Rappa read a Proclamation from Brooklyn Borough President Marty Markowitz';
description[description.length] = 'Congressman Rangel and Honoree Roscoe Brown';
description[description.length] = 'Congressman Rangel with Community Service Award recipient Mary Sansone';
description[description.length] = 'HHC Board Chairperson Charlynn Goins';
description[description.length] = 'HHC President Alan D. Aviles, Honorees Robert M. Glickman,MD., Mary Sanson, Roscoe C. Brown Jr.,PHD., HHC Board Chairperson Charlynn Goins';
description[description.length] = 'Honoree Brown with Manhattan Borough President Scott M. Stringer';
description[description.length] = 'Honoree Glickman with Award Presenter Kenneth G. Langone and Dr. Eric Rackow';
description[description.length] = 'Honoree Roscoe C. Brown Jr.,PHD. accepting his Community Service Award award';
description[description.length] = 'Honorees Glickman and Brown greet one another at the Breakfast';
description[description.length] = 'Humanitarian Award Recipient Robert M. Glickman,MD.';
description[description.length] = 'Master of Ceremonies Max Gomez,PHD. of NewsChannel4';
description[description.length] = 'Mayor Bloomberg with Breakfast Honorees Glickman, Sansone, Brown';
description[description.length] = 'Mayor Bloomberg and Charlynn Goins';
description[description.length] = 'Mayor Michael R. Bloomberg';
description[description.length] = 'Percy Sutton and Honoree Roscoe Brown with Congressman Charles B. Rangel';
description[description.length] = 'Ricciardi, Glickman, Rappa, Sanson, Mayor Bloomberg and Brown';
//description[description.length] = '';

var smallimages = new Array();
smallimages[smallimages.length] = 'gallery/1_sm.jpg';
smallimages[smallimages.length] = 'gallery/2_sm.jpg';
smallimages[smallimages.length] = 'gallery/3_sm.jpg';
smallimages[smallimages.length] = 'gallery/4_sm.jpg';
smallimages[smallimages.length] = 'gallery/5_sm.jpg';
smallimages[smallimages.length] = 'gallery/6_sm.jpg';
smallimages[smallimages.length] = 'gallery/7_sm.jpg';
smallimages[smallimages.length] = 'gallery/8_sm.jpg';
smallimages[smallimages.length] = 'gallery/9_sm.jpg';
smallimages[smallimages.length] = 'gallery/10_sm.jpg';
smallimages[smallimages.length] = 'gallery/11_sm.jpg';
smallimages[smallimages.length] = 'gallery/12_sm.jpg';
smallimages[smallimages.length] = 'gallery/13_sm.jpg';
smallimages[smallimages.length] = 'gallery/14_sm.jpg';
smallimages[smallimages.length] = 'gallery/15_sm.jpg';
smallimages[smallimages.length] = 'gallery/16_sm.jpg';
smallimages[smallimages.length] = 'gallery/17_sm.jpg';
//smallimages[smallimages.length] = '';

var medimages = new Array();
medimages[medimages.length] = 'gallery/1_med.jpg';
medimages[medimages.length] = 'gallery/2_med.jpg';
medimages[medimages.length] = 'gallery/3_med.jpg';
medimages[medimages.length] = 'gallery/4_med.jpg';
medimages[medimages.length] = 'gallery/5_med.jpg';
medimages[medimages.length] = 'gallery/6_med.jpg';
medimages[medimages.length] = 'gallery/7_med.jpg';
medimages[medimages.length] = 'gallery/8_med.jpg';
medimages[medimages.length] = 'gallery/9_med.jpg';
medimages[medimages.length] = 'gallery/10_med.jpg';
medimages[medimages.length] = 'gallery/11_med.jpg';
medimages[medimages.length] = 'gallery/12_med.jpg';
medimages[medimages.length] = 'gallery/13_med.jpg';
medimages[medimages.length] = 'gallery/14_med.jpg';
medimages[medimages.length] = 'gallery/15_med.jpg';
medimages[medimages.length] = 'gallery/16_med.jpg';
medimages[medimages.length] = 'gallery/17_med.jpg';
//medimages[medimages.length] = '';

var largeimages = new Array();
largeimages[largeimages.length] = 'gallery/1_lg.jpg';
largeimages[largeimages.length] = 'gallery/2_lg.jpg';
largeimages[largeimages.length] = 'gallery/3_lg.jpg';
largeimages[largeimages.length] = 'gallery/4_lg.jpg';
largeimages[largeimages.length] = 'gallery/5_lg.jpg';
largeimages[largeimages.length] = 'gallery/6_lg.jpg';
largeimages[largeimages.length] = 'gallery/7_lg.jpg';
largeimages[largeimages.length] = 'gallery/8_lg.jpg';
largeimages[largeimages.length] = 'gallery/9_lg.jpg';
largeimages[largeimages.length] = 'gallery/10_lg.jpg';
largeimages[largeimages.length] = 'gallery/11_lg.jpg';
largeimages[largeimages.length] = 'gallery/12_lg.jpg';
largeimages[largeimages.length] = 'gallery/13_lg.jpg';
largeimages[largeimages.length] = 'gallery/14_lg.jpg';
largeimages[largeimages.length] = 'gallery/15_lg.jpg';
largeimages[largeimages.length] = 'gallery/16_lg.jpg';
largeimages[largeimages.length] = 'gallery/17_lg.jpg';
//largeimages[largeimages.length] = '';

//no need to edit below this line /////////////////////////////////////////////////////////////////////////////////////////////////////////

var nrImages = smallimages.length;

function setpreview(j) {
	var medphoto = '<a href="javascript:popImage(\''+largeimages[j]+'\',\'large\');">';
	medphoto += '<img src="'+medimages[j]+'" height="261" style="border:#02394d 2px solid"></a>';
	medphoto += '<div style="width:400px; padding-top:4px; padding-bottom:16px; text-align:right; padding-right:2px">';
	medphoto += '<a href="javascript:popImage(\''+largeimages[j]+'\',\'large\');">';
	medphoto += '<img src="images/but_enlarge.jpg" border="0" /></a></div>';
	document.getElementById("photo1").innerHTML = medphoto;
	document.getElementById("description").innerHTML = description[j];
	for (k=0; k<nrImages; k++) {
		elemk = "Image"+k;
		document.getElementById(elemk).className = 'thumbs';
		document.getElementById(elemk).style.borderWidth = '1px';
		document.getElementById(elemk).style.borderStyle = 'solid';
		document.getElementById(elemk).style.borderColor = '#269dc7';
		document.getElementById(elemk).style.margin = '5px';
		}
	var elemid = 'Image'+j;
	document.getElementById(elemid).style.borderWidth = '2px';
	document.getElementById(elemid).style.borderStyle = 'solid';
	document.getElementById(elemid).style.borderColor = '#02394d';
	document.getElementById(elemid).style.margin = '4px';
	/*
	*/
	return;
}

function setcontent() {
document.getElementById("title").innerHTML = title;
setpreview(0);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SCRIPT FOR IMAGES OPENING IN A POPUP AT THEIR ACTUAL SIZE ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Set the horizontal and vertical position for the popup
PositionX = 0;
PositionY = 0;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 800;
defaultHeight = 600;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = false;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars,resizable,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars,resizable,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["guide"].width;');
writeln('window.innerHeight=document.images["guide"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) 
writeln('</head><body bgcolor=000000 onload="reSizeToImage();doTitle();self.focus()">')
else 
writeln('</head><body bgcolor=000000 onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="guide" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
