function ChangeFotoPrice(sImg)

	{

		var img = document.getElementById('CarIDF');

		img.src = sImg;

	}





var body		= document.getElementById('body');

var arr = new Array("id0", "id1", "id2", "id3", "id4", "id5", "id6", "id7", "id8", "id9", "id10");



function ChangeFoto(sImg, imgSrc)

{

	 

	var img = document.getElementById('CarIDF');

	img.src = sImg;

	

	for(var i=0; i<arr.length; i++)

	{

		var julia = document.getElementById('id' + i);

		

		if(julia != null)

		{

			julia.style.border = "1px solid #EBEBEB";

		}

	}

	

	imgSrc.style.borderWidth = "1px";

	imgSrc.style.borderStyle = "solid";

	imgSrc.style.borderColor = "#B0001D";

}

function ChangeColor(sImg, imgSrc)

{

	 

	var img = document.getElementById('CarIDF');

	img.src = sImg;

	

	for(var i=0; i<arr.length; i++)

	{

		var julia = document.getElementById('id' + i);

		

		if(julia != null)

		{

			julia.style.border = "1px solid #EBEBEB";

		}

	}

	

	imgSrc.style.borderWidth = "1px";

	imgSrc.style.borderStyle = "solid";

	imgSrc.style.borderColor = "#B0001D";

	

	document.getElementById('nID').innerHTML = imgSrc.alt;

}



function ChangeName( imgSrc)

{

	document.getElementById('nID').innerHTML = imgSrc.alt;	

}



function leftMenuOver(obj)

{

	if(obj.style.backgroundColor == "")

	{

		obj.style.backgroundColor = '#B0001D';

		obj.childNodes[0].style.color = '#FFF';

	}

	else

	{

		obj.style.backgroundColor = '';

		obj.childNodes[0].style.color = '';

	}

}





function wopen(imgName, w , h, Title)

{



var wo = window.open("", "abc", "width = " + w + " , height = " + h + ", scrollbars=0, status=0");

wo.document.open();

var win = "";

win = "<html><head><title>";

win += Title;

win += "</title></head>"

win += "<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>";

win += "<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'><tr><td align='center'>";

win += "<a href='#' onClick='self.window.close();'><img src='" + imgName + "' width='" + w + "' height='" + h + "' border='0' alt='" + Title + "'></a>";

win += "</td></tr></table>";

win += "</body></html>";

w += 8;

h += 46;

wo.window.resizeTo(w, h);

wo.document.write(win);

wo.window.focus();

wo.document.close();

}



function changePrice(check, fieldXname, num){

var fieldX = document.getElementById(fieldXname);
var fieldTotal = document.getElementById('fieldTotal');

				if (check.checked)
                    {
					fieldX.innerHTML = parseFloat(fieldX.innerHTML) + num;
                    fieldTotal.innerHTML = parseFloat(fieldTotal.innerHTML) + num;
                    }
                else
                    {
					fieldX.innerHTML = parseFloat(fieldX.innerHTML) - num;
                    fieldTotal.innerHTML = parseFloat(fieldTotal.innerHTML) - num;
                    }
            }


function changeState(layerRef, state)

{ 

	var blockElement = document.getElementById(layerRef).style;

	blockElement.display = state;

}	

function ChangeFoto(oID, nImg)

{

	var img = document.getElementById(oID);

	img.src = nImg;

}	

function setSort(str) {

    document.searchform.sort.value = str;

//    document.getElementById ('page_sort').value = '1';

    document.searchform.submit();

}	