function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

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);

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
document.writeln('<style type="text/css">img {visibility:hidden;} </style>');
window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
if (itsAllGood && img.src.match(/\.png$/i) != null) {
var src = img.src;
img.style.width = img.width + "px";
img.style.height = img.height + "px";
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
img.src = "http://www.compensationframework.org/images/template/blank.gif";
}
img.style.visibility = "visible";
}
}


// Browser safe opacity handling function

function setOpacity( value ) {
 document.getElementById("styled_popup").style.opacity = value / 10;
 document.getElementById("styled_popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}

function fadeOutMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('closeMyPopup()', 800 );
}

function closeMyPopup() {
 document.getElementById("styled_popup").style.display = "none"
}

function fireMyPopup() {
 setOpacity( 0 );
 document.getElementById("styled_popup").style.display = "block";
 fadeInMyPopup();
}


// Browser safe opacity handling function

function setOpacity2( value ) {
 document.getElementById("popup2").style.opacity = value / 10;
 document.getElementById("popup2").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup2() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacity2(' + (i / 10) + ')' , 8 * i );
}

function fadeOutMyPopup2() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacity2(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('closeMyPopup2()', 800 );
}

function closeMyPopup2() {
 document.getElementById("popup2").style.display = "none"
}

function fireMyPopup2() {
 setOpacity2( 0 );
 document.getElementById("popup2").style.display = "block";
 fadeInMyPopup2();
}



function validate()
{
	var continueToSubmit = true;
       email = document.getElementById("l292190-292190");

	if( continueToSubmit && email.value.length == 0 )
	{
		continueToSubmit = false;
		alert('You must provide a value for email address.');
		email.focus();
	} else {

		var emailValue = email.value;

		if( ( emailValue.indexOf( '@' ) <= 0 ) || ( emailValue.indexOf( '.', emailValue.indexOf( '@' ) ) <= 0 ) )
	  	{
			continueToSubmit = false;
			alert('You must provide a valid email address.'); 
			email.focus();
                }

       }
 

       return continueToSubmit;

}



