function initInputs()
{
	var inputs = document.getElementsByTagName("input");
	for (var i=0; i<inputs.length; i++)
	{
		if ((inputs[i].type == "text" || inputs[i].type == "password") && (inputs[i].name == "name" || inputs[i].name == "email" || inputs[i].name == "username" || inputs[i].name == "password"))
		{
			inputs[i].onfocus = function ()
			{
				if (this.value == "Name" || this.value == "Email" || this.value == "Username" || this.value == "Password")
					this.value = "";
			}
			inputs[i].onblur = function ()
			{
				if (this.value == "" && this.name == "name") this.value = "Name";
				if (this.value == "" && this.name == "email") this.value = "Email";
				if (this.value == "" && this.name == "username") this.value = "Email";
				if (this.value == "" && this.name == "password") this.value = "Password";
			}
		}
	}
}
function ffFix() 
{ 
  	if (navigator.userAgent.indexOf("Firefox/3.0") != -1)
	{
		var main = document.getElementById("main");
		main.style.width = "933px";
	}
}
function columnHeight() 
{
	var column = document.getElementById("col-1");
	var container = document.getElementById("columns-holder");
	if(column && container)
		column.style.height = container.clientHeight + "px";
}
function initNav()
{
	if (typeof document.body.style.maxHeight == 'undefined')
	{
		var nav = document.getElementById("main-nav");
		var lis = nav.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++)
		{
			lis[i].onmouseover = function()
			{
				this.className += " hover";
			}
			lis[i].onmouseout = function()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
		var _nav = document.getElementById("lang");
		_nav.onmouseover = function()
		{
			this.className += " hover";
		}
		_nav.onmouseout = function()
		{
			this.className = this.className.replace(" hover", "");
		}
	}
}
if (window.addEventListener)
{
	window.addEventListener("load", ffFix, false);
	window.addEventListener("load", columnHeight, false);
	window.addEventListener("load", initInputs, false);
}
else if (window.attachEvent)
{
	window.attachEvent("onload", initNav);
	window.attachEvent("onload", columnHeight);
	window.attachEvent("onload", initInputs);
}