function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) {
	var i, j;
	var prompt;
	for (i = selectCtrl.options.length; i >= 0; i--) {
		selectCtrl.options[i] = null;
	}
	prompt = (itemArray != null) ? goodPrompt : badPrompt;
	if (prompt == null) {
		j = 0;
	} else {
		selectCtrl.options[0] = new Option(prompt);
		j = 1;
	}
	if (itemArray != null) {
		for (i = 0; i < itemArray.length; i++) {
			selectCtrl.options[j] = new Option(itemArray[i][0]);
			if (itemArray[i][1] != null) {
				selectCtrl.options[j].value = itemArray[i][1];
			}
			j++;
		}
		selectCtrl.options[0].selected = true;
	}
}

function enableButton()
{
		document.getElementById('gemeinde_button').disabled = false;
}


// TOOLTIP
	wmtt = null;
	tmp_c = null;
	function showT(c) {
		wmtt 	= document.getElementById('tooltip');
		tmp_c = document.getElementById('temp_c');
		wmtt.innerHTML 	= 'loading..';
		tmp_c.innerHTML = '';
			wmtt.style.display 	= "block"
			wmtt.style.position = "absolute"
			//wmtt.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/site/forecast_bg.png', sizingMethod='none')";
			wmtt.style.left 		= (m_x - 10) + "px";
			wmtt.style.top 			= (m_y - 140) + "px";
		tmp_c.innerHTML 			= '<img src="'+c+'" onLoad="img_loaded()"/>';
		tmp_c.c 							= c;
	}
	function hideT() {
		if(wmtt) {
			wmtt.style.display 	= "none";
		}
	}
	function img_loaded() {
		wmtt.innerHTML 				= '<img src="'+tmp_c.c+'"/>';
	}
/// GET X AND Y MAUS
	document.onmousemove = updateMousePosition;
	function updateMousePosition(e) {
		m_x = (document.all) ? window.event.clientX + document.documentElement.scrollLeft : e.pageX;
		m_y = (document.all) ? window.event.clientY + document.documentElement.scrollTop  : e.pageY;
		if (wmtt != null) {
				wmtt.style.left = (m_x - 10) + "px";
				wmtt.style.top 	= (m_y - 140) + "px";
		}
	}

	function hideElement(id) {
		document.getElementById(id).style.display = "none";
		return false;
	}

