<!--
var LAYER;
var I;
var D;
LAYER=new Array()
function nrfx(init){ 
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=nrfx; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
nrfx(true);
function out_m(obj, clr) {obj.style.backgroundColor=clr;}
function over_m(obj)  {obj.style.backgroundColor='#E3E3E3';}
function cot(o,p){
	d = 0 
	if(!p) return 0;
	for(i=0;i<100 && o.tagName!='BODY';++i){
		if(o.tagName!='TR') d += o[p]
		o = o.parentElement
	}
	return d
}


function Menu(l_px,i_px,o_x,o_y,t_o,singlepivot){
	this.op=parseInt(singlepivot)
	this.to=t_o||1000//timeout, msec
	this.ox=o_x		//more offset x
	this.oy=o_y		//more offset y
	this.lpx=l_px	//layer prefix
	this.ipx=i_px	//image pivot prefix
	this.last_item=0
}
Menu.prototype.die = function(v) {
		if(!(LAYER[this.lpx]=this.la))return this.error=1
		if(this.lt)clearTimeout(this.lt)
		if(LAYER[this.lpx].style){
			/* MSIE */
			if(this.lt)clearTimeout(this.lt)
			if(isNaN(v)){
				tos="if(LAYER['"+this.lpx+"'])LAYER['"+this.lpx+"'].style.visibility='hidden';else document.all."+this.lpx+this.last_item+".style.visibility='hidden';if(D)D.className=''"
				this.lt=setTimeout(tos,this.to)
			}else{
				LAYER[this.lpx].style.visibility='hidden'
			}
		}else{
			/* NET */
			if(!v) this.lt=setTimeout("LAYER["+this.lpx+"].hidden=true",this.to)
			else LAYER[this.lpx].hidden=true
		}
		if(this.ondie)this.ondie(v)
		return false
	}

Menu.prototype.swl = function(v){
		this.die(v)
		if(this.onswl)this.onswl(v)
		if(this.lt)clearTimeout(this.lt)
		var col = this.getLayerImg(v);
		LAYER[this.lpx]=col.L;
		I=col.I;
		if(!LAYER[this.lpx] || !I){
			return this.error=2
		}
		var coord = this.getImgCoords(I);
		if(LAYER[this.lpx].style){
			/* MSIE */
			LAYER[this.lpx].style.left = coord.x;
			LAYER[this.lpx].style.top = coord.y;
			LAYER[this.lpx].style.visibility='visible'
		}else{
			/* NET */
			LAYER[this.lpx].x=coord.x;
			LAYER[this.lpx].y=coord.y;
			LAYER[this.lpx].hidden=false
		}
		this.last_item=v
		this.la=LAYER[this.lpx]
		return false
	}

Menu.prototype.getImgCoords = function(image) {
	var coord = new Object();
	if (navigator.appName=='Netscape') {
		coord.x = image.x;
		coord.y = image.y;
	} else {
		coord.x = cot(image, 'offsetLeft');
		coord.y = cot(image, 'offsetTop');
	}
	coord.x += this.ox;
	coord.y += this.oy;
	return coord;	
}

Menu.prototype.getLayerImg = function(index) {
	var col = new Object();
	i_index	= isNaN(this.op) ? index : this.op
	if (document.getElementById) {
		col.I = document.getElementById(this.ipx + i_index);
		col.L = document.getElementById(this.lpx + index);
	} else {
		col.I = document[this.ipx + i_index];
		col.L = document[this.lpx + index];
	}
	return col;
}

mv	= new Menu('L','i',0,22,500)
mv.onswl	= function(v){
	if(this.last_btn)this.last_btn.className=''
	if(D=this.last_btn=document.all['d'+v])this.last_btn.className='bg12a'
}
mv.ondie	= function(v){
}
//-->
function c_over(obj,event,engname,carname)
{
	el2=document.getElementById('map');
	//obj.src=obj.src.replace('.png','h.png');
el2.src='./car_images/'+carname+'_'+engname+'.jpg';
}
