function hover(id)
    {
 		elm = document.getElementById(id);
 		if(elm)
 		{
 			if(elm.className == "png")
 				elm.className = "hover";
 			else
 				elm.className = "png";
 		}
        
    }
function noitem(id)
    {
 		nelm = document.getElementById(id);
 		if(nelm)
 		{
 			if(nelm.className == "no")
 				nelm.className = "nohover";
 			else
 				nelm.className = "no";
 		}
        
    }
function imp(id)
    {
 		impid = document.getElementById(id);
 		if(impid)
 		{
 			if(impid.className == "")
 				impid.className = "hover";
 			else
 				impid.className = "";
 		}
        
    }
function impc(id)
    {
 		impcid = document.getElementById(id);
 		if(impcid)
 		{
 			if(impcid.className == "imp")
 				impcid.className = "imph";
 			else
 				impcid.className = "imp";
 		}
        
    }

function GetTyresSearchUrl() {
	var w=document.getElementById('w').value;
	var h=document.getElementById('h').value;
	var r=document.getElementById('r').value;
	var brand=document.getElementById('brand').value;
	if (document.getElementById('season1').checked) {
		var season=document.getElementById('season1').value;
	} else {
		var season=document.getElementById('season2').value;
	}
	
	if (brand>0) {
		brand='&brand='+brand;
	} else {
		brand='';
	}
	
	window.location.href='/search/tyres/'+w+'/'+h+'R'+r+'/?season='+season+brand;
}

function GetWheelsSearchUrl() {
	var w=document.getElementById('ww').value;
	var h=document.getElementById('dd').value;
	var dia=document.getElementById('dia').value;
	var et=document.getElementById('et').value;
	window.location.href='/search/wheels/'+w+'x'+h+'ET'+et+'PCD'+dia;
}

function DelOrder(mode,id) {
	Element.remove(document.getElementById(mode+id));
	makeAJAXCall2('mode='+mode+'&del='+id,3);
}

function orders_ChangeStatus(id,value) {
	Element.remove(document.getElementById('tr'+id));
	makeAJAXCall2('ChangeStatus='+id+'&value='+value,-1);
}

function tests_GetModels(id) {
	makeAJAXCall2('GetModels='+id,4);	
}
