function buildMBan(pp,id,nome,vv,step,tstop,trun) {
	var o=document.getElementById(id)
	if (o) {
		var d=document.createElement("div")
		d.setAttribute("id",nome)
		d.setAttribute("top","0px")
		d.setAttribute("left","0px")
		o.appendChild(d)
		for(var j=0;j<vv.length;j++) {
			var i=document.createElement("img")
			i.setAttribute("alt",vv[j][1])
			i.setAttribute("src",pp+vv[j][1])
			if(vv[j][0]=="") {
				d.appendChild(i)
			} else {
				var h=document.createElement("a")
				h.setAttribute("href",vv[j][0])
				h.appendChild(i)
				d.appendChild(h)
			}
		}
		if(vv.length>1) {
			var tl=vv.length*step
			var i=document.createElement("img")
			i.setAttribute("alt",vv[0][1])
			i.setAttribute("src",pp+vv[0][1])
			d.appendChild(i)
			setTimeout("moveBan("+tl+","+step+",'"+nome+"',"+tstop+","+trun/2+")",tstop)
		}
	}	
}
function moveBan(md,step,id,tstop,trun) {
	var o=document.getElementById(id)
	if (o) {
		var cl=-1*o.style.top.replace(/px/gi,'')
		cl++
		var tn=trun
		if ((cl%step)==0) {
			tn=tstop
			if (cl==md) {cl=0}
		}
		o.style.top="-"+cl+"px"
		setTimeout("moveBan("+md+","+step+",'"+id+"',"+tstop+","+trun+")",tn)
	}
}


function buildMHBan(pp,id,nome,vv,nn,step,tstop,trun) {
	var o=document.getElementById(id)
	if (o) {
		var d=document.createElement("div")
		d.setAttribute("id",nome)
		d.setAttribute("top","0px")
		d.setAttribute("left","0px")
		o.appendChild(d)
		var t=document.createElement("table")
		var tb=document.createElement("tbody")
		var tr=document.createElement("tr")
		tb.appendChild(tr)
		t.appendChild(tb)
		d.appendChild(t)
		for(var j=0;j<vv.length;j++) {
			var td=document.createElement("td")
			var i=document.createElement("img")
			i.setAttribute("alt",vv[j][1])
			i.setAttribute("src",pp+vv[j][1])
			if(vv[j][0]=="") {
				td.appendChild(i)
			} else {
				var h=document.createElement("a")
				h.setAttribute("href",vv[j][0])
				h.appendChild(i)
				td.appendChild(h)
			}
			tr.appendChild(td)
		}
		if(vv.length>nn) {
			
			for(var j=0;j<nn;j++) {
				var td=document.createElement("td")
				var i=document.createElement("img")
				i.setAttribute("alt",vv[j][1])
				i.setAttribute("src",pp+vv[j][1])
				if(vv[j][0]=="") {
					td.appendChild(i)
				} else {
					var h=document.createElement("a")
					h.setAttribute("href",vv[j][0])
					h.appendChild(i)
					td.appendChild(h)
				}
				tr.appendChild(td)
			}
			var tl=(vv.length)*step
			setTimeout("moveHBan("+tl+","+step+",'"+nome+"',"+tstop+","+trun/2+")",tstop)
		}
	}
}
function moveHBan(md,step,id,tstop,trun) {
	var o=document.getElementById(id)
	if (o) {
		var cl=-1*o.style.left.replace(/px/gi,'')
		cl++
		var tn=trun
		if ((cl%step)==0) {
			tn=tstop
			if (cl==md) {cl=0}
		}
		o.style.left="-"+cl+"px"
		setTimeout("moveHBan("+md+","+step+",'"+id+"',"+tstop+","+trun+")",tn)
	}
}