	
$(document).ready(
	function() {
		$("#left_search").bind( "click", activLeftSearch );
		$("#right_search").bind( "click", activRightSearch );
		$.NiceJForms.build({
			imagesPath:"templates/standard/img/nicejforms_img/"
			});
		}
	);
	
function updateModelList () {
	$("#advert_model").html ('<option>1</option>');
	//document.getElementById('advert_model').options[0] = new Option ('aaa', '1');
	//document.getElementById('advert_model').options[1] = new Option ('bbb', '2');
	$("#advert_model").attr("value", "2");
	$('#advert_model').combobox.update();
	//alert(document.getElementById('advert_model').value);
}

/*$(document).ready(function(){
	$('select').combobox( {
		comboboxContainerClass: "comboboxContainer",
		comboboxValueContainerClass: "comboboxValueContainer",
		comboboxValueContentClass: "comboboxValueContent",
		comboboxDropDownClass: "comboboxDropDownContainer",
		comboboxDropDownButtonClass: "comboboxDropDownButton",
		comboboxDropDownItemClass: "comboboxItem",
		comboboxDropDownItemHoverClass: "comboboxItemHover",
		comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
		comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer",
		animationType: "none"
		});
	$('select').combobox.onChange = function () {
		//updateModelList();
	}
	});*/

function setCookie(c_name,value,expiredays){
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name){
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}
