function nij_onload(){}$(document).ready(function(){emailLink();markTargetedContent();$("#tabbedUI").tabs();$("#accordion").accordion({header:"h3"});$("#dialog_link, ul#icons li").hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")});var a=$("#main").css("font-size");$(".resetFont").click(function(){$("html").css("font-size",a)});$(".increaseFont").click(function(){var d=$("#main").css("font-size");var e=parseFloat(d,10);var c=e*1.2;$("#main").css("font-size",c);return false});$(".decreaseFont").click(function(){var d=$("#main").css("font-size");var e=parseFloat(d,10);var c=e*0.8;$("#main").css("font-size",c);return false});initSearchFormEffect();syncNav();fancyFundingOpps();$("table.striped-phone tbody tr:not([th]):odd").addClass("odd");$("table.striped-phone tbody tr:not([th]):even").addClass("even");$("dl.expander dd").expander();$("div.topicsMain").summarize({summaryElements:3,expandText:"See all choices",collapseText:"Collapse list",expandEffect:"slideDown",collapseEffect:"slideUp"});$("div.panelExpand").summarize({summaryElements:1,expandText:"(View description)",collapseText:"(Hide description)",expandWrapper:"<span></span>",collapseWrapper:"<span></span>",expandEffect:"fadeIn",collapseEffect:"fadeOut",expandSpeed:"0",collapseSpeed:"0",expandInsertion:"appendTo"});$("#viewAllLink").html("<a href='#' id='viewAll'>View all descriptions</a> |");$("#hideAllLink").html("<a href='#' id='hideAll'>Hide all descriptions</a>");$("#viewAll").bind("click",function(){$(".details").css("display","block");$(".expand").css("display","none");$(".collapse").css("display","inline")});$("#hideAll").bind("click",function(){$(".details").css("display","none");$(".expand").css("display","inline");$(".collapse").css("display","none")});$(".rounded").corners();$(".rounded-nav-top").corners("5px top");$(".rounded-nav-bottom").corners("5px bottom");if($.tablesorter){$.tablesorter.addParser({id:"tdDateComment",is:function(c){return false},format:function(f){var e=/SO:(\d{12})/;var d=e.exec(f);var c=0;if(d){c=d[1]}return c},type:"numeric"});$.tablesorter.addParser({id:"tdManualSortOrder",is:function(c){return false},format:function(f){var e=/SO:(\d+)/;var d=e.exec(f);var c=0;if(d){c=d[1]}return c},type:"numeric"});$.tablesorter.addWidget({id:"repeatHeaders",format:function(e){if(!this.headers){var d=this.headers=[];$("thead th",e).each(function(){d.push("<th>"+$(this).text()+"</th>")})}$("tr.repeated-header",e).remove();for(var c=0;c<e.tBodies[0].rows.length;c++){if((c%8)==7){$("tbody tr:eq("+c+")",e).before($("<tr></tr>").addClass("repeated-header").html(this.headers.join("")))}}}});$(".trainingTS").tablesorter({headers:{3:{sorter:"tdDateComment"}},widgets:["zebra","repeatHeaders"]});var b=[[3,0]];$(".trainingTS").trigger("sorton",[b]);$("#webFirstLink").click(function(){var c=[[5,1]];$(".trainingTS").trigger("sorton",[c]);return false});$("#classroomFirstLink").click(function(){var c=[[5,0]];$(".trainingTS").trigger("sorton",[c]);return false});$(".eventTS").tablesorter({headers:{2:{sorter:"tdDateComment"}},widgets:["zebra","repeatHeaders"]});var b=[[2,0]];$(".eventTS").trigger("sorton",[b]);$(".awardTS").tablesorter({widgets:["zebra","repeatHeaders"]});$(".standardsTS").tablesorter({headers:{1:{sorter:"tdDateComment"}},widgets:["zebra","repeatHeaders"]});var b=[[1,1]];$(".standardsTS").trigger("sorton",[b])}});function initSearchFormEffect(){var a="Search";var b=null;if(document.forms.searchForm){b=document.forms.searchForm["q"]}if(b){b.style.color="#445C8B";b.__hasFocus=function(){this.value="";this.style.textAlign="left";this.style.paddingLeft="3px";this.style.backgroundColor="white"};b.__lostFocus=function(){this.value=a;this.style.textAlign="left";this.style.paddingLeft="3px";this.style.backgroundColor="#E8E7E6"};b.__lostFocus();b.onfocus=function(){if(b.value==a){b.__hasFocus()}};b.onblur=function(){if(!b.value){b.__lostFocus()}}}}function syncNav(){var c=document.getElementById("leftNav");var b=document.getElementById("breadcrumbs");var e=document.location.href;if(c){var a=c.getElementsByTagName("a");var f;for(var d=0;d<a.length;d++){f=a[d];if(f.href==e){if(f.parentNode.nodeName!="H1"&&f.parentNode.nodeName!="H2"){f.parentNode.style.backgroundColor="white";f.parentNode.style.borderRight="none";f.style.color="#000000";f.style.fontWeight="bold"}f.onclick=function(){return false}}}}if(b){var a=b.getElementsByTagName("a");var f;for(var d=0;d<a.length;d++){f=a[d];if(f.href==e){f.style.color="black";f.style.textDecoration="none";f.onclick=function(){return false}}}}}function mailpage(){mail_str="mailto:?subject=Thought this information from NIJ would interest you...";mail_str+="&body=";mail_str+="You can find this information at %0d"+escape(location.href)+"%0dThis link will take you to a page within the Web site of the National Institute of Justice, the research, development, and evaluation agency of the U.S. Department of Justice.  Note the '.gov' Web address.%0dThe NIJ does not collect any personal information from you or the person who sent you this message.%0dThanks very much for visiting www.ojp.usdoj.gov/nij.%0d";location.href=mail_str}function emailLink(){var a=location.href;var c=$(".displayTitle");if(c.length==0){c=$("#displayTitle")}var d="";if(c.length>0){d=c.html();d=d.replace(/ /g,"^")}var b='<div id="changeFont"><p style="margin-top:0px; margin-bottom:5px;">Text size: <a class="increaseFont" href="#"></a><a class="decreaseFont" href="#"></a></div><p style="margin-top:0px; margin-bottom:0px;"><a title="CTRL + P" class="printlink" href="javascript:window.print()">Print page</a> | <a class="emaillink" href="http://nij.ncjrs.gov/emailcolleague/emailfriend.asp?Link=Email&Page='+a+"&dtitle="+d+'" onclick="link_popup(this,\'location=yes,scrollbars=yes,menubar=yes,resizable=yes,toolbar=yes,status=yes,dependent=yes,width=700,height=575,top=0\');return false">E-mail page</a></p><p style="margin-top:5px; margin-bottom: 0px"><a href="http://www.ojp.usdoj.gov/nij/about/contact.htm" class="contactlink">Contact us</a> | <a href="http://www.ojp.usdoj.gov/nij/about/subscribe.htm" class="subscribelink">Subscribe</a> </p>';$("#Email_Print").html("");$("#Email_Print").append(b)}function markTargetedContent(){var a="urlTargetSelected";var c=/#(.*)$/;var b=c.exec(document.location.href);if(b&&b.length>=2){$("#"+b[1]).addClass(a);$("."+b[1]).addClass(a)}}function grep(b,d){var c=new Array();for(var a=0;a<b.length;a++){if(d(b[a])){c.push(b[a])}}return c}function map(b,d){var c=new Array();for(var a=0;a<b.length;a++){c.push(d(b[a]))}return c}function cne(b){function a(c){return c.className==b}return a}function fancyFundingOpps(){var a=document.getElementById("content");if(a){var b=grep(a.getElementsByTagName("div"),cne("fundingOpp"));map(b,function(){var e=arguments[0];var c=grep(e.getElementsByTagName("div"),cne("summary"))[0];if(c){c.style.display="none";e.style.borderBottom="1px solid #DDDDDD";e.style.margin="0px 0px 15px 0px";e.style.padding="5px";var d=document.createElement("a");d.innerHTML="Show Description";d.href="#";d.style.display="block";d.style.outline=0;d.onclick=function(){if(this.innerHTML=="Show Description"){this.innerHTML="Hide Description";c.style.display="block"}else{this.innerHTML="Show Description";c.style.display="none"}return false};e.insertBefore(d,e.getElementsByTagName("p")[0])}})}}var _POPUP_FEATURES="location=0,statusbar=0,menubar=0,width=400,height=300";function raw_popup(a,d,b){if(!b){b=_POPUP_FEATURES}if(!d){d="_blank"}var c=window.open(a,d,b);c.focus();return c}function link_popup(b,a){return raw_popup(b.getAttribute("href"),b.getAttribute("target")||"_blank",a)}function MM_findObj(f,e){var c,b,a;if(!e){e=document}if((c=f.indexOf("?"))>0&&parent.frames.length){e=parent.frames[f.substring(c+1)].document;f=f.substring(0,c)}if(!(a=e[f])&&e.all){a=e.all[f]}for(b=0;!a&&b<e.forms.length;b++){a=e.forms[b][f]}for(b=0;!a&&e.layers&&b<e.layers.length;b++){a=MM_findObj(f,e.layers[b].document)}if(!a&&e.getElementById){a=e.getElementById(f)}return a}function MM_validateForm(){var d,b,a,k,g,e,c,h,j="",f=MM_validateForm.arguments;for(d=0;d<(f.length-2);d+=3){g=f[d+2];val=MM_findObj(f[d]);if(val){k=val.name;if((val=val.value)!=""){if(g.indexOf("isEmail")!=-1){b=val.indexOf("@");if(b<1||b==(val.length-1)){j+="- "+k+" must contain an e-mail address.\n"}}else{if(g!="R"){e=parseFloat(val);if(isNaN(val)){j+="- "+k+" must contain a number.\n"}if(g.indexOf("inRange")!=-1){b=g.indexOf(":");c=g.substring(8,b);h=g.substring(b+1);if(e<c||h<e){j+="- "+k+" must contain a number between "+c+" and "+h+".\n"}}}}}else{if(g.charAt(0)=="R"){j+="- "+k+" is required.\n"}}}}if(j){alert("The following error(s) occurred:\n"+j)}document.MM_returnValue=(j=="")};