var staten = { "al":1,"ak":2,"az":3,"ar":4,"ca":5,"co":6,"ct":7,"de":8,"dc":9,"fl":10,"ga":11,"hi":12,"id":13,"il":14,"in":15,"ia":16,"ks":17,"ky":18,"la":19,"me":20,"md":21,"ma":22,"mi":23,"mn":24,"ms":25,"mo":26,"mt":27,"ne":28,"nv":29,"nh":30,"nj":31,"nm":32,"ny":33,"nc":34,"nd":35,"oh":36,"ok":37,"or":38,"pa":39,"ri":40,"sc":41,"sd":42,"tn":43,"tx":44,"ut":45,"vt":46,"va":47,"wa":48,"wv":49,"wi":50,"wy":51 }; var statecolor = new Array(); var statepalette = new Array("#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#d1cf45","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030","#83b030"); var statetimeout = new Array(); var overbox = false; var oversomething = false; $(document).ready(function (){ for(var st in staten){ statecolor[st] = staten[st]; } drawmap('initial'); }); function drawmap (caller) { $("#mapcontainer").html(''); var mywidth = $("#mapcontainer").width(); var myheight = 710; var ratio = 1; if(mywidth != 980){ ratio = mywidth / 980; myheight = Math.floor(mywidth * .65); $("#mapcontainer").css({ 'height': myheight + 'px' }); } var R = Raphael("mapcontainer", mywidth, myheight), attr = { "fill": "#ffffff", "stroke": "#fff", "stroke-opacity": ".8", "stroke-linejoin": "round", "stroke-miterlimit": "4", "stroke-width": "0.75", "stroke-dasharray": "none" }, usRaphael = {}; for (var state in usmap) { usRaphael[state] = R.path(usmap[state]).attr(attr); if(ratio != 1){ usRaphael[state].scale(ratio,ratio,0,0); } usRaphael[state].attr({fill: statepalette[statecolor[state]]}); } for (var state in usRaphael) { (function (st, state) { st[0].style.cursor = "pointer"; $(st[0]).mouseover(function (e) { st.animate({fill: '#ff2400'}, 300); boxon(e.pageX,e.pageY,state) R.safari(); oversomething = true; clearTimeout(statetimeout[state]); }); $(st[0]).mouseout(function () { oversomething = false; statetimeout[state] = setTimeout(function () { st.animate({fill: statepalette[statecolor[state]]}, 300); if(!oversomething) { boxoff(); } R.safari(); }, 200); }); })(usRaphael[state], state); } } function boxon (x,y,statecode){ var txt = '

' + usmap_longnames[statecode] + ': '; if(staten[statecode] == 1) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 2) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 3) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 4) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 5) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 6) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 7) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 8) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 9) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 10) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 11) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: No

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 12) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: No

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 13) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: No

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 14) {txt += "

Athletes must be removed from play if they have a suspected head injury: No

State maintains \"return-to-play\" guidelines. No

Written clearance from a medical professional required in order to return to play: N/A

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 15) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 16) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 17) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 18) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 19) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 20) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 21) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 22) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 23) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 24) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 25) {txt += "

Athletes must be removed from play if they have a suspected head injury: No

State maintains \"return-to-play\" guidelines. No

Written clearance from a medical professional required in order to return to play: No

State requires education around traumatic brain injuries: No

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 26) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 27) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 28) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 29) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 30) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: No

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 31) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 32) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. No

Written clearance from a medical professional required in order to return to play: N/A

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 33) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 34) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 35) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 36) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 37) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 38) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 39) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 40) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 41) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 42) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 43) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 44) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 45) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 46) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 47) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 48) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 49) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} if(staten[statecode] == 50) {txt += "

Athletes must be removed from play if they have a suspected head injury: Yes

State maintains \"return-to-play\" guidelines. Yes

Written clearance from a medical professional required in order to return to play: Yes

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: No

";} if(staten[statecode] == 51) {txt += "

Athletes must be removed from play if they have a suspected head injury: No

State maintains \"return-to-play\" guidelines. No

Written clearance from a medical professional required in order to return to play: N/A

State requires education around traumatic brain injuries: Yes

Coaches are required to attend traumatic brain injury awareness training: Yes

";} txt += "

"; $("#mapover").html(txt); boxdetermine(x,y); $("#mapover").show(); overbox = true; } function unobfuscate (txtin){ txtin = txtin.replace(/_/g,' '); var txtout = txtin.charAt(0).toUpperCase() + txtin.slice(1); if(txtout == 'County state'){ txtout = "County & state"; } return txtout; } function boxdetermine (x,y){ var defx = x - 300; var defy = y - 110; if(defy < 350){ defy = y + 160; if(defx < 10){ defx += 240; } } else { if(defx < 200){ defx += 340; } } $("#mapover").css({ 'top': defy + 'px', 'left': defx + 'px' }); } function numfmt (nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } function boxoff() { $("#mapover").hide(); $("#mapover").unbind('mouseenter'); $("#mapover").unbind('mouseleave'); overbox = false; } $(document).mousemove(function(e){ if(overbox){ boxdetermine(e.pageX,e.pageY); } });