commimg = new Image(248,50)
commimg.src = "/images/claims-commercial-act.gif"

resimg = new Image(248,50)
resimg.src = "/images/claims-residential-act.gif"

busimg = new Image(248,50)
busimg.src = "/images/claims-business-act.gif"

function clearEmail() {
	document.getElementById('email').value = '';
}

function loginScr() {
	document.getElementById('loginf').style.display = 'none';
	document.getElementById('logins').style.display = 'inline';
}

function showStatement() {
	document.getElementById('mission').style.display = 'inline';
}

function hideWhenFinished(){
  document.getElementById('FlashMovie').style.display = 'none';
  startShow(2);
}

function playLenny()
{
	var movie = "http://www.ispeakvideo.com/remote/floridaloss/floridalossfinal.swf";
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,19,0" width="320" height="375">\n');
	document.write('<param name="movie" value="../' + movie + '">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<param name="menu" value="false">\n');
	document.write('<param name="wmode" value="transparent">\n');
	document.write('<param name="allowScriptAccess" value="always">\n');
	document.write('<embed src="' + movie + '" quality="high" wmode="transparent" scale="noscale" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="320" height="375" menu="false" scale="noscale"></embed>\n');
	document.write('</object>');
}

function playmovie() {
	document.getElementById('cover').style.display = 'none';
	document.getElementById('play').style.display = 'none';
	document.getElementById('movie').style.display = 'inline';
	
	var flashvars = {};
	flashvars.autostart = "true";
	var params = {};
	var attributes = {};
	attributes.id = "movie";
	
	swfobject.embedSWF("Florida-Public-Adjusters.swf", "movie", "640", "360", "9.0.0", false, flashvars, params, attributes);

}

var xmlhttp=false;

/*@cc_on @*/
/*@if (@_jscript_version >= 5)
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}

@else
	xmlhttp = false;
@end @*/

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
}

function subscribeNL() {
	if (xmlhttp) {
	var sURL = "subscribe.php?newmail=" + document.getElementById('email').value;
	xmlhttp.open("GET", sURL, true);
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				var nothing = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null)
	}
	document.getElementById('subDone').style.display = 'inline';
}

function showDidYouKnow() {
	document.getElementById('didyou').style.display = 'none';
	document.getElementById('didyou2').style.display = 'inline';
}

function startShow(num) {
	document.getElementById('1').style.display = 'none';
	document.getElementById('2').style.display = 'none';
	document.getElementById('3').style.display = 'none';
	document.getElementById('4').style.display = 'none';
	document.getElementById(num).style.display = 'inline';
	num = num + 1;
	if(num == 5) num = 1;
	var funct = "startShow(" + num + ")";
	setTimeout(funct,7000);
}

function showForm() {
	document.getElementById('rform').style.display = 'inline';
}

function hideForm() {
	document.getElementById('rform').style.display = 'none';
}

function showtime(){
	var wilmaDate=new Date();
	wilmaDate.setFullYear(2010,8,24);
	
	var myDate=new Date();
	var one_day=1000*60*60*24
	document.write(Math.ceil((wilmaDate.getTime()-myDate.getTime())/(one_day)));
}

function getClock(){
	var montharray = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    var mydate = new Date();
    var year = mydate.getYear();
    if (year < 1000) year += 1900;
    var month = mydate.getMonth();
    var daym = mydate.getDate();
    if (daym<10) daym = "0"+daym;

    var cdate = montharray[month] + " " + daym + ", " + year;
    document.getElementById("dateshow").innerHTML = cdate;
}

function addFavorite() {
	var url = location.href;
	var title = document.title;
	if(window.sidebar){ // Firefox
          window.sidebar.addPanel(title, url,'');
    }else if(window.opera){ //Opera
          var a = document.createElement("A");
          a.rel = "sidebar";
          a.target = "_search";
          a.title = title;
          a.href = url;
          a.click();
    } else if(document.all){ //IE
          window.external.AddFavorite(url, title);
    }
}