function Resize_DIV(s_font)
{
var w=document.body.clientWidth;
var divide_index=900;
if (w>divide_index) 
	{	
		wdiv='49%';
	}
else
	{	
		wdiv='auto';
	}
	o = document.getElementById('Привет1');
	o.style.width=wdiv;
	o = document.getElementById('news2');
	o.style.width=wdiv;
	o = document.getElementById('news3');
	o.style.width=wdiv;
	o = document.getElementById('news4');
	o.style.width=wdiv;
}
function ChangeFont(size,obj)
{
rep_str='s_font='+size;
if (document.location.href.indexOf('?')>0) 
{
if (document.location.href.indexOf('s_font=')>0) 
{
	re = /s_font=\d{1}/;
	str = document.location.href;
	newstr=str.replace(re, rep_str);
	document.getElementById(obj).href=newstr;
}
else 
{ document.getElementById(obj).href=document.location.href+'&'+rep_str;}
}
else document.getElementById(obj).href=document.location.href+'?'+rep_str;
}
function go_search(str,el_id)
{
	var obj_id=document.getElementById(el_id);
	var res=/^\d{4,5}$/.test(str);
	if (res) 
	{
		if (el_id=='frm')
		{
			var el_id=el_id+'1';
			var inp_id=document.getElementById(el_id);
			obj_id.action='/dealers/includes/find_by_label.html';
			inp_id.value=1;
		}
		else 
			obj_id.href='/price/search_panel.html?textfield='+str;
	}
	else
	{
		if (el_id=='frm')
			obj_id.action='/price/search_panel.html';
		else 
			obj_id.href='/price/search_panel.html?textfield='+str;
	}
}
function setsizes()
{
var isMSIE=document.all && document.all.item && !isOpera; 
var rzz1=document.getElementById('bp');
var rzz2=document.getElementById('rthumbnail');
var rzz3=document.getElementById('content');

if (isMSIE) {
	if (screen.Width>=1024)
	{
	rzz1.width=document.body.clientWidth-240;
	rzz1.height=screen.Height-350;
	rzz2.height=screen.Height-305; 
	}
	else
	{
	rzz2.style.display='none';
	rzz3.style.margin=0;
	rzz1.width=document.body.clientWidth;
	rzz1.height=window.screen.Height*2;
	}
	} 
	else 	{ 
	if (window.screen.width>=1024)
	{
	rzz1.width=innerWidth-240;
	rzz1.height=innerHeight-185;
	rzz2.height=innerHeight-140;
	}
	else
	{
	rzz2.style.display='none';
	rzz3.style.margin=0;
	rzz1.width=innerWidth-20;
	rzz1.height=window.screen.Height*2;
	}
	}
}

