function screenSize() {
    var w; // Объявляем переменные, w - длина, h - высота
    w = (window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth));
    return {w:w};
}
function widthtable(){
var wt;
	wt = getComputedStyle(document.getElementById("tab1"),null).width.replace("px", "");
	var ScSiwidth = screenSize().w;
	var sum = (ScSiwidth-wt)/2;
	document.getElementById("td1").style.width= sum + "px";
}
function imgchange(id,fl){
	if(fl==0){
		document.getElementById("img_"+id).style.background = "url(/img/b_i_l_a.png) left top no-repeat";
	}
	else {
		document.getElementById("img_"+id).style.background = "url(/img/b_i_r_a.png) left top no-repeat";
	}
}
function imgchange2(id,fl){
	if(fl==0){
		document.getElementById("img_"+id).style.background = "url(/img/b_i_l_p.png) left top no-repeat";
	}
	else {
		document.getElementById("img_"+id).style.background = "url(/img/b_i_r_p.png) left top no-repeat";
	}
}
function carhid() {
	document.getElementById("car").style.display = "none";
}
function carshow(id) {
	document.getElementById("car").style.display = "block";
	layer(id);
}
var curr = "1";

function layer(id) {
var yl = id;
		document.getElementById("s"+curr).style.display = "none";
		document.getElementById("s"+yl).style.display = "block";
	curr = yl;
}
