
function getCity(domain) {
	
	//alert(document.getElementById('cityComboSelected').value);
	//document.location="http://localhost/www/www.huistekoop.be/"+document.getElementById('cityComboSelected').value;
	document.location=domain+document.getElementById('cityComboSelected').value;
}

function getDetails(url) {
	window.open(url, "NewWindow");
}

/**************************************************************************************************
 * Ext JS Library 3.0.3
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 **********************************************************************************************$**/

Ext.onReady(function(){

	var cityStore = new Ext.data.JsonStore({
	    url: '_cities.php',
	    root: 'cities',
		autoLoad: true,
	    fields: ['id', 'name']
	});

//var item_template = new Ext.XTemplate(tpl:'<tpl for="."><input class="autocomp">{label:htmlEncode}</input></tpl>');
  //  item_template.compile();


	var cityCombo = new Ext.form.ComboBox({
		applyTo: 'autocomplete',
		fieldLabel: 'Active Random Employee Data',
		store: cityStore,
		valueField: 'id',
		displayField: 'name',
		hiddenName:'cityComboSelected',
		typeAhead: true,	
		//tpl: item_template,
		mode: 'local', //remote
		triggerAction: 'all',
		lastQuery: '',
		//width: 400,
		minChars : 0
	});

});
