// sf_archive.js

var linkPath = "../";
var urltitlePath = "../archive/pix/";

var theIndeces = new Array (-1, -1, -1);


// issuesList
// stores a sortable list all the works, together with
//    0 ... link= url of the case study of the project
//    1 ... urltitle= url of a picture-preview of the project
//    2 ... stayfocused= stayfocused name
//    3 ... issue= stayfocused issue number
//    4 ... tagline= project tagline
//    5 ... info= project info
//    6 ... client= client name
//    7 ... filler

var issuesList = new Array (
	new Array ("ipen", "sfIssue_ipen.gif", "iPen", "03&#x2022;2004", "naturally interact with the digital world", "a concept study of a mobile device for the 21st century", "client", "filler"),
	new Array ("star", "sfIssue_star.gif", "acamp star", "05&#x2022;2004", "innovation on demand", "a convertible hollywood-style swing", "acamp", "for"),
	new Array ("front", "sfIssue_front.gif", "FRONT", "07&#x2022;2004", "a new musical interface", "diploma thesis in industrial design", "client", "filler"),
	new Array ("interaction", "sfIssue_interaction.gif", "interaction architecture", " 09&#x2022;2004", "tagline", "info", "client", "filler"),
	new Array ("facultas", "sfIssue_facultas.gif", "facultas", "11&#x2022;2004", "gut zu Wissen", "a new corporate design for a merger", "client", "filler"),
	new Array ("variodyn", "sfIssue_variodyn.gif", "av digital variodyn D1", "03&#x2022;2005", "unmistakably av digital", "sound system", "av digital", "for"),
	new Array ("explore", "sfIssue_explore.gif", "explore!", "05&#x2022;2005", "the designpfad 2005 design event", "info", "client", "filler"),
	new Array ("alfredo", "sfIssue_alfredo.gif", "acamp alfredo", "07&#x2022;2005", "sit comfortably!", "a bistro-chair", "acamp", "for"),
	new Array ("gp", "sfIssue_gp.gif", "GP designpartners", "09&#x2022;2005", "formerly GP gregerpauschitz", "info", "client", "filler"),
	new Array ("conlastic", "sfIssue_conlastic.gif", "conlastic", "11&#x2022;2005", "do you speak conlastic?", "info", "client", "filler"),
	new Array ("magic3", "sfIssue_magic3.jpg", "Sagem magic3", "01&#x2022;2006", "focused on one key!", "info", "Sagem", "filler"),
	new Array ("twinline", "sfIssue_twinline.gif", "Artweger twinline", "03&#x2022;2006", "to shower and to bathe", "info", "Artweger", "filler"),
	new Array ("float", "sfIssue_float.gif", "B&ouml;sendorfer float", "05&#x2022;2006", "the gesture of opening", "info", "B&ouml;sendorfer", "filler"),
	new Array ("jano", "sfIssue_jano.jpg", "JANO", "07&#x2022;2006", "the evolution revolves", "info", "client", "filler"),
	new Array ("chairdrive", "sfIssue_chairdrive.jpg", "Doppelmayr chairdrive", "09&#x2022;2006", "quick and enthusiastic", "the drive unit housing of fixed-grip chair lifts as an industrial product", "doppelmayr", "filler"),
	new Array ("aonvirenchecker", "sfIssue_aonvirenchecker.gif", "IKARUS aonVirenchecker", "01&#x2022;2007", "complexity made easy", "complex virus defense at long last simple", "ikarus", "filler"),
	new Array ("dpm", "sfIssue_dpm.gif", "Philips dpm 9600", "03&#x2022;2007", "a tool for professionals", "a digital voice recorder with barcode scanner and docking station", "Philips Speech Processing", "filler"),
	new Array ("havanna", "sfIssue_havanna.gif", "acamp havanna", "05&#x2022;2007", "garden chairs", "wicker chair series for campalazzo", "filler"),
	new Array ("cargoo", "sfIssue_cargoo.jpg", "CRL cargoo", "07&#x2022;2007", "innovation in operation", "loading procedure now faster and safer thanks to interaction design", "crl car rail logistics", "for"),
	new Array ("unig-v", "sfIssue_unigvision.gif", "Doppelmayr UNIG-Vision", "11&#x2022;2007", "a huge product design", "station for ropeways with detachable chairs and gondolas", "doppelmayr", "for"),
	new Array ("aero3237", "sfIssue_aero3237.gif", "MINERVA aero3237", "01&#x2022;2008", "the product is the brand", "LCD TV, logo, packaging", "robust electronics gmbh", "for"),
	new Array ("c-design", "sfIssue_c_design.gif", "Citro&euml;n c-design", "05&#x2022;2008", "3 out of 5 awards for GP", "drain, kite and citro&euml;nette", "competition by Citro&euml;n", "for"),
	new Array ("crs955", "sfIssue_crs955.gif", "Philips CRS 955", "07&#x2022;2008", "a simply professional conference recording system", "a boundary layer conference microphone, a remote control and a click-on interview microphone are the ingredients for this conference recording system", "Philips Speech Processing", "for"),
	new Array ("champ", "sfIssue_champ.gif", "HEI champ", "09&#x2022;2008", "photovoltaic exterior light", "photovoltaic exterior light solution", "HEI hornbacher energie innovation", "for"),
	new Array ("datastation", "sfIssue_datastation.gif", "Otto Bock datastation", "11&#x2022;2008", "seven with one blow", "software suite for prostheses, orthoses and mobility solutions", "Otto Bock", "for"),
	new Array ("epen", "sfIssue_epen.gif", "Siemens ePen&trade;", "3&#x2022;2009", "unobtrusive remote control for hearing aids", "a sleek remote that allows you to manually change programs and control volume of Siemens Hearing Instruments [BTEs]", "Siemens Audiology Group", "for"),
	new Array ("klimt", "sfIssue_klimt.gif", "Vienna Acoustics klimt series speaker", "5&#x2022;2009", "freedom to music", "technological innovation meets innovative form factor, outstanding sound design deserves outstanding product design", "Vienna Acoustics", "for"),
	new Array ("body+soul", "sfIssue_body+soul.gif", "Artweger body+soul", "7&#x2022;2009", "relax and recreate", "a steam shower, completely redesigned. not just another wellness temple, but a steam shower for the rest of us", "Artweger", "for")
//	new Array ("link", "urltitle", "stayfocused", "issue", "tagline", "info", "client", "filler")
);


function findIndex (myUrl) {
	tmpIndices = new Array (-1, -1, -1);
	tmp= myUrl.split("/")
	tmpWorksPath= tmp[tmp.length-2];
	//tmpWorksPath= myUrl.slice(7, myUrl.lastIndexOf("/"));
	for (i= 0; i < issuesList.length; i++) {
 		if (issuesList[i][0] ==  tmpWorksPath) {
 			tmpIndices[0]= i-1;
 			tmpIndices[1]= i;
 			tmpIndices[2]= i+1;
 		}
 	}
	if (tmpIndices[1] == -1) { tmpIndices[1]= 1; }
//	if (tmpIndices[1] == 0) { tmpIndices[0]= issuesList.length-1; } else if (tmpIndices[1] == issuesList.length-1) { tmpIndices[2]= 0; }
	{ return tmpIndices; }
}

theIndeces= findIndex(location.pathname);

function formString (myIndex) {
	tmpArray= issuesList[myIndex];
	tmpString= '<a href="'+linkPath+tmpArray[0]+'/" title="<img class=img_whiteborder src='+urltitlePath+tmpArray[1]+'><br>issue '+tmpArray[3]+'<br><b>'+tmpArray[2];
	if (tmpArray[4] != "tagline") {
		tmpString += ' &#8212; '+tmpArray[4];
	}
	tmpString += '</b>">';
	return tmpString;
}


function writeHorizNavi () {
	if (theIndeces[1] > 0 ) { myString = formString(theIndeces[0])+'previous: '+issuesList[theIndeces[0]][2]+'</a> | '; } else { myString = ""; }
	myString += '<a href="'+linkPath+'archive/">archive</a>';
	if (theIndeces[1] < issuesList.length-1) { myString += ' | '+ formString(theIndeces[2])+'next: '+issuesList[theIndeces[2]][2]+'</a>'; } else { myString += ' | future issue'; }
	document.write (myString);
}