var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;
var isMac = ((navigator.appVersion.indexOf("Mac")!=-1)) ? true : false;


function blurry(obj) {
	if (!NS4) obj.blur();
}


// Array stores all the captions for all the portfolio shots
// Includes the number of the shot so the captions can be
// matched up
var portCaptions = new Array(
	'01','',
	'02','',
	'03','',
	'04','',
	'05','',
	'06','',
	'07','',
	'08','',
	'09','',
	'10','',
	'11','',
	'12','',
	'13','',
	'14','',
	'15','',
	'16','Interior casework',
	'17','Dining room doors, windows, and casework',
	'18','Recpetion doors - investment bank',
	'19','Elevator lobby details - investment bank',
	'20','Interior door',
	'21','Main door',
	'22','Main staircase',
	'23','Exterior - showing windows and doors',
	'24','Bathroom casework',
	'25','Main stair banister',
	'26','Pre-finish reception desk',
	'27','Pre-finish window',
	'28','Pre-finish door',
	'29','Re-sawn lumber sample cut',
	'30','Shop interior',
	'31','Shop interior',
	'32','Resawn lumber production',
	'33','Interior door (detail)',
	'34','Resawn lumber display',
	'35','Resawn lumber display',
	'36','Resawn lumber display',
	'37','Window - private residence',
	'38','Main Entrance - private residence',
	'39','Foyer stairway with clock',
	'40','Breakfast room with table',
	'41','Study Overlook',
	'42','Study Overlook',
	'43','Study Overlook',
	'44','Office Nook',
	'45','Family Room',
	'46','Family Room',
	'47','Kitchen Cabinetry',
	'48','Building Entrance',
	'49','Study Overlook Entrance',
	'50','Building Entrance',
	'51','Building Entrance',
	'52','Interior Door Molding',
	'53','Interior Door Molding',
	'54','Interior Moldings (various)',
	'55','Interior Moldings (various)',
	'56','Pre-finish Reception Desk',
	'57','Office Reception Area',
	'58','Greenhouse Windows',
	'59','University Building Entrance',
	'60','Building Entrance',
	'61','Conference Room (Table and Moldings)',
	'62','Lobby',
	'63','Lobby',
	'64','Lectern',
	'65','Gazebo - private residence',
	'66','Hotel Reception Desk',
	'67','Front Door - private residence',
	'68','Kitchen Cabinetry',
	'69','Kitchen Cabinetry and other Case Work',
	'70','Living Room Molding',
	'71','Interior Molding',
	'72','Interior Cabinetry',
	'73','Living Room Molding',
	'74','Living Room Molding', 
	'77','Bank Exterior',
	'78','Bank Teller Counters',
	'79','Commercial casework',
	'80','Main door',
	'81','Large kitchen',
	'82','Interior molding',
	'83','Interior molding',
	'84','Entertaining work areas',
	'85','Fine Interiors',
	'86','Wainscot Walls',
	'87','Custom gymnasiums for your home or workplace.',
	'88','Custom gymnasiums for your home or workplace.<p><a href="images/portfolio_88hires.jpg" target="_blank">Click for Hi-Res Version(823 KB)</a>',
	'89','Custom gymnasiums for your home or workplace.',
	'90','Fine Interior Casework<p><a href="images/portfolio_90hires.jpg" target="_blank">Click for Hi-Res Version(890 KB)</a>',
	'91','Living Room',
	'92','Living Room Windows',
	'93','Bar',
	'94','Lobby',
	'95','Front Desk',
	'96','<p><a href="images/portfolio_96hires.jpg" target="_blank">Click for Hi-Res Version(626 KB)</a>',
	'97','Custom Offices',
	'98','Custom Offices',
	'99','<p><a href="images/portfolio_99hires.jpg" target="_blank">Click for Hi-Res Version(855 KB)</a>'


);


function portSwtch(numStr) {
	portSrc = 'images/bed'+ numStr +'.jpg';
	// Find the appropriate caption
	captionStr = '<table border="0" cellpadding="0" cellspacing="0" border="0" WIDTH="300">\r\t<tr>\r\t\t<td class="sgrey">';
	for (i=0; i<portCaptions.length; i+=2) {
		if (portCaptions[i]==numStr) {
			captionStr += portCaptions[i+1];
			break;
		}
	}
	captionStr += '\r\t\t</td>\r\t</tr>\r</table>';
	
	// Switch the images
	document.images.medium.src = portSrc;
	
	// Write the contents of the caption DIV
/*	if (NS4) { 
		with(document.mTxt.document) {
			open();
			write(captionStr);
			close();
		}
	 }
	else { 
		if (N6) div = document.getElementById('mTxt');
		else div = document.all.mTxt;
		div.innerHTML = captionStr; 
	}
*/	
}
