function animateMainMenu(){
	var menuMain = document.getElementById("menu");
	var menuAnchors = menuMain.getElementsByTagName("A");
	/*var submenu = document.getElementById("submenu");
	submenu.style.display = "none";
	submenu.onmouseover = function(){
		submenu.style.display = "block";
		menuAnchors[2].className += " over";
		menuAnchors[2].parentNode.className += " over";
		}
	
	submenu.onmouseout = function(){
		menuAnchors[2].className = menuAnchors[2].className.slice(0, menuAnchors[2].className.indexOf(" over"));
		menuAnchors[2].parentNode.className = menuAnchors[2].parentNode.className.slice(0, menuAnchors[2].className.indexOf(" over"));
		if ((!menuAnchors[2].className.indexOf("has-submenu"))&&(menuAnchors[2].parentNode.className.indexOf("active"))){
			submenu.style.display = "none";
			}
		}
	*/
	for (var jj=0; jj<menuAnchors.length; jj++){
		/*if ((!menuAnchors[jj].parentNode.className.indexOf("active")) && (!menuAnchors[jj].className.indexOf("has-submenu"))){
			submenu.style.display = "block";
		   }*/
		menuAnchors[jj].onmouseover = function(){
			this.className += " over";
			this.parentNode.className += " over";
/*			if (!this.className.indexOf("has-submenu")){
				submenu.style.display = "block";
				}*/
			}
		menuAnchors[jj].onmouseout = function(){
			this.className = this.className.slice(0, this.className.indexOf(" over"));
			this.parentNode.className = this.parentNode.className.slice(0, this.className.indexOf(" over"));
/*			if ((!this.className.indexOf("has-submenu"))&&(this.parentNode.className.indexOf("active"))){
				submenu.style.display = "none";
				}*/
			}
 		}
	}

function setFormFocusEvent(){
	var inputs = document.getElementsByTagName("INPUT");
	var textareas = document.getElementsByTagName("TEXTAREA");
	for (i=0; i<inputs.length; i++){
		inputs[i].onfocus = function(){
			this.style.borderColor = "#f14b30";
			this.isfocused = true;
			}
		inputs[i].onblur = function(){
			this.style.borderColor = "#696969";
			this.isfocused = false;
			}
		inputs[i].onmouseover = function(){
			this.style.borderColor = "#f14b30";
			}
		inputs[i].onmouseout = function(){
			if (this.isfocused != true){
				this.style.borderColor = "#696969";
				}
			}
		}
	for (i=0; i<textareas.length; i++){
		textareas[i].onfocus = function(){
			this.style.borderColor = "#f14b30";
			this.isfocused = true;
			}
		textareas[i].onblur = function(){
			this.style.borderColor = "#696969";
			this.isfocused = false;
			}
		textareas[i].onmouseover = function(){
			this.style.borderColor = "#f14b30";
			}
		textareas[i].onmouseout = function(){
			if (this.isfocused != true){
				this.style.borderColor = "#696969";
				}
			}
		}
	}

if (window.addEventListener){
	window.addEventListener("load" , animateMainMenu, false);
	window.addEventListener("load" , setFormFocusEvent, false);
	}
	else{
		window.attachEvent("onload", animateMainMenu);
		window.attachEvent("onload", setFormFocusEvent);
		}
	
