var def_opa = 30;
var sel_obj = null;

function initIt(obj){
	changeOpac(def_opa, obj.id);
}

function fadeIn(obj){
	if ((obj != sel_obj) && (obj != null))
		opacity(obj.id, def_opa, 100, 500);
}

function fadeOut(obj){
	if ((obj != sel_obj) && (obj != null))
		opacity(obj.id, 100, def_opa, 500);
}

function show_car_info(obj, id){
	if (sel_obj == obj) return false;
	var s2 = sel_obj;
	sel_obj = obj;

	fadeOut(s2);
	opacity('gdet', 100, 0, 100);
	ajaxQuery("rent_a_car/inc/load_car_info2.php?id="+id, 'ret_info(ajx_data)');
}

function ret_info(data){
	var info = document.getElementById('gdet');
	if (data != ''){
		info.innerHTML = data;
		opacity('gdet', 0, 100, 100);
	}
}

var posGB=0;

function GetPos(e){
	var pos = getMouseXY(e);
	var _pos = pos[0]-posGB;
	var GB = document.getElementById('gal_brow');
	var wGB = 496;

	if (_pos < (wGB/3)){
		if (GB.scrollLeft > 0){
			GB.scrollLeft = GB.scrollLeft -4;
		}
	}
	if (_pos > ((wGB/3)*2)){
		if (GB.scrollLeft < wGB){
			GB.scrollLeft = GB.scrollLeft +4;
		}
	}
	//document.getElementById('GB').scrollLeft = ((pos[0]-pos[0]*.1) - posGB) ;
}
