	// MAIN MENU
	
	var activeBut = new Array;
	var mouseOverBut = new Array;
	var deactiveBut = new Array;
	var active = 0;
	
	/**
	 * Add filenames of three states of menu item to corresponding arrays
	 * @param Int		id			Id of item processing
	 * @param String	act_name	Filename of picture with active state
	 * @param String	deact_name	Filename of picture with inactive state
	 * @param String	over_name	Filename of picture with state when mouse is over 
	 */
	function loadItem(id, act_name, deact_name, over_name){
		activeBut[id] = new Image;
		activeBut[id].src = act_name;
		
		deactiveBut[id] = new Image;
		deactiveBut[id].src = deact_name;
		
		mouseOverBut[id] = new Image;
		mouseOverBut[id].src = over_name;
	}
	
	function actItem(no) {
		document.getElementById('item'+no).src = mouseOverBut[no].src;
	}
	
	function deactItem(no) {
		document.getElementById('item'+no).src = deactiveBut[no].src;
	}
	
	function checkMailForm() {
		var reg=/^[.0-9a-z_-]{1,20}@(([0-9a-z_-]+\.)+(com|net|org|mil|edu|gov|arpa|info|biz|inc|name|mil|museum|[a-z]{2})|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$/;
				
		if (document.getElementById('data_from').value == '') {
			alert("Geben Sie Ihren Namen ein");
			document.getElementById('data_from').focus();
			return false;
		}
		
		if (document.getElementById('data_to').value == '') {
			alert("Geben Sie Ihre E-Mail-Adresse ein");
			document.getElementById('data_to').focus();
			return false;
		}
		else {
			var arr=reg.exec(document.quote_form.elements['quote[Email]'].value);
			if (arr == null){
	    		alert ("Die E-Mail-Adresse ist inkorrekt");
				document.getElementById('data_to').focus();
	    		return false;
			}
		}
		alert('Der Brief ist erfolgreich gesendet');
	
		return true;
	}
	
	// validation section
	
	function isInteger(s){
		var i;

		if (isEmpty(s))
		if (isInteger.arguments.length == 1) return 0;
		else return (isInteger.arguments[1] == true);
		
		for (i = 0; i < s.length; i++)
		{
		var c = s.charAt(i);
		
		if (!isDigit(c)) return false;
		}

		return true;
	}
	
	function insertInnerHTML(element, html){
		element.innerHTML = html;
	}