﻿function switchPhoto(id) {
	document.getElementById("main_photo").src =  pics[id];
	document.getElementById("main_link0").href= links[id];
	document.getElementById("main_link1").href= links[id];
	document.getElementById("main_text").innerHTML = texts[id];
	for(i = 0; i <5; i++) {
		document.getElementById("small_menu"+i).className = "xx06";
	} 
	document.getElementById("small_menu"+id).className = "xx06  xx06-1";
	currentid = id;
} 



function switchPlus() {
	var newid = currentid  + 1;
	if (newid >=5) newid = 0;
	switchPhoto (newid);
	switchtimer=window.setTimeout("switchPlus()",3000);
} 

function autoSwitch(auto) {
	if(auto)
		switchtimer=window.setTimeout("switchPlus()",3000);
	else
		window.clearTimeout(switchtimer);
} 


