function init(){
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
speed = 0
statdyn = "dynamic"
started = 0
if (n){
	s1 = document.scroll01
	maxw = s1.clip.width
	}
if (ie){
	s1 = document.all.scroll01.style
	maxw = s1.pixelWidth
	}
document.onmousemove = mouseMove
if (n) document.captureEvents(Event.MOUSEMOVE)
}
function mouseMove(e) {
if (n) {var x=e.pageX; var y=e.pageY}
if (ie) {var x=event.x; var y=event.y}
	if(x > 100 && x < 916 && y > 170 && y < 520){
	speed = Math.round((x-500)/120)
	if (started == 0) {
		started = 1
		slide()
		}
	}
	else {
		speed = 0
		started = 0
		}	
}
function slide(){
if(statdyn == "dynamic"){
	if(parseInt(s1.left) <= - ((maxw/3)*2) + 50) {
		s1.left = - ((maxw/3) - 50)
		}
	if(parseInt(s1.left) >= -50) {
		s1.left = - ((maxw/3) + 50)
		}
	s1.left = parseInt(s1.left) - speed
	}
if (started != 0) setTimeout("slide()",10)
}

function changelay(nom,map,w,h,sd,house){
statdyn = sd
maxw = (w*3)

if (n) {
	document.layers.plan.document.images.theplan.src = house
	document.layers.scroll01.left = (-w +99)
	document.layers.scroll01.document.open()
	document.layers.scroll01.document.write("<table cellpadding=0 cellspacing=0 border=0 width="+(w*3)+" height="+h+"><tr><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td></tr></table>")
	document.layers.scroll01.document.close()
	}
if (ie) {
	document.all.plan.document.images.theplan.src = house
	document.all.scroll01.style.left = (-w + 99)
	document.all.scroll01.innerHTML = "<table cellpadding=0 cellspacing=0 border=0 width="+(w*3)+" height="+h+"><tr><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td><td width="+w+" height="+h+"><img src=\""+nom+"\" width="+w+" height="+h+" border=0 usemap=\"#"+map+"\"></td></tr></table>"
	}
}
