// JavaScript Document
//showImage('blank');
//homeChangeTxt();


/*slide-shows*/
var thisImage = 1;
var photo = new Array();  

//photo
photo[1] = "images/photo_001.jpg"; 
photo[2] = "images/photo_002.jpg"; 
photo[3] = "images/photo_003.jpg"; 
photo[4] = "images/photo_004.jpg"; 
photo[5] = "images/photo_005.jpg"; 
photo[6] = "images/photo_006.jpg"; 
photo[7] = "images/photo_007.jpg"; 
photo[8] = "images/photo_008.jpg"; 
photo[9] = "images/photo_009.jpg"; 
photo[10] = "images/photo_010.jpg"; 
photo[11] = "images/photo_011.jpg"; 
photo[12] = "images/photo_012.jpg"; 
photo[13] = "images/photo_013.jpg"; 
photo[14] = "images/photo_014.jpg"; 
photo[15] = "images/photo_015.jpg"; 
photo[16] = "images/photo_016.jpg"; 
photo[17] = "images/photo_017.jpg"; 
photo[18] = "images/photo_018.jpg"; 
photo[19] = "images/photo_019.jpg"; 
photo[20] = "images/photo_020.jpg"; 
//

var theNumber=1;
var arrayPos=0;
var realArrayLength=works.length-1;
var startImage=0;

var scrollAmount = 20;//increment for scroller
//called once onload!!!!

function tImage(realImage,pageImage){
	//important to use real arrayPos or counter will fuck up!!
	arrayPos=realImage;
	theNumber = pageImage;
	//update stage
	//document.getElementById('slide_currant').innerHTML = pageImage;
	document.getElementById('photo_number').innerHTML = pageImage;
	document.images.main_image.src =  photo[arrayPos];
	}
//then every time user clicks fwd/bck arrow
function showImage(image){
//alert(currantImage+' '+image);
//image==forward==default
//image ='vit' make cuurantimage=4
//change to switch
switch(image){
	//possibly load the images on the 'case' statement - rather than all at once??
	//set to correct sequence in array
	
	//
	case 'photo':
	arrayPos=1;//real
	startImage=1;//virtual--always 1
	endImage=20;//virtual--total number of slides
	//pageScroll();//function to auto scroll down for bigger images - sweeeeeeeeeeeeeeeet!!
	break;
	//
	case 'forward':
		if(theNumber<endImage){
		arrayPos++;	
		theNumber++;
		}
	break;
	case 'backward':
		if(theNumber>startImage){
		arrayPos--;	
		theNumber--
		}
	break;
	}

//do it wotever - update stage!!

document.images.main_image.src =  photo[arrayPos];
//document.getElementById('slide_max').innerHTML = endImage;
//document.getElementById('slide_currant').innerHTML = theNumber;
document.getElementById('photo_number').innerHTML = theNumber;


return true;
}


function pageScroll() {
    	window.scrollBy(0,scrollAmount); // horizontal and vertical scroll increments
    	scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
}

function multimedia() {
var load = window.open('flash/index.html','','scrollbars=no,menubar=no,height=400,width=500,resizable=no,toolbar=no,top=500,left=40,,status=no');
}

function imageSwap(){
	document.getElementById('multi').src="images/multi_man_r.jpg"
	}
	
function imageBack(){
	document.getElementById('multi').src="images/multi_man.jpg"
	}
