var fade_delay=2000;var fade_speed=2000;var slide_speed=1000;var easing="easeInCubic";function animateAbout(){$("#wrap_out").hide();if($.browser.msie){$("#holder").hide()}$("#wrap_out").fadeTo(0,0,function(){$("#wrap_out").show();$("#header").css("top","-135px");$("#footer").css("top","135px");$("#nav, #content").fadeTo(0,0,function(){$("#wrap_out").fadeTo((fade_speed/2),1,function(){$("#header").animate({top:0},slide_speed,easing);$("#footer").animate({top:0},slide_speed,easing,function(){if($.browser.msie){$("#holder").show()}$("#nav").fadeTo(fade_speed,1);$("#content").fadeTo(fade_speed,1,function(){sIFRReplace()})})})})})}
var photos=["Child_welfare_software.jpg",
"Electronic_Medical_Records_EMR.jpg",
"Mental_healthcare_reporting_software.jpg",
"Clinical_management_software.jpg",
"Clinical_Case_Management.jpg",
"Foster_care_management.jpg",
"Software_for_child_welfare_and_social_services.jpg"];
var photos_alt=["An EMR brings efficiency to your social services organization so you can focus on what you do best",
"EMR/EHR Software for all Social & Human Service Agency Needs",
"An EMR can easily generate detailed and meaningful reports",
"EMR efficiencies allow human services professionals focus on helping people ",
"Defran's experienced EMR support staff is among the best in the industry",
"Clinical management software automates routine tasks so you can focus on helping people in need.",
"An EMR can help reduce or eliminate data entry and redundancy"];
var quotes=["Software_for_social_services.jpg",
"mental_health_software_ayad2.jpg",
"EMR_EHR_solutions_for_behavioral_healthcare.jpg",
"Social_services_software_donnon1.jpg",
"foster_care_software_donnon2.jpg",
"child_welfare_software_gagnon1.jpg",
"Behavioral_health_program_management.jpg",
"Software_for_health_clinic_management.jpg",
"Financial_health_clinic_software.jpg",
"human_services_software_syphers1.jpg",
"clinical_software_syphers2.jpg",
"Behavioral_health_software.jpg"];
var photos_used=[];var quotes_used=[];
var quotes_alt=["A comprehensive clinical and case management software system",
"Software and support for social services and child welfare",
"Defran Systems - True Partnership with human services software",
"Defran Systems provides reliable service and support",
"Our support team is responsive to your needs",
"An EMR can help reduce or eliminate data entry and redundancy",
"EMR Software for mental health, foster care, child welfare and all human services",
"Experienced, reliable Support for your social service management system",
"Schedule an Evolv-CS EMR demo today",
"A powerful EMR for case, clinical and financial management",
"A good partnership is essential for a successful EMR implementation",
"Defran has developed software solutions for the human services for over 25 years"];var photos_used=[];var quotes_used=[];

function rand_img(B,H,G){
	var D=[];
	var C=0;
	var F=0;
	if(H&&G){
		if(Math.floor(Math.random()*2)){
			G=false
		}else{
			H=false
		}
	}
	
	if(H){
		D=photos;
		C=photos.length;
		F=photos_used.length
		Z=photos_alt;
	}else{
		if(G){
			D=quotes;
			C=quotes.length;
			F=quotes_used.length
			Z=quotes_alt;
		}
	}
	if(C&&(C>F)){
		var A=-1;
		while(A==-1){
			A=rand(C);
			var I=(H)?photos_used:((G)?quotes_used:null);
			
			if(I){
				$(I).each(function(){var J=parseInt(this.substr(1),10);if(A==J){A=-1}})
			}
		}
		var E=null;
		if(H){
			E="photo";
			photos_used.push("_"+A)
		}else{
			if(G){
				E="quote";
				quotes_used.push("_"+A)
			}
		}
		if(E){
			$(B).attr("src","./_img/_"+E+"s/"+D[A-1])
			$(B).attr("alt",Z[A-1])
		}
	}
}

function rand(A){return Math.floor(Math.random()*A+1)}

$(function(){
	if((typeof (delaySIFR)=="undefined")||!delaySIFR){sIFRReplace()}
	img_w=$("#slideshow_container #slideshow_wrap");img_pa=$("#slideshow_container #slideshow_wrap div.photo");img_ta=$("#slideshow_container #slideshow_wrap div.text");if($(img_w).length&&$(img_pa).length&&$(img_ta).length){slideshow_start()}$(".rand_photo").each(function(){rand_img(this,true,false)});
	$(".rand_quote").each(function(){rand_img(this,false,true)});$(".rand_photo_quote").each(function(){rand_img(this,true,true)});if($("#holder").length&&$("#scrollbar").length){var A=new dw_scrollObj("wn","lyr",null);A.setUpScrollbar("dragBar","track","v");var B=60;$("#holder").mousewheel(function(C,D){dw_scrollObj.scrollBy("wn",0,(D*B),0);return false})}else{if($("#lyr")){$("#lyr").css("visibility","visible")}}$("#demo_request").submit(function(){var C=[{id:"first_name",caption:"First Name"},{id:"last_name",caption:"Last Name"},{id:"org",caption:"Organization"},{id:"title",caption:"Title"},{id:"phone",caption:"Phone"},{id:"email",caption:"Email"}];var D=true;$.each(C,function(){if(!$.trim($("#"+this.id).val())){alert("Please specify your "+this.caption+".");$("#"+this.id).focus();D=false;return false}});return D});if($("#demo_request").length){if(document.layers){document.captureEvents(Event.KEYDOWN)}document.onkeydown=function(C){var D=C?(C.which?C.which:C.keyCode):event.keyCode;if(D==13){$("#demo_request").submit();return false}}}$("#landing_info_request").submit(function(){var C=[{id:"first_name",caption:"First Name"},{id:"last_name",caption:"Last Name"},{id:"org",caption:"Organization"},{id:"phone",caption:"Phone"},{id:"email",caption:"Email"}];var D=true;$.each(C,function(){if(!$.trim($("#"+this.id).val())){alert("Please specify your "+this.caption+".");$("#"+this.id).focus();D=false;return false}});return D});if($("#landing_info_request").length){if(document.layers){document.captureEvents(Event.KEYDOWN)}document.onkeydown=function(C){var D=C?(C.which?C.which:C.keyCode):event.keyCode;if(D==13){$("#landing_info_request").submit();return false}}}if($("#client_login_form").length){if(document.layers){document.captureEvents(Event.KEYDOWN)}document.onkeydown=function(C){var D=C?(C.which?C.which:C.keyCode):event.keyCode;if(D==13){$("#client_login_form").submit();return false}}}});