// JavaScript Document

var rand_no = Math.floor((17-1)*Math.random()) + 1;

function writeRandomPhoto() {
	var photoHtml = '';

	photoHtml += "<img src='images/"+rand_no+".jpg' name='thePhoto' alt='' />";
	document.getElementById('photos').innerHTML = photoHtml;
	
}

function writeRandomTitle() {

//document.getElementById('titleText').innerHTML = "<p>"+titleArray[rand_no]+"</p>";
document.getElementById('titleText').innerHTML = "<p>Welcome</p>";


}

function writeRandomDetails() {

//document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[rand_no]+"</p>";
//document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[rand_no]+"</p>";
	
}

function writeRandomCloseups() {

//document.getElementById('closeupThumbnails').innerHTML = "<p>"+closeupsArray[rand_no]+"</p>";
	
}


var titleArray = new Array();

titleArray[0] = "";
//Epotek
titleArray[1] = "Epoxy Technology - Web Site";
//Angion
titleArray[2] = "Angion Biomedica - Web Site";
//Zick Rubin
titleArray[3] = "Zick Rubin, Attorney at Law - Web Site";
//SCG Management
titleArray[4] = "SCG Management - Web Site";
//WorkSource Partners
titleArray[5] = "Worksource Partners - Web Site";
//Tufts, v.2
titleArray[6] = "Tufts Hillel - Web Site";
//Golden Temple
titleArray[7] = "Golden Temple Restaurant - Web Site";
//RG Residential, v.2
titleArray[8] = "RG Residential - Web Site, v.2";
//Meryl's Murals
titleArray[9] = "Meryl\'\s Murals - Web Site";
//RG Residential, v.1
titleArray[10] = "RG Residential - Web Site, v.1";
//Loren Rosenzweig
titleArray[11] = "Loren Callen Rosenzweig, Attorney at Law - Web Site";
//CamBio
titleArray[12] = "Cambridge Biomedical - Web Site";
//BiNA Farm
titleArray[13] = "BiNA Farm - Web Site";
//TCLF - Louisville
titleArray[14] = "The Cultural Landscape Foundation - \"\Olmsted: Shaping a City\"\ - Flash-based Web Application/CD-ROM";
//Prospero
titleArray[15] = "Prospero LLC - Web Site";
//Journeys to the Soul
titleArray[16] = "Journeys to the Soul - Web Site";
//Alexandria Career Coaching
titleArray[17] = "Alexandria Career Coaching - Web Site";
//Emerson College - Women in Technology 
titleArray[18] = "Emerson College - Women in Technolgy Web Site";
//Natural Health & Wellness
titleArray[19] = "Natural Health & Wellness - Web Site";
//Tufts, v1
titleArray[20] = "Tufts Hillel - Web Site, v.2";
//ASG Multimedia
titleArray[21] = "ASG Multimedia - Web Site";
//MA Vehicle Test & Emissions - "Inspector Recertification"
titleArray[22] = "MA Vehicle Test & Emissions - \"\Inspector Recertification\"\ screens";
//DAO Group - "WebSnak Splash Screen"
titleArray[23] = "DAO Group - \"\WebSnak\"\ - Splash Screen";
//Harvard Univ. Art Museums - "Straus Conservation Mgmt Sys"
titleArray[24] = "Harvard University Art Museums - \"\Straus Conservation Managment System\"\ ";
//Harvard Univ. Art Museums - "Exhibitions & Programs Calendar"
titleArray[25] = "Harvard University Art Museums - \"\Exhibitions & Programs Calendar\"\ ";
//Harvard Univ. Art Museums - "Exhibitions Planning Calendar"
titleArray[26] = "Harvard University Art Museums - \"\Exhibitions Planning Schedule\"\ ";
//PCi Services - "Wiz 6.0 welcome screen"
titleArray[27] = "PCi Services, Inc. - \"\Wiz 6.0\"\ Welcome Screen";

//Medici - "Documentor product logo and software icons"
titleArray[28] = "Medici - \"\Documentor\"\ logo and icons";
//PCi Services - "Wiz 6.0 software icons"
titleArray[29] = "PCi Services, Inc. - \"\Wiz 6.0\"\  software icons";
//PCi Services - "Wiz 6.0 wizard screens"
titleArray[30] = "PCi Services, Inc. - \"\Wiz 6.0\"\ wizard screens";
//PCi Services - "Wiz 6.0 reports screen"
titleArray[31] = "PCi Services, Inc. - \"\Wiz 6.0\"\ reports screen";
//PCi Services - "Third Party Origination Monitor screens"
titleArray[32] = "PCi Services, Inc. - \"\Third Party Origination Monitor\"\ screens";


var detailsArray = new Array();

detailsArray[0] = "";
//Epotek
detailsArray[1] = "Site conceptualization, interface design, graphic production, programming";
//Angion Biomedica
detailsArray[2] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Zick Rubin
detailsArray[3] = "Site conceptualization, interface design, graphic production, programming";
//SCG Management
detailsArray[4] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Worksource Partners
detailsArray[5] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Tufts, v.2
detailsArray[6] = "Site conceptualization, interface design, graphic production, programming";
//Golden Temple
detailsArray[7] = "Site conceptualization, interface design, graphic production, programming";
//RG Residential, v.2
detailsArray[8] = "Site conceptualization, interface design, graphic production, programming";
//Meryl's Murals
detailsArray[9] = "Site conceptualization, interface design, graphic production, programming";
//RG Residential, v.1
detailsArray[10] = "Site conceptualization, interface design, graphic production, programming";
//Loren Rosenzweig
detailsArray[11] = "Site conceptualization, interface design, graphic production, programming";
//CamBio
detailsArray[12] = "Site conceptualization, interface design, graphic production, programming";
//BiNA Farm
detailsArray[13] = "Site conceptualization, interface design, graphic production, programming";
//TCLF - Louisville
detailsArray[14] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Prospero
detailsArray[15] = "Site conceptualization, interface design, graphic production, programming";
//Journeys to the Soul
detailsArray[16] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Alexandria Career Coaching
detailsArray[17] = "Site conceptualization, interface design, graphic production, programming";
//Women in Technology
detailsArray[18] = "Site conceptualization, interface design, Flash and graphic production, programming";
//Natural Health & Wellness
detailsArray[19] = "Site conceptualization, interface design, graph production, programming";
//Tufts, v1
detailsArray[20] = "Site conceptualization, interface design, Flash and graphic production, programming";
//ASG Multimedia
detailsArray[21] = "Site conceptualization, interface design, Flash and graphic production, programming";
//MA Vehicle Test & Emissions - "Inspector Recertification" 
detailsArray[22] = "Interface design, graphic production, prototype development";
//DAO Group - "WebSnak Splash Screen"
detailsArray[23] = "Interface design, graphic production";
//Harvard Univ. Art Museums - "Straus Conservation Mgmt Sys"
detailsArray[24] = "Interface design, graphic production, prototype programming";
//Harvard Univ. Art Museums - "Exhibitions & Programs Calendar"
detailsArray[25] = "Interface design, graphic production, prototype programming";
//Harvard Univ. Art Museums - "Exhibitions Planning Schedule"
detailsArray[26] = "Interface design, graphic production, prototype programming";
//PCi Services - "Wiz 6.0 welcome screen"
detailsArray[27] = "Interface design, graphic production";

//Medici - "Documentor product logo and software icons"
detailsArray[28] = "For the product logo of the new Documentor application, PCi Commercial was looking for a strong iconographic logo to represent the first product in their suite of upgraded commercial lending applications. We came up with the fountain pen design to convey the precision, trustworthiness, and \"\getting things done right\"\ nature of this \"\lawyer in a box\"\ type of application. To liven up the interface of the form and data heavy application, we agreed to use a multi-colored approach to Documentor's 8 new functionality icons.";
//PCi Services - "Wiz 6.0 software icons"
detailsArray[29] = "When PCi Services began developing the upgrade for Wiz 6.0, the market-leading product in their suite of banking and lending applications, they came to us wanting to bring a stronger graphical element to the interface. We designed over 40 new icons for the navigation and functionality toolbars. The overall design works with three of their primary brand colors but we limited the total colors used to the Windows 16 color palette for maximum compatibility.";
//PCi Services - "Wiz 6.0 wizard screens"
detailsArray[30] = "Interface design, graphic production, prototype programming";
//PCi Services - "Wiz 6.0 reports screen"
detailsArray[31] = "Interface design, graphic production, prototype programming";
//PCi Services - "Third Party Origination Monitor screens"
detailsArray[32] = "Interface design, graphic production, prototype programming.";


function changePhoto(whichPhoto,whichTitle,whichDetails) {
	
	var headingHTML = '';
	var photoHtml = '';
	var titleHtml = '';
	var detailsHTML = '';
	var photoNavHTML = '';

	headingHTML += "<img src='images/heading-portfolio.gif' width='458' height='39' alt='Portfolio' />";
	photoHtml += "<div id='photoSpacing'><img src='images/"+whichPhoto+".jpg' name='thePhoto' alt='' class='photoSpecs' /></div>";
	titleHtml += "<p>"+whichTitle+"</p>";
	detailsHTML += "<p>"+whichDetails+"</p>";
	photoNavHTML += "<a href='#' onClick='previousPhoto()'><img src='images/bn-previous.gif' alt='Previous' name='previous' width='50' height='15' border='0' /></a><a href='portfolio.html'><img src='images/bn-thumbnails.gif' alt='thumbnails' name='thumbnails' width='94' height='15' border='0' /></a><a href='#' onClick='nextPhoto();'><img src='images/bn-next.gif' alt='Next' name='next' width='51' height='15' border='0' /></a>";



	document.getElementById('headingContainer').innerHTML = headingHTML;		
	document.getElementById('photos').innerHTML = photoHtml;
	document.getElementById('titleText').innerHTML = titleHtml;
	document.getElementById('detailsText').innerHTML = detailsHTML;
	document.getElementById('photoNav').style.display="block";
	document.getElementById('photoNav').innerHTML = photoNavHTML;


}

function changeTitleCell(whichPhoto) {
	document.getElementById('titleCell').innerHTML=whichPhoto;	
}

function blankTitleCell() {
	document.getElementById('titleCell').innerHTML="";	
}


function nextPhoto() {
	
	var newPhoto = "";
	var theNumber = "";
	var temp = new Array();

	temp = document.thePhoto.src.split("images/");
	var t = temp[1];
	//var r = t.match(/[\d\.]+/g);
	theNumber = parseInt(t) + 1;

	newPhoto = "images/"+theNumber+".jpg";
	
	if (theNumber != 33) {
	document.thePhoto.src=newPhoto;		
	document.getElementById('titleText').innerHTML = "<p>"+titleArray[theNumber]+"</p>";	
	document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[theNumber]+"</p>";	
	} else {
	document.thePhoto.src="images/1.jpg";		
	document.getElementById('titleText').innerHTML = "<p>"+titleArray[1]+"</p>";	
	document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[1]+"</p>";	
		
	}
	
}

function previousPhoto() {
	
	var newPhoto = "";
	var theNumber = "";
	var temp = new Array();

	temp = document.thePhoto.src.split("images/");
	var t = temp[1];
	//var r = t.match(/[\d\.]+/g);
	theNumber = parseInt(t) - 1;

	newPhoto = "images/"+theNumber+".jpg";
	document.thePhoto.src=newPhoto;		

	if (theNumber != 0) {
	document.thePhoto.src=newPhoto;		
	document.getElementById('titleText').innerHTML = "<p>"+titleArray[theNumber]+"</p>";	
	document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[theNumber]+"</p>";	
	} else {
	document.thePhoto.src="images/32.jpg";		
	document.getElementById('titleText').innerHTML = "<p>"+titleArray[32]+"</p>";	
	document.getElementById('detailsText').innerHTML = "<p>"+detailsArray[32]+"</p>";	
		
	}
	
}

function createFooter() {
	// getting this year
	var thisYear = new Date;
	
	var footerHtml = '';
	
	footerHtml += 'Copyright &copy; ' + thisYear.getFullYear() + ' WizzyWigg Communications, Inc.  All Rights Reserved.'; 
						
				
	document.getElementById('copyrightText').innerHTML = footerHtml;
}

function showScreens(){ 

document.getElementById('portfolioScreens').style.display="block";
document.getElementById('photoNav').style.display="block";
document.getElementById('portfolioText').style.display="none";

}

function hideScreens(){ 

document.getElementById('portfolioScreens').style.display="none";
document.getElementById('photoNav').style.display="none";
document.getElementById('portfolioText').style.display="block";

}
