//if (window != window.top) top.location.href = location.href + "?tk";

function menu_jump(path) {
	window.location.href = path.options[path.selectedIndex].value;
}
current_switch = 1;
timer_switch = true;

function slide_timer() {
	if (timer_switch) {
		timer_switch = false;
		switch_slide(current_switch + 1);
		switch_timer = setTimeout("slide_timer()", 15000);
	}
	else {
		clearTimeout(switch_timer);
	}
}
switch_timer = setTimeout("slide_timer()", 15000);

function switch_slide(num) {
	if (num > num_thumbs) {
		num = 1;
	}
	e = document.getElementById("slide_" + current_switch);
	e.style.display = "none";
	f = document.getElementById("slide_" + num);
	f.style.display = "block";
	current_switch = num;
	if (!timer_switch) {
		timer_switch = true;
	}
	else {
		timer_switch = false;
	}
}

pos = 0;
dir = -1;
go = false;
oid = 'test';
function pxIntTop(id) {
	e = document.getElementById(id);
	if (e.style.top == '') {
		return 0;
	}
	return parseInt(e.style.top);
}
function scrolldown(id) {
	if (id != oid) {
		pos = pxIntTop(id);
	}
	oid = id;
	dir = -1;
	go = true;
	scroll(id);
}
function scrollup(id) {
	if (id != oid) {
		pos = pxIntTop(id);
	}
	oid = id;
	dir = 1;
	go = true;
	scroll(id);
}
function scroll(id) {
	e = document.getElementById(id);
	parentE = e.parentNode.parentNode.parentNode.parentNode;
	if (go && ((dir == -1 && parentE.offsetHeight <= e.offsetHeight + pos + 46)
	 || (dir == 1 && e.offsetHeight > e.offsetHeight + pos))) {
		pos += (5 * dir);
		e.style.top = pos + 'px';
		window.setTimeout('scroll("' + id + '");', 25);
	}
}
function stop() {
	go = false;
}

