
	function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft, curtop];
	}	
		//	var t = new Array();
		//var l = new Array();
	function showlist(tui, id) {
		var pos,t,l,e;

		e = document.getElementById(id);

			
			tui = document.getElementById(tui);
			
			
			if ( e.style.display == 'block' )  hidelist(id);
			else {
				
				pos = findPos(tui);
				t = (pos[1]+21)+'px';
				l = (pos[0]-1)+'px';
				e.style.left = l;
				e.style.top = t;
				e.style.display = 'block';
			

		}

	}
	function hidelist(el) {
	    e = document.getElementById(id);
		e.style.display = 'none';
	}
	
	function city(id, city, cityId)
	{
        var input = document.getElementById(id);
        var hidden = document.getElementById('CityId');
        input.value = city;
        hidden.value = cityId;
	}
	
	function setLoading(id)
    {
        var image = document.getElementById(id);
        image.className = 'imageLoading';
    }
