function _car(i,n) {
var m=document.getElementById('model'+i),p=document.images['plus'+i];
if(p.src.match(/\+/)){if(m)m.style.display='block';p.src='/img2/-'+n+'.gif';}
else{if(m)m.style.display='none';p.src='/img2/+'+n+'.gif';}
return false;}

var eml=/^([\w-~_]+\.)*[\w-~_]+@([\w-_]+\.){1,3}\w{2,4}$/i;
var a_msg = [['name','Ваше имя'],['email','E-mail',eml],['text','Комментарий']];
var a_tdr = [['name','Ваше имя'],['email','E-mail',eml],['phone','Телефон']];
function _chf(o,a){
	var s='';
	for(var i=0;i<a.length;i++)
	if(!o.elements[a[i][0]].value)s+=a[i][1]+': поле необходимо заполнить;\n';
	else if(a[i][2])if(!o.elements[a[i][0]].value.match(a[i][2]))s+=a[i][1]+': поле заполнено неверно;\n';
	if(!s)return true;
	alert(s);
	return false;
}

function _clr(f,w,h,t){
var o=document.images.modelimg;
if(!o)return;
with(o){src='/res/'+f;width=w;height=h;alt=t;}
document.getElementById('colorname').innerHTML=t;
return false;}

function _sh(s){
var o=document.getElementById(s);
if(o)o.style.display=o.style.display=='none'?'block':'none';
return false;
}

//function _pw(f,s,w,h){w=window.open('javascript:document.write(\'<html><head><title>'+s+'</title></head><body style="margin:0px;overflow:hidden"><img src="/res/'+f+'" border="0" width="'+w+'" height="'+h+'" alt="'+s+'" /></body></html>\')','w','width='+w+',height='+h+',left=0,top=0,toolbar=no,directories=no,scrollbars=no,location=no');w.focus();return false;}
