function submitForm()
{
	var continueToSubmit = true;
	if( continueToSubmit && document.optin.OILB_EMAIL.value.length != 0 )
	{
		var emailValue = document.optin.OILB_EMAIL.value;
		if( ( emailValue.indexOf( '@' ) <= 0 ) || ( emailValue.indexOf( '.', emailValue.indexOf( '@' ) ) <= 0 ) )
	{
			continueToSubmit = false;
			alert('You must provide a valid email address.');
			document.optin.OILB_EMAIL.focus();
		}
	}
	if( continueToSubmit && document.optin.OILB_EMAIL.value.length == 0 )
	{
		continueToSubmit = false;
		alert('You must provide a value for Email.');
		document.optin.OILB_EMAIL.focus();
	}
	if( continueToSubmit )
	{
		document.optin.submit();
	}
}


	sfHover = function() {
	var sfEls = document.getElementById("sfnav").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);

function syncSelected(obj,correspondingobj){
	if(obj.type == "checkbox"){
		if(obj.checked){
			if(!(parseInt(correspondingobj.value) >= 1))
				correspondingobj.value = 1;
		}else
			correspondingobj.value = 0;
	}else{
		if(isNaN(obj.value)){
			obj.value = 1;
			correspondingobj.checked = true;
		}else{
			if(obj.value > 0)
				correspondingobj.checked = true;
			else
				correspondingobj.checked = false;
		}
	}
}
