//Image rollovers - just add class="roll" to <img>
function findimg()
{
	var ia,imgs;
// loop through all images of the document
	imgs=document.getElementsByTagName('img');
	for(ia=0;ia<imgs.length;ia++)
	{
// test if the class 'roll' exists
		if(/roll/.test(imgs[ia].className))
		{
// add the function roll to the image onmouseover and onmouseout and send
// the image itself as an object
			imgs[ia].onmouseover=function(){roll(this);};
			imgs[ia].onmouseout=function(){roll(this);};
		}
	}
}
function roll(o)
{
// get the src of the image, and find out the file extension
	var src = o.src;
	var ftype = src.substring(src.lastIndexOf('.'), src.length);
// check if the src already has an _over and delete it, if that is the case 
	if(/_over/.test(src))
	{
		var newsrc = src.replace('_over','');
	}else{
// else, add the _over to the src 
		var newsrc = src.replace(ftype, '_over'+ftype);
	}
	o.src=newsrc;
}


// This gets IE to properly display the hover styles for the navigation menu, 
// since IE ignores pseudo-classes such as :hover, :active, and :focus
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);

//Clear input value text when clicking on input area
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}