
(function(){

	/*Use Object Detection to detect IE6*/
	var  m = document.uniqueID /*IE*/
	&& document.compatMode  /*>=IE6*/
	&& !window.XMLHttpRequest /*<=IE6*/
	&& document.execCommand ;
	
	try{
		if(!!m){
			m("BackgroundImageCache", false, true) /* = IE6 only */ 
		}
		
	}catch(oh){};
})();


function loadcontent() 
{

	anidiv("divact1_LOAD2"		,"<img src=\'images/loading.gif\' width=\'148\' height=\'27\' />"		,1);	
	anidiv("divact1","System Check"			,100);
	anidiv("divact1_LOAD"		,"<img src=\'images/loading2.gif\' width=\'16\' height=\'16\'  align=\'absmiddle\' hspace=\'8\' />"		,1);	
	anidiv("divact1","System Check.."		,100);
	anidiv("divact1","System Check..."		,100);
	anidiv("divact1","System Check.."		,100);
	anidiv("divact1","System Check.."		,1);	
	anidiv("divact1_LOAD2"		,""		,100);	
	anidiv("divact1_IMG"		,"<div style=\'border:1px solid #666666;background-color:#8cab44; width:160px\'><img src=\'images/tmb_socialnetwork.jpg\' width=\'130\' height=\'80\' /></div><a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-ContactResults.csv</a>"		,1);	
	anidiv("divact1",'<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' /> '		,400);
	anidiv("divact1_LOAD"		,""		,100);
//	anidiv("divact1","  "					,300);	

//	anidiv("divact1",'<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' />'		,300);
//	anidiv("divact1","  "					,300);	
//	anidiv("divact1",'<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' />'		,300);
	
	Rotanidiv();

}

var timevar = 1000;

function anidiv(div,msg,anitime) 
{
timevar = timevar+anitime;
setTimeout(function() {

						document.getElementById(div).innerHTML = msg;}, timevar);
}

function Rotanidiv(div) 
{

	var filename;
	var doc;
	
	for (i=2;i<=8;i++)
	{
		
		if (i==2)
		{
		filename = "tmb_criminalcheck.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-CriminalResults.csv</a>";
		} else if (i==3) {
		filename = "tmb_court.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-CourtResults.csv</a>";
		} else if (i==4) {
		filename = "tmb_licensesearch.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-BusinessResults.csv</a>";
		} else if (i==5) {
		filename = "tmb_birth.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-VitalResults.csv</a>";
		} else if (i==6) {
		filename = "tmb_census.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-GenResults.csv</a>";
		} else if (i==7) {
		filename = "tmb_driverslicense.jpg";
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-DMVResults.csv</a>";
		} else if (i==8) {
		filename = "tmb_voterregistration.jpg";	
		doc = "<a class=\'db_results\' style=\'font-size:11px; text-decoration:none\' href=\'#\'>Bradley_Beerad_St_Pierre-GovResults.csv</a>";
		}			

		eval('anidiv("divact'+i+'_LOAD2"		,"<img src=\'images/loading.gif\' width=\'148\' height=\'27\' />"		,1)');	
		
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre",50)');
		eval('anidiv("divact'+i+'_LOAD"		,"<img src=\'images/loading2.gif\' width=\'16\' height=\'16\'  align=\'absmiddle\' hspace=\'8\'   />"		,1)');		
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre",50)');
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre.",100)');
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre..",100)');
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre...",100)');
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre..",100)');
		eval('anidiv("divact'+i+'"		,"Loading Results for Bradley_Beerad_St_Pierre.",100)');	
		eval('anidiv("divact'+i+'_LOAD2"		,""		,1)');		
		
		eval('anidiv("divact'+i+'_IMG"		,"<div style=\'border:1px solid #666666;background-color:#8cab44; width:160px\'><img src=\'images/'+filename+'\' width=\'130\' height=\'80\' /></div>"+doc		,1)');	

		eval('anidiv("divact'+i+'"		,"<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' />"				,400)');		
		eval('anidiv("divact'+i+'_LOAD"		,""		,1)');	
//		eval('anidiv("divact'+i+'"		," "								,200)');
//		eval('anidiv("divact'+i+'"		,"<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' />"				,400)');		
//		eval('anidiv("divact'+i+'"		," "								,200)');			
//		eval('anidiv("divact'+(i+1)+'"	,"Loading."							,100)');		
//		eval('anidiv("divact'+i+'"		,"<img src=\'images/button_public_results.gif\' width=\'235\' height=\'40\' />"				,400)');		
		
		

		
	}
	
}





function clientSideInclude(id, url) 
{
	var req;
	//alert(url);

  // For Safari, Firefox, and other non-MS browsers
	if (window.XMLHttpRequest) 
	{
		try 
		{
			req = new XMLHttpRequest();
		} 
		catch (e)
		{
			req = false;
		}
	} 
	else if (window.ActiveXObject)
	{
    // For Internet Explorer on Windows
		try 
		{
			req = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				req = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				req = false;
			}
		}
	}
	var element = document.getElementById(id);

			
	if (!element)
	{
		alert("Bad id " + id +
   		"passed to clientSideInclude." +
   		"You need a div or span element " +
   		"with this id in your page.");
		return;
	}
	if (req)
	{
    // Synchronous request, wait till we have it all


		 function handleAjaxResponse(){
			  if(req.readyState == 4 && req.status == 200) 
			  {
			  element.innerHTML=req.responseText;
			  }
		 }

		req.open('GET', url, true);
	    req.onreadystatechange=handleAjaxResponse;
		req.send(null);

	} 
	else
	{
		element.innerHTML =
		"Sorry, your browser does not support " +
		"XMLHTTPRequest objects. This page requires " +
		"Internet Explorer 5 or better for Windows, " +
		"or Firefox for any system, or Safari. Other " +
		"compatible browsers may also exist.";
	}
return false;
}


function toggle_visibility(id) {

//	alert ('teaserboxdivstyle'+id);
	var e = document.getElementById(('teaserboxdivstyle'+id));
	if(e.style.display == 'none')
	{
	e.style.display = 'block';
	
//			var etxt = document.getElementById('txtarea'+id);	
		//	document.etxt.focus();
		//	document.etxt.select();	
		//	setTimeout('document.getElementById(\'txtarea\'+'+id+').focus();',400);
		//	setTimeout('document.getElementById(\'txtarea\'+'+id+').select();',490);
			
			document.getElementById('txtarea'+id).focus();
			document.getElementById('txtarea'+id).select();
			range = document.getElementById('txtarea'+id).createTextRange()
			range.execCommand('copy');
			window.status="COPIED TO CLIPBOARD"
			setTimeout("window.status=''",2800)	
	
	} else {
	e.style.display = 'none';
	}

	
	
		
}


function toggle_visibilityHEAD() {

//	alert ('teaserbox_divstyle'+id);
	var e = document.getElementById('teaserboxHEADdivstyle');
	if(e.style.display == 'none')
	{
	e.style.display = 'block';
	
		document.getElementById('txtareaHEAD').focus();
		document.getElementById('txtareaHEAD').select();
		range = document.getElementById('txtareaHEAD').createTextRange()
		range.execCommand('copy');
		window.status="COPIED TO CLIPBOARD"
		setTimeout("window.status=''",2800)		
		
	} else {
	e.style.display = 'none';
	}

	
}



function copyurl(id) {

		range = document.getElementById(id).createTextRange()
		range.execCommand('copy');
		window.status="COPIED TO CLIPBOARD"
		setTimeout("window.status=''",2800)		
		
}

