// JavaScript Document

var current = 0;

function swapimg( show ){

	var piece = new Array();
	var title = new Array();
//	var size = new Array();
//	var meta = new Array();


	piece[0] = 'gal_iso_arch_map/full/full-accutech-house.jpg';
	title[0] = '';

	piece[1] = 'gal_iso_arch_map/full/full-bass_cove.jpg';
	title[1] = '';

	piece[2] = 'gal_iso_arch_map/full/full-california-map.jpg';
	title[2] = '';

	piece[3] = 'gal_iso_arch_map/full/full-camera_map.jpg';
	title[3] = '';

	piece[4] = 'gal_iso_arch_map/full/full-campsite.jpg';
	title[4] = '';

	piece[5] = 'gal_iso_arch_map/full/full-campus.jpg';
	title[5] = '';

	piece[6] = 'gal_iso_arch_map/full/full-campus2.jpg';
	title[6] = '';

	piece[7] = 'gal_iso_arch_map/full/full-fremont_street.jpg';
	title[7] = '';

	piece[8] = 'gal_iso_arch_map/full/full-garage.jpg';
	title[8] = '';

	piece[9] = 'gal_iso_arch_map/full/full-GE-ERV.jpg';
	title[9] = '';

	piece[10] = 'gal_iso_arch_map/full/full-green_campus.jpg';
	title[10] = '';

	piece[11] = 'gal_iso_arch_map/full/full-high_rise.jpg';
	title[11] = '';

	piece[12] = 'gal_iso_arch_map/full/full-home_office.jpg';
	title[12] = '';

	piece[13] = 'gal_iso_arch_map/full/full-homedepot.jpg';
	title[13] = '';

	piece[14] = 'gal_iso_arch_map/full/full-house.jpg';
	title[14] = '';

	piece[15] = 'gal_iso_arch_map/full/full-irvine.jpg';
	title[15] = '';

	piece[16] = 'gal_iso_arch_map/full/full-nascar_track.jpg';
	title[16] = '';

	piece[17] = 'gal_iso_arch_map/full/full-relo-map.jpg';
	title[17] = '';

	piece[18] = 'gal_iso_arch_map/full/full-restrnt_equip.jpg';
	title[18] = '';

	piece[19] = 'gal_iso_arch_map/full/full-sustainable_city.jpg';
	title[19] = '';

	piece[20] = 'gal_iso_arch_map/full/full-TSI-callouts.jpg';
	title[20] = '';


	document.getElementById( 'featured' ).src = piece[show];
	document.getElementById( 'featured' ).alt = title[show];
//	document.getElementById( 'featuretitle' ).innerHTML = title[show];

	for( i = 0; i < meta.length; i++ ){
		document.getElementById( 'item' + i ).style.opacity = '.5';
	}
	document.getElementById( 'item' + ( show ) ).style.opacity = '.99';
	
	current = ( show );
	
	if ( current == 0 ){
		document.getElementById( 'previous' ).style.display = 'none';
	}
	else{
		document.getElementById( 'previous' ).style.display = '';
	}
	if ( current == (meta.length - 1) ){
		document.getElementById( 'next' ).style.display = 'none';
	}
	else{
		document.getElementById( 'next' ).style.display = '';
	}
}


function next(){
	working = current;
	swapimg( working + 1 );
}

function previous(){
	working = current;
	swapimg( working - 1 );
}
