//把所有图片的路径写在这里
var imglist = [['images/proje02.gif','All In One'],
			   ['images/proje03.gif','Coffe Pot'],
			   ['images/proje04.gif','Tablet PC'],
			   ['images/proje05.gif','LCD-Monitor/TV'],
			   ['images/proje06.gif','Game Box'],
			   ['images/proje07.gif','Mobile Phone'],
			   ['images/proje08.gif','Tablet PC'],
			   ['images/proje09.gif','Sound'],
			   ['images/proje10.gif','POS'],
			   ['images/proje11.gif','UMPC'],
			   ['images/proje12.gif','Car Controller'],
			   ['images/proje13.gif','Charge1'],
			   ['images/proje14.gif','APad'],
			   ['images/proje15.gif','All In One PC'],
			   ['images/proje16.gif','Mobile Disk'],
			   ['images/proje17.gif','Digital Frame(make the prototype and small run)'],
			   ['images/proje18.gif','Toy(make the prototype for Sumajin)'],
			   ['images/proje19.gif','Mini Usb Monitor (Our own product)']];

var index = 0;
var imgcontent;
var imgtext;

function setEle(){
	imgcontent = document.getElementById("imgcontnet");
	imgtext = document.getElementById("imgtext");
}

function setText(index,text){
	var count = index + 1;
	imgtext.innerHTML = text;
	//imgtext.innerHTML = '当前第 ' + count + ' 张，共 ' + imglist.length + ' 张';
}

function upImg(){
	if(imgcontent == null || imgtext == null) setEle();
	if(imglist.length > (index + 1)){ 
		index ++;
	}else{
		index = 0;
	}
	imgcontent.src = imglist[index][0];
	setText(index,imglist[index][1]);
}

function downImg(){
	if(imgcontent == null || imgtext == null) setEle();
	if(index > 0){ 
		index --;
	}else{
		index = imglist.length - 1;
	}
	imgcontent.src = imglist[index][0];
	setText(index,imglist[index][1]);
}

