
var imgpreload=new Array()
for (i=0;i<=imgsname.length-1;i++) {
	imgpreload[i]=new Image()
	imgpreload[i].src=imgsname[i]
}

var i_imgs=0
var thisurl=0
var timer
standstill=standstill*1000

function new_image(nam, imag) {
	var img = null;
	if (document.images) {
		if (!ie4) img = CSFindElement(nam,0);
		else img = document.images[nam];
		if (img) img.src = imag;
	}
}

function new_text(nam, txt) {
	document.getElementById(nam).innerHTML = txt;
}

function show_image(nam, imag) {
	var img = null;
	if (document.images) {
		if (!ie4) img = CSFindElement(nam,0);
		else img = document.images[nam];
		if (img) img.src = imag;
	}
}

function init() {
	new_image('pat',imgsname[i_imgs])
//	new_text('txt',imgsid[i_imgs])
	timer= setTimeout("switchimage()",standstill)
}

function switchimage() {
    clearTimeout(timer)
    i_imgs++
    if (i_imgs>=imgsname.length) {i_imgs=0}
	new_image('pat',imgsname[i_imgs])
//	new_text('txt',imgsid[i_imgs])
	timer= setTimeout("switchimage()",standstill)
}

function gotourl() {
	document.location.href=imgslink[i_imgs]
}

init()
