/*
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/

// Checks if a field is empty, and if so, resets the input's content to the default value
function checkField( obj, value )
{
	// Match any amount of white spaces
	if( obj.value == "" )
	{
		obj.value = value;
	}
	
	return false;
}

// Clears an input's content
function clearField( obj, value )
{
	if( obj.value == value )
	{
		obj.value = "";
	}
	
	return false;
}

function markFields(fields)
{
	var arr = new Array;
	arr = fields.split("%");
	for (i=0;i<arr.length;i++)
	if (document.getElementById(arr[i]))
	{
		document.getElementById(arr[i]).style.backgroundColor = '#F9E5E5';
	}
}

function changePic(src, newTitle)
{
	document.getElementById('aBigPic').href = mainWebsiteURL+'content/gallery/pop/'+src;
	document.getElementById('aBigPic').title = newTitle;
	document.getElementById('iBigPic').src = mainWebsiteURL+'content/gallery/'+src;
}
