function drawPractice(thePractice,width,height,inPopUp){if(typeof(noFlash)==="undefined"){var noFlash=false}if(typeof(newFlashVar)!="undefined"){noFlash=newFlashVar}if(iPad){noFlash=true}if((typeof(thePractice.hasHtml5)=="boolean"&&thePractice.hasHtml5)||(typeof(thePractice.hasHtml5)=="string"&&thePractice.hasHtml5=="true")){thePractice.hasHtml5="true"}else{thePractice.hasHtml5="false"}if((typeof(thePractice.hasMp4)=="boolean"&&thePractice.hasMp4)||(typeof(thePractice.hasMp4)=="string"&&thePractice.hasMp4=="true")){thePractice.hasMp4="true"}else{thePractice.hasMp4="false"}if(lastEmail=="johndnurse@gmail.com"){}var result="";if(thePractice.type==0||thePractice.type==null){if(thePractice.fileType==="8"){result+='<img src="/'+thePractice.baseDir+"/"+thePractice.fileName+'.gif" width="'+width+'" height="'+height+'" >'}else{if(thePractice.fileType==="10"){result+='<img src="/'+thePractice.baseDir+"/"+thePractice.fileName+'.gif" width="'+width+'" height="'+height+'" >'}else{if(thePractice.fileType==="9"){result+='<img src="/'+thePractice.baseDir+"/"+thePractice.fileName+'.jpg" width="'+width+'" height="'+height+'" >'}else{if(width===56&&(lastSportName==="Golf"||lastSportName==="Ice Hockey"||lastSportName==="Rugby League"||lastSportName==="Rounders"||lastSportName==="Volleyball"||lastSportName==="Workout"||lastSportName==="Handball"||lastSportName==="Agility"||lastSportName==="Athletics"||lastSportName==="Cricket"||lastSportName==="Basketball"||lastSportName==="Tennis"||lastSportName==="Gymnastics"||lastSportName==="Netball"||lastSportName==="Rugby"||lastSportName==="Hockey"||lastSportName==="Field Hockey"||lastSportName==="Football"||lastSportName==="Soccer")){result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/54/"+thePractice.fileName;if(thePractice.fileType==="VMP4"||thePractice.fileType==="ANIM"||thePractice.fileType==="CHLK"||thePractice.fileType==="CUST"||thePractice.fileType==="ADUP"){result+='.png" width="54" height="36" >'}else{result+='.gif" width="54" height="36" >'}}else{if(width===100&&(lastSportName==="Golf"||lastSportName==="Ice Hockey"||lastSportName==="Rounders"||lastSportName==="Volleyball"||lastSportName==="Workout"||lastSportName==="Handball"||lastSportName==="Agility"||lastSportName==="Athletics"||lastSportName==="Cricket"||lastSportName==="Basketball"||lastSportName==="Tennis"||lastSportName==="Gymnastics"||lastSportName==="Netball"||lastSportName==="Rugby"||lastSportName==="Hockey"||lastSportName==="Field Hockey"||lastSportName==="Football"||lastSportName==="Soccer")){result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/100/"+thePractice.fileName;if(thePractice.fileType==="VMP4"||thePractice.fileType==="ANIM"||thePractice.fileType==="CHLK"||thePractice.fileType==="CUST"||thePractice.fileType==="ADUP"){result+='.png" width="100" height="66" >'}else{result+='.gif" width="100" height="66" >'}}else{if(noFlash&&!iPad){result+='<center><p style="font-size:12px;background-color:#eeeeee;padding:4px;">want to see animations? get adobe flash,<br/><a href="http://get.adobe.com/flashplayer/" target="_blank">http://get.adobe.com/flashplayer/</a></p>'}if((thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"||thePractice.fileType=="6"||thePractice.fileType==="3"||thePractice.fileType=="21"||thePractice.fileType==="0")&&(noFlash&&!iPad)){if(thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"){result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.png">'}else{result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.gif">'}if(thePractice.fileType==="6"){result+='<a href="/'+thePractice.baseDir+"/pdf/"+thePractice.fileName+'.pdf" target="_blank" style="text-decoration:none;font-size:13px;background-color:#FFFFFF;padding:6px;"><img src="/userapp/app/images/pdfFilesm.gif" border="0"> Download PDF</a>'}result+="</center>"}else{if((thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"||thePractice.fileType=="6"||thePractice.fileType==="3"||thePractice.fileType=="21"||thePractice.fileType==="0")&&iPad&&thePractice.hasHtml5=="true"&&width==thePractice.width){var dt=new Date();var frameIdH="id"+dt.getTime();var frameSrc="http://"+sphost+"/"+thePractice.baseDir+"/html5/"+thePractice.fileName+".html?dt="+dt.getTime();result+='<div id="iFrameHolder'+frameIdH+'"></div>';setTimeout(function(){var elIFrame=document.createElement("iframe");var dt=new Date();elIFrame.src=frameSrc;var frameId="newCard2"+dt.getTime();elIFrame.id=frameId;elIFrame.frameBorder=0;elIFrame.scrolling="no";elIFrame.style.width=thePractice.width+"px";elIFrame.style.border="border:1px solid #bbbbbb;";elIFrame.style.height=thePractice.height+"px";document.getElementById("iFrameHolder"+frameIdH).appendChild(elIFrame)},1000);return result}else{if((thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"||thePractice.fileType=="6"||thePractice.fileType==="3"||thePractice.fileType=="21"||thePractice.fileType==="0")&&iPad&&thePractice.hasMp4=="true"){if(thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"){var thePoster="/"+thePractice.baseDir+"/thumbs/"+thePractice.fileName+".png"}else{var thePoster=thePoster="/"+thePractice.baseDir+"/thumbs/"+thePractice.fileName+".gif"}if(thePractice.fileType==="VMP4"){result+='<video poster="'+thePoster+'" src="/'+thePractice.baseDir+"/mp4/"+thePractice.fileName+'.mp4" controls="true" width="'+width+'" height="'+height+'">'}else{result+='<video poster="'+thePoster+'" src="/'+thePractice.baseDir+"/mp4/"+thePractice.fileName+'.mp4" controls="true" width="'+width+'" height="'+height+'">'}return result}else{if((thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"||thePractice.fileType=="6"||thePractice.fileType==="3"||thePractice.fileType=="21"||thePractice.fileType==="0")&&iPad&&thePractice.hasHtml5=="false"&&thePractice.hasMp4=="false"){result+='<div style="position:absolute;width:297px;padding-left:6px;padding-top:2px;margin-top:182px;font-size:10px;color:#ffffff;z-index:99;background-color:#440000;height:18px;">';result+="sorry this ones not iPad/iPhone friendly yet";result+="</div>";if(thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"){result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.png">'}else{result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.gif">'}if(thePractice.fileType==="6"){result+='<a href="/'+thePractice.baseDir+"/pdf/"+thePractice.fileName+'.pdf" target="_blank" style="text-decoration:none;font-size:13px;background-color:#FFFFFF;padding:6px;"><img src="/userapp/app/images/pdfFilesm.gif" border="0"> Download PDF</a>'}result+="</center>";return result}}}}if((thePractice.fileType==="VMP4"||thePractice.fileType==="ADUP"||thePractice.fileType=="6"||thePractice.fileType==="3"||thePractice.fileType=="21"||thePractice.fileType==="0")&&(noFlash&&iPad)){result+='<video src="http://www.sportplan.net/'+thePractice.baseDir+"/mp4/"+thePractice.fileName+'.mp4" controls="true" width="'+width+'" height="'+height+'">'}if(thePractice.fileType==="0"&&!noFlash){result+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0">';result+='<param name="movie" value="http://sportplan3.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf">';result+='<param name="quality" value="high">';result+='<param name="PLAY" value="true">';result+='<param name="LOOP" value="false">';result+='<param name="bgcolor" value="'+thePractice.colour+'">';result+='<param name="SCALE" value="exactfit">';result+='<embed wmode="transparent"  src="http://sportplan3.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf"  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="'+thePractice.colour+'" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0" play="true" loop="false" scale="exactfit">';result+="</embed></object>"}if(thePractice.fileType==="VMP4"&&!noFlash){var theConfig="";if(sphost.indexOf("sportplan.net")>-1){theConfig+="#$8fa9f7e72fede7785d7"}if(sphost.indexOf("sportplan.com")>-1){theConfig+="#$4c99b38ddff9946a90c"}theConfig+='"play":{"opacity":"0"},';theConfig+='"clip":{"url":"http://'+sphost+"/"+thePractice.baseDir+"/mp4/flv/"+thePractice.fileName+'.flv","autoPlay":false,"autoBuffering":true}}';var now=new Date();var movieScale=width/300;result+='<div id="mh'+now.getTime()+""+(playersInPage)+'" style="width:'+width+"px;height:"+height+'px;text-align:left;">';result+='<img src="http://'+sphost+"/"+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.png" style="z-index:1;position:absolute;width:'+width+"px;height:"+height+'px;" />';result+="<a href=\"javascript:loadPlayer('http://"+sphost+"/"+thePractice.baseDir+"/mp4/flv/','"+thePractice.fileName+"','mh"+now.getTime()+""+(playersInPage++)+'\');" style="z-index:2;position:absolute;width:'+width+"px;height:"+height+'px;text-align:center;"><img src="/drills/img/play_large.png" alt="" border="0" style="margin-top:'+parseInt(70*movieScale)+"px;margin-left:"+parseInt(((width-83)/2)*movieScale)+'px;" width="'+parseInt(83*movieScale)+'"/></a>';result+="</div>"}if(thePractice.fileType==="ADUP"||thePractice.fileType==="3"||thePractice.fileType=="21"&&!noFlash){result+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0">';result+='<param name="movie" value="http://sportplan3.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf">';result+='<param name="quality" value="high">';result+='<param name="PLAY" value="true">';result+='<param name="LOOP" value="false">';result+='<param name="bgcolor" value="'+thePractice.colour+'">';result+='<param name="SCALE" value="exactfit">';result+='<embed wmode="transparent" src="http://sportplan3.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf"  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="'+thePractice.colour+'" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0" play="true" loop="false" scale="exactfit">';result+="</embed></object>"}if(thePractice.fileType=="6"&&!noFlash){result+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0">';result+='<param name="movie" value="http://www.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf">';result+='<param name="quality" value="high">';result+='<param name="PLAY" value="true">';result+='<param name="LOOP" value="false">';result+='<param name="bgcolor" value="'+thePractice.colour+'">';result+='<param name="SCALE" value="exactfit">';result+='<embed wmode="transparent" src="http://www.sportplan.net/'+thePractice.baseDir+"/"+thePractice.fileName+'.swf"  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="'+thePractice.colour+'" width="'+width+'" height="'+height+'" align="top" vspace="0" hspace="0" border="0" play="true" loop="false" scale="exactfit">';result+="</embed></object>";result+='<a href="/'+thePractice.baseDir+"/pdf/"+thePractice.fileName+'.pdf" target="_blank" style="text-decoration:none;font-size:13px;background-color:#FFFFFF;padding:6px;"><img src="/userapp/app/images/pdfFilesm.gif" border="0"> Download PDF</a>'}if(thePractice.fileType==="ANIM"){if(!noFlash){result+=writeOutAnimatorDrill("/"+thePractice.baseDir+"/"+thePractice.fileName+".swf",width,height,inPopUp)}else{result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.png" width="'+width+'" height="'+height+'" >'}}if(thePractice.fileType==="CUST"||thePractice.fileType==="CHLK"){result+='<img src="http://www.sportplan.net/'+thePractice.baseDir+"/thumbs/"+thePractice.fileName+'.png" height="'+height+'"  width="'+width+'" />'}if(thePractice.customType==="CUST"||thePractice.customType==="CHLK"){result+='<img src="'+thePractice.imageSource+'" height="'+height+'"  width="'+width+'" />'}if(thePractice.customType==="ANIM"||thePractice.customType==="ADUP"){if(width<200){result+='<img src="'+thePractice.imageSource+'" height="'+height+'"  width="'+width+'" />'}else{return drawAnimatorDrill(thePractice,width,height)}}}}}}}}if(thePractice.type==1){if(thePractice.customPracticeId==38114){result+='<img src="/drills/img/print/notes.png" width="'+width+'" height="'+height+'">'}else{if(thePractice.customType==="ANIM"){if(width<200){result+='<img src="'+thePractice.imageSource+'" height="'+height+'"  width="'+width+'" />'}else{var bgColor="#ffffff";return drawAnimatorDrill(thePractice,width,height,bgColor)}}else{if(thePractice.equipment.indexOf("youtube")>-1&&width>100){result+='<div style="height:'+thePractice.height+"px;background-image:url("+thePractice.imageSource+');background-repeat:no-repeat;"';var spString=thePractice.equipment;spString=spString.replace(/[&]amp;#034;/g,'"');var video=eval("("+spString+")");result+='id="img'+thePractice.customPracticeId+'" onclick=\'loadYouTube("'+video.youtube+'","img'+thePractice.customPracticeId+'")\' class="myPlayer" ';result+=" > ";result+='<img src="/drills/img/play_large.png" alt="Player Button"/>';result+="</div>"}else{result+='<img src="'+thePractice.imageSource+'" width="'+width+'" height="'+height+'" >'}}}}if(thePractice.type==2){if(thePractice.externalFileType=="youtube"){if(isNaN(width)||width==null){width="300"}if(isNaN(height)||height==null){height="200"}if(width>300){result+=drawVideo(thePractice.externalFile,width,height,"yt"+thePractice.externalFile)}else{if(width>100){var now=new Date();var movieScale=width/480;result+='<div id="mh'+now.getTime()+""+(playersInPage)+'" style="width:'+width+"px;height:"+height+'px;text-align:left;">';result+='<img src="http://i.ytimg.com/vi/'+thePractice.externalFile+'/2.jpg" style="z-index:1;position:absolute;width:'+width+"px;height:"+height+'px;" />';result+="<a href=\"javascript:loadJWPlayer('"+thePractice.externalFile+"','mh"+now.getTime()+""+(playersInPage++)+"',"+width+","+height+');" style="z-index:2;position:absolute;width:'+width+"px;height:"+height+'px;text-align:center;"><img src="/drills/img/play_large.png" alt="" border="0" style="margin-top:'+parseInt(70*movieScale)+'px;" width="'+parseInt(83*movieScale)+'"/></a>';result+="</div>"}else{result+='<img src="http://i.ytimg.com/vi/'+thePractice.externalFile+'/2.jpg" width="'+width+'" height="'+height+'" >'}}}}return result}function insertJWPlayer(b,e,a,d){var c=new SWFObject("/drills/planner/player54-yt-as3.swf","flashContent"+d,e,a,"9");c.addParam("allowfullscreen","true");c.addParam("allowscriptaccess","always");c.addParam("bgcolor","#FFFFFF");c.addParam("flashvars","file="+b+"&autostart=true");c.write("flashContent"+d)}function drawVideo(f,c,b,i){var j="";if(c==null){var c=400}if(b==null){var b=315}if(i==null){var i="sp"+new Date()}j+='<div id="flashContent'+i+'">This will be replaced by the SWF.</div>';var d=navigator.appName;var g=navigator.appVersion;var e=parseFloat(g);if(d.indexOf("Microsoft")>-1){d="Microsoft"}if(d!="Microsoft"){var a=escape("http://i.ytimg.com/vi/"+f+"/0.jpg");var h=escape("http://www.youtube.com/watch?v="+f)}else{var a="http://i.ytimg.com/vi/"+f+"/0.jpg";var h="http://www.youtube.com/watch?v="+f}setTimeout('insertJWPlayer("'+h+'",'+c+","+b+',"'+i+'")',200);return j}function loadJWPlayer(b,e,d,a){var c=document.getElementById(e);if(c){c.innerHTML=drawVideo(b,d,a,e)}}var playersInPage=0;var searchSport="";var readyToSearch="";function setUpSearchBox(){var a=document.getElementById("searchBarBox");if(a){if(a.value.indexOf("Search")>-1){a.value="";a.style.color="#222222"}}}function revertSearchBox(){var a=document.getElementById("searchBarBox");if(a){if(a.value==""){a.value="Search";if(searchSport!=""||searchSport!=null||searchSport!="Sports"){a.value+=" "+searchSport}a.style.color="#777777"}}}function popChangeSearchSport(){var c=document.getElementById("searchPreview");if(c){c.innerHTML=""}var c=document.getElementById("sportChoice");var e=document.getElementById("searchSportHolder");var f=findPos(e);var b=getPageSize();var a="";a+='<div style="float: right; width: 15px; height: 30px; margin-right: 1px;">';a+='<a href="javascript:closeSearchSpPop();" class="deleteButton"><img alt="del" src="/drills/img/1.gif" align="right" border="0" height="14" width="15"></a>';a+="</div>";a+='<span style="font-size:14px;"><strong>Choose Search Sport</strong></span>';a+=populateSportsChoice();var d=document.getElementById("searchSportContents");if(d){d.innerHTML=a}if(c){c.className="spmyStuffPop spLipTop";c.style.top=(f[1]+18)+"px";c.style.display="block"}}function closeSearchSpPop(){var a=document.getElementById("sportChoice");if(a){a.style.display="none"}}function findPos(a){var b=curtop=0;if(a.offsetParent){do{b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent)}return[b,curtop]}function populateSportsChoice(){var box=document.getElementById("USIdetails");if(box&&box.innerHTML.length>5||myUSI!=null){if(myUSI==null){myUSI=eval("("+findStart(box.innerHTML)+")")}SL=eval("(["+fullSportsList+"])");type="icon";var result="";var result2="";result+='<div class="clear" ></div>';var foundSelected=0;var usedUSI=new Array();if(typeof(studentName)!=="undefined"||(typeof(studentName)!=="undefined"&&studentName==0)){for(var i=0;i<myUSI.userSportInterests.length;i++){if(!checkForUsedUSI(myUSI.userSportInterests[i].sportCodeId,usedUSI)&&myUSI.userSportInterests[i].isDelete=="false"&&myUSI.userSportInterests[i].interestId!=-1){result+='<div class="mySportBox">';result+='<div class="floatStar">';if(myUSI.userSportInterests[i].isMember=="true"){result+='<img src="/drills/img/2010/home/starOn.png" width="15" height="15" align="absmiddle">'}if(myUSI.userSportInterests[i].isMember=="false"){result+='<img src="/drills/img/2010/home/starOff.png" width="15" height="15" align="absmiddle">'}result+="</div>";result+='<div style="margin-top:7px;text-align:center;">';result+="<a href=\"javascript:setSearchSport('"+myUSI.userSportInterests[i].sportName+'\');" class="sportLinkHome"><img src="/drills/'+getSportImage(myUSI.userSportInterests[i].sportCodeId)+'" width="50" border="0" ></a>';result+="<br><a href=\"javascript:setSearchSport('"+myUSI.userSportInterests[i].sportName+'\');" class="sportLink2010">'+myUSI.userSportInterests[i].sportName+"</a>";result+="</div>";result+="</div>";usedUSI[usedUSI.length]=myUSI.userSportInterests[i].sportCodeId}}result+='<div class="clear" ></div>';result+='<a href="javascript:startMySports();closeSearchSpPopDrills();" style="font-size:10px;color:#0082AC;">more sports? edit my sports</a>';result+='<div class="clear" style="border-bottom:1px solid #cccccc;"></div>'}else{for(var i=0;i<SL.length;i++){result+='<div class="mySportBox">';result+='<div class="floatStar">';if(SL[i].isMember=="true"){result+='<img src="/drills/img/2010/home/starOn.png" width="15" height="15" align="absmiddle">'}if(SL[i].isMember=="false"){result+='<img src="/drills/img/2010/home/starOff.png" width="15" height="15" align="absmiddle">'}result+="</div>";result+='<div style="margin-top:7px;text-align:center;">';result+="<a href=\"javascript:setSearchSport('"+SL[i].sportName+'\');" class="sportLinkHome"><img src="/drills/'+getSportImage(SL[i].sportCodeId)+'" width="50" border="0" ></a>';result+="<br><a href=\"javascript:setSearchSport('"+SL[i].sportName+'\');" class="sportLink2010">'+SL[i].sportName+"</a>";result+="</div>";result+="</div>"}}result+=result2;result+='<div class="clear" ></div>';return result}return""}function setSearchSport(c){if(c==""||c==null||c=="Sports"){var b=document.getElementById("searchSportImageHolder");if(b){b.innerHTML='<img src="/drills/img/2010/searchNoSport.gif" />'}var a=document.getElementById("searchBarBox");if(a){if(a.value.indexOf("Search")>-1){a.value="Search"}}}else{var d=sportCodeIdFromSportName(c);var b=document.getElementById("searchSportImageHolder");if(typeof(getSportImage)=="function"){if(b){b.innerHTML='<img src="/drills/'+getSportImage(d)+'" width="34" border="0" >'}}var a=document.getElementById("searchBarBox");if(a){if(a.value.indexOf("Search")>-1){a.value="Search "+c}else{if(a.value.length>5){readyToSearch=a.value}}}}searchSport=c;closeSearchSpPop();if(readyToSearch!=""){spStartSearch(readyToSearch)}updateSearchBoxSize()}function updateSearchBoxSize(){var b=navigator.appName;var d=navigator.appVersion;var a=parseFloat(d);if(b.indexOf("Microsoft")>-1){b="Microsoft"}if(b=="Microsoft"){var c=document.getElementById("searchSportContents");if(c){c.style.width="290px"}else{setTimeout("updateSearchBoxSize()",1000)}}}function searchFieldEnter(b,a){a=(a)?a:window.event;if(a.keyCode==13&&b.value!=""){spStartSearch(b.value)}else{if(searchSport==""||searchSport==null||searchSport=="Sports"){var c=document.getElementById("sportChoice");if(c){if(c.style.display=="none"){popChangeSearchSport()}}}return true}}function searchButton(){var a=document.getElementById("searchBarBox");if(a){spStartSearch(a.value)}}function spStartSearch(a){if(searchSport==""||searchSport==null||searchSport=="Sports"){if(a!=""){readyToSearch=a;popChangeSearchSport()}}else{a=parseSearchQuery(a);document.location.href="http://"+sphost+"/drills/search/search2010.jsp?s="+searchSport+"&q="+a}}function parseSearchQuery(b){var a=b.toLowerCase();while(a.indexOf(searchSport.toLowerCase())>-1){a=a.substring(0,a.indexOf(searchSport.toLowerCase()))+""+a.substring((a.indexOf(searchSport.toLowerCase())+searchSport.length),a.length)}a=a.replace(/^\s+|\s+$/g,"");return UCFirst(a)}function UCFirst(a){firstChar=a.substring(0,1);remainChar=a.substring(1);firstChar=firstChar.toUpperCase();remainChar=remainChar.toLowerCase();return firstChar+remainChar}var spddlist_visible=0;var spddlist_hidetimer=0;function SPddlist_show(a){SPddlist_cancel_hide_time();if(spddlist_visible){spddlist_visible.style.visibility="hidden";spddlist_visible.parentNode.childNodes[0].className="ddTop"}spddlist_visible=document.getElementById(a);spddlist_visible.style.visibility="visible";spddlist_visible.parentNode.childNodes[0].className="ddTopOn"}function checkLanguageDone(c){var b=document.getElementById("languageNote");if(b){var a=b.parentNode;a.removeChild(b)}newClearClipboard()}function checkLanguage(){var a=document.getElementById("languageNote");if(a){a.style.display="block";spAjaxRequestWithId(checkLanguageDone,"/Login/SetAssociation.do","languageLocaleString=en&dec=none",0,"");return}}function SPddlist_hide(){if(spddlist_visible){if(spddlist_visible.style.visibility!="hidden"){spddlist_visible.style.visibility="hidden";spddlist_visible.parentNode.childNodes[0].className="ddTop"}}}function SPddlist_hide_time(){spddlist_hidetimer=window.setTimeout(SPddlist_hide,250)}function SPddlist_cancel_hide_time(){if(spddlist_hidetimer){window.clearTimeout(spddlist_hidetimer);spddlist_hidetimer=null}}function SpDropDownList(a,b){this.menu_id=a;this.ddName=b.ddName;this.items=b.links;this.current_item=0}SpDropDownList.prototype.getIconSrc=function(a){return config.icon_dir+a+".gif"};SpDropDownList.prototype.write=function(){var a="";a+='<div class="ddTop" id="'+this.menu_id+'Main"><a href="javascript:void(0);" onclick="SPddlist_show(\''+this.menu_id+'\')" onmouseout="SPddlist_hide_time()">';a+=this.ddName+"</a></div>";a+='<div id="'+this.menu_id+'" class="SPdd_list_layer" style="visibility: hidden;" onmouseover="SPddlist_cancel_hide_time()" onmouseout="SPddlist_hide_time()">';for(var e=0;e<this.items.length;e++){var c=this.menu_id+""+e;if(e==this.items.length-1){a+='<div class="dd_lastDivide"></div>'}if(typeof(this.items[e].text)!="undefined"){a+='<div id="'+c+'" class="SPdd_listItem">'+this.items[e].text+"</div>"}if(typeof(this.items[e].linkHref)!="undefined"){a+='<a href="'+this.items[e].linkHref+'" class="SPdd_listItem" id="'+c+'" ';if(typeof(this.items[e].linkColor)!="undefined"){a+=' style="color:'+this.items[e].linkColor+';" '}if(typeof(this.items[e].linkClick)!="undefined"){a+=' onClick="'+this.items[e].linkClick+'" '}a+=" >"+this.items[e].linkText+"</a>"}}a+="</div>";var d=document.getElementById(this.menu_id+"Holder");if(d){d.innerHTML=a}else{alert("error")}var b=this;for(var e=0;e<this.items.length;e++){var c=this.menu_id+""+e;var f=document.getElementById(c);f.onclick=function(){b.click(this.id)}}};SpDropDownList.prototype.click=function(b){this.current_item=0;for(var a=0;a<this.items.length;a++){if(b==this.menu_id+""+a){this.current_item=a;break}}};var searchSessionPlans=new Array();function addTooSessionsPlans(d,b,e,a,c){searchSessionPlans[searchSessionPlans.length]=new SearchPlanObject(d,b,e,a,c);var f=document.getElementById("sportChoice");if(searchSessionPlans.length>0&&f){if(searchSessionPlans.length==1){setTimeout(function(){processSearchSessionPlans()},2500)}}}function SearchPlanObject(d,b,e,a,c){this.url=d;this.title="";this.thumb=e;this.description=a;this.rating=c}function userNametoLowerCase(){var a=document.UserAccountForm.userName.value;a=a.toLowerCase();document.UserAccountForm.userName.value=a}function setEditorToBoxSize(b,a){if(typeof(lastEmail)!="undefined"&&lastEmail=="johndnurse@gmail.com"){tinyMCE.init({theme:"advanced",mode:"textareas",plugins:"paste",theme_advanced_buttons3_add:"pastetext,pasteword,selectall",paste_auto_cleanup_on_paste:true,paste_preprocess:function(c,d){alert(d.content);d.content="-: CLEANED :-\n"+d.content},paste_postprocess:function(c,d){alert(d.node.innerHTML);d.node.innerHTML=d.node.innerHTML+"\n-: CLEANED :-"}})}else{tinyMCE.init({theme:"advanced",mode:"exact",elements:"content",init_instance_callback:"fixTinyMCETabIssue",theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,seperator,separator,undo,redo,separator,bullist,numlist,",theme_advanced_buttons3:"",height:a+"px",width:b+"px",remove_linebreaks:true,entity_encoding:"raw",setup:function(c){c.onInit.add(function(d){d.focus()})}})}}function putCookie(b,c,a){if(document.cookie!=document.cookie){index=document.cookie.indexOf(b)}else{index=-1}if(index==-1){document.cookie=b+"="+escape(c)+"; expires="+a+"; path=/"}}function getCookieName(d){if(document.cookie){var a=document.cookie.indexOf(d);if(a!=-1){var c=(document.cookie.indexOf("=",a)+1);var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}var e=document.cookie.substring(c,b);return unescape(e)}}}function removeSpaces(b){if(b!=null){var a=b.indexOf(" ");while(a>=0){b=b.substring(0,a)+"%20"+b.substring(a+1,b.length);a=b.indexOf(" ")}}return b}function toggleDivs(c,b){var a=document.getElementById(c);if(a){a.style.display="block"}var a=document.getElementById(b);if(a){a.style.display="none"}}function toggleDiv(e){var a="whoIs,whatIs,whatYouCan,sampleDrills";var c=a.split(",");for(var b=0;b<c.length;b++){var d=document.getElementById(c[b]);if(d){d.style.display="none"}}if(e=="sampleDrills"){var d=document.getElementById("updates");if(d){if(d.style.display=="block"){d.style.display="none"}else{d.style.display="block"}}var d=document.getElementById("signUpNow");if(d){if(d.style.display=="block"){d.style.display="none"}else{d.style.display="block"}}}else{var d=document.getElementById("updates");if(d){d.style.display="block"}var d=document.getElementById("signUpNow");if(d){d.style.display="block"}}var d=document.getElementById(e);if(d){if(d.style.display=="block"){d.style.display="none"}else{d.style.display="block"}}}function checkRememberMe(){var b=new Date();if(document.UserAccountForm.rememberMe.checked===true){var a='{"userName":"'+document.UserAccountForm.userName.value+'","password":"'+document.UserAccountForm.password.value+'"}';var e=new Date();e.setDate(e.getDate()+60);var d=e.toUTCString()+"";if(d.indexOf("+")>-1){d=d.substring(0,d.indexOf("+"))}putCookie("sportplanDrills",a,d)}var c=document.getElementById("loginHolder");if(c){c.innerHTML='<img src="/drills/img/loading.gif" width="20"/>'}if(document.UserAccountForm.rememberMe.checked!==true){putCookie("sportplanDrills","",b.toUTCString())}if(document.UserAccountForm.forwardPage){document.UserAccountForm.forwardPage.value=removeSpaces(document.UserAccountForm.forwardPage.value)}}function putAweberSport(b){var a=b;var c=new Date();c.setDate(c.getDate()+5);putCookie("aweberSport",a,c.toUTCString())}function putEmailTrackCookie(b){if(b.aei.indexOf("{")>-1){b.aei=b.aei.substring(0,b.aei.indexOf("{"))}var a=b.toJSONString();putCookie("spEmailTrack",a,"")}function checkEmailTrackCookie(){var cookie_details=getCookieName("spEmailTrack");if(cookie_details){if(cookie_details.length>0){var spEmailTrackObj=eval("("+cookie_details+")");document.write('<img src="/drills/UEA.do?e='+lastEmail+"&aei="+spEmailTrackObj.aei+"&sd="+spEmailTrackObj.sd+"&scId="+spEmailTrackObj.scId+'&action=c" height="1" width="1" />');var today=new Date();putCookie("spEmailTrack","",today.toUTCString())}else{if(typeof(spEmailTrack)!="undefined"){if(spEmailTrack.aei.indexOf("{")>-1){spEmailTrack.aei=spEmailTrack.aei.substring(0,spEmailTrack.aei.indexOf("{"))}document.write('<img src="/drills/UEA.do?e='+lastEmail+"&aei="+spEmailTrack.aei+"&sd="+spEmailTrack.sd+"&scId="+spEmailTrack.scId+'&action=c" height="1" width="1" />')}}}else{if(typeof(spEmailTrack)!="undefined"){if(spEmailTrack.aei.indexOf("{")>-1){spEmailTrack.aei=spEmailTrack.aei.substring(0,spEmailTrack.aei.indexOf("{"))}document.write('<img src="/drills/UEA.do?e='+lastEmail+"&aei="+spEmailTrack.aei+"&sd="+spEmailTrack.sd+"&scId="+spEmailTrack.scId+'&action=c" height="1" width="1" />')}}}function setUpCookie(){var drill_details=getCookieName("sportplanDrills");if(drill_details){if(drill_details.length>0){if(document.UserAccountForm){if(document.UserAccountForm.userName!==null){if(drill_details.indexOf("{")>-1){var userDetails=eval("("+drill_details+")");document.UserAccountForm.userName.value=userDetails.userName;document.UserAccountForm.password.value=userDetails.password;document.UserAccountForm.rememberMe.checked=true;showMemberLogin();if(typeof(userDetails.autoLogin)!="undefined"){if(userDetails.autoLogin&&document.location.href.indexOf("Login.do")<0){if(typeof(justViewedRunning)!="undefined"){justViewedRunning=false}var spBox=document.getElementById("loginHolder");if(spBox){spBox.innerHTML='<img src="/drills/img/loading.gif" width="20"/>'}document.UserAccountForm.submit()}}}else{document.UserAccountForm.userName.value=drill_details.substring(0,drill_details.indexOf(":"));document.UserAccountForm.password.value=drill_details.substring((drill_details.indexOf(":")+1),drill_details.length);document.UserAccountForm.rememberMe.checked=true;showMemberLogin()}}}}}}function setUpAutoLoginCookie(){var drill_details=getCookieName("sportplanDrills");if(drill_details){if(drill_details.length>0){if(drill_details.indexOf("{")>-1){var userDetails=eval("("+drill_details+")");var drill_details='{"userName":"'+userDetails.userName+'","password":"'+userDetails.password+'","autoLogin":true}'}else{var drill_details='{"userName":"'+drill_details.substring(0,drill_details.indexOf(":"))+'","password":"'+drill_details.substring((drill_details.indexOf(":")+1),drill_details.length)+'","autoLogin":true}'}var today60Days=new Date();today60Days.setDate(today60Days.getDate()+60);var dateString=today60Days.toUTCString()+"";if(dateString.indexOf("+")>-1){dateString=dateString.substring(0,dateString.indexOf("+"))}putCookie("sportplanDrills",drill_details,dateString)}}}function logOutNow(){cancelAutoLoginCookie();document.location.href="http://"+sphost+"/drills/LogoutAction.do"}function cancelAutoLoginCookie(){var drill_details=getCookieName("sportplanDrills");if(drill_details){if(drill_details.length>0){if(drill_details.indexOf("{")>-1){var userDetails=eval("("+drill_details+")");var drill_details='{"userName":"'+userDetails.userName+'","password":"'+userDetails.password+'","autoLogin":false}'}var today60Days=new Date();today60Days.setDate(today60Days.getDate()+60);putCookie("sportplanDrills",drill_details,today60Days.toUTCString())}}}function showMemberLogin(){var a=document.getElementById("loginOptions");if(a){a.style.display="none"}var a=document.getElementById("loginForm");if(a){a.style.display="block"}try{document.UserAccountForm.userName.focus()}catch(b){}}function processUSI(){try{var sportName=lastSportName;var box=document.getElementById("USIdetails");if(sportName=="Field Hockey"){sportName="Hockey"}if(box&&box.innerHTML.length>5){var USI=eval("("+findStart(box.innerHTML)+")");var result="";var foundSelected=0;var usedUSI=new Array();for(var i=0;i<USI.userSportInterests.length;i++){if(!checkForUsedUSI(USI.userSportInterests[i].sportCodeId,usedUSI)){if(document.location.href.indexOf("MyStuff/FindSessions.do")>0){result+='<a href="/drills/MyStuff/FindSessions.do?sportName='+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+'" '}else{if(document.location.href.indexOf("FindChalkBoardPractices.do")>0){result+='<a href="/drills/FindChalkBoardPractices.do?sportName='+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+'" '}else{if(document.location.href.indexOf("answers")>0){result+='<a href="/drills/answers/'+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+'/index.jsp" '}else{result+='<a href="/drills/'+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+'/index.jsp" '}}}if(sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)==sportName){result+=' class="tpSelected" ';foundSelected=1}result+=" >"+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+"</a>";usedUSI[usedUSI.length]=USI.userSportInterests[i].sportCodeId}}var box2=document.getElementById("USI");if(box2){box2.innerHTML=result}var box2=document.getElementById("tp");if(box2){box2.style.display="block"}if(USI.userSportInterests.length==0){playWithUSI()}if(typeof(justViewedSportList)!="undefined"){if(usedUSI.length==0){justViewedSportList=""}else{justViewedSportList=usedUSI}setTimeout("justViewedDisplayHome()",1000)}}else{if(box){playWithUSI()}}}catch(err){}}function sportNameFromSportCodeId(a){if(a==1001){return"Hockey"}if(a==1002){return"Netball"}if(a==1009){return"Rugby"}if(a==1011){return"Football"}if(a==1008){return"Basketball"}if(a==2386){return"Agility"}if(a==1012){return"Cricket"}if(a==1015){return"Golf"}if(a==1010){return"Tennis"}if(a==1013){return"Gymnastics"}if(a==1096){return"Athletics"}if(a==1003){return"Swimming"}if(a==2128){return"Handball"}if(a==1613){return"Volleyball"}if(a==3332){return"Workout"}if(a==1614){return"Badminton"}if(a==3762){return"Rounders"}if(a==3849){return"Rugby League"}if(a==3848){return"Ice Hockey"}if(a==3934){return"Australian Football"}return a+""}function actualSportNameFromLocalSportName(a){if(a=="Aussie Rules Footy"){return"Australian Football"}else{if(a=="Handbal"){return"Handball"}else{if(a=="Field Hockey"){return"Hockey"}else{return a}}}}function sportCodeIdFromSportName(a){if(a=="Agility"){return 2386}if(a=="Athletics"){return 1096}if(a=="Badminton"){return 1614}if(a=="Basketball"){return 1008}if(a=="Cricket"){return 1012}if(a=="Football"){return 1011}if(a=="Soccer"){return 1011}if(a=="Golf"){return 1015}if(a=="Gymnastics"){return 1013}if(a=="Handball"){return 2128}if(a=="Hockey"){return 1001}if(a=="Field Hockey"){return 1001}if(a=="Netball"){return 1002}if(a=="Rounders"){return 3762}if(a=="Rugby"){return 1009}if(a=="Rugby League"){return 3849}if(a=="Swimming"){return 1003}if(a=="Tennis"){return 1010}if(a=="Volleyball"){return 1613}if(a=="Workout"){return 3332}if(a=="Ice Hockey"){return 3848}if(a=="Australian Football"){return 3934}if(a=="Aussie Rules Footy"){return 3934}return null}var rGlobal=new Array();function spAjaxRequest(b,a,c,f){if(a.indexOf(".js")==-1&&a.indexOf(".jsp")==-1&&a.indexOf(".do")==-1){return false}var d=null;try{d=newXMLHttpRequest()}catch(g){}if(d!=null){var h=getSportplan2011aReadyStateHandlerResponse(d,b,a+"?"+c);d.onreadystatechange=h;d.open("POST",a+";jsessionid="+jSession,true);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(c.indexOf("dec=")==-1){c="dec=none&"+c}d.send(c);rGlobal[rGlobal.length]=d;if(f){f.innerHTML='<div id="loadingImage"></div>'}}}function spAjaxGETRequest(b,a,c,f){if(a.indexOf(".js")==-1&&a.indexOf(".jsp")==-1&&a.indexOf(".do")==-1){return false}var d=null;try{d=newXMLHttpRequest()}catch(g){}if(d!=null){var h=getSportplan2011aReadyStateHandlerResponse(d,b,a+"?"+c);d.onreadystatechange=h;d.open("GET",a+";jsessionid="+jSession,true);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(c.indexOf("dec=")==-1){c="dec=none&"+c}d.send(c);rGlobal[rGlobal.length]=d;if(f){f.innerHTML='<div id="loadingImage"></div>'}}}function spAjaxRequestWithId(c,h,g,d,a){var j=null;if(h.indexOf(".js")==-1&&h.indexOf(".jsp")==-1&&h.indexOf(".do")==-1){return false}try{j=newXMLHttpRequest()}catch(i){}if(j!=null){var b=getSportplan2011ReadyStateHandlerResponse(j,d,c,h+"?"+g);j.onreadystatechange=b;j.open("POST",h+";jsessionid="+jSession,true);j.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(g.indexOf("dec=")==-1){g="dec=none&"+g}j.send(g);var f=document.getElementById(a);if(f){f.innerHTML='<img src="/sisvp/img/loading.gif" align="absmiddle"/>'}}rGlobal[rGlobal.length]=j;return j}function spAjaxGETRequestWithId(c,h,g,d,a){var j=null;if(h.indexOf(".js")==-1&&h.indexOf(".jsp")==-1&&h.indexOf(".do")==-1){return false}try{j=newXMLHttpRequest()}catch(i){}if(j!=null){var b=getSportplan2011ReadyStateHandlerResponse(j,d,c,h+"?"+g);j.onreadystatechange=b;j.open("GET",h+";jsessionid="+jSession,true);j.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(g.indexOf("dec=")==-1){g="dec=none&"+g}j.send(g);var f=document.getElementById(a);if(f){f.innerHTML='<img src="/sisvp/img/loading.gif" align="absmiddle"/>'}}rGlobal[rGlobal.length]=j;return j}window.onunload=function(){if(typeof(lastEmail)!="undefined"){for(var a=0;a<rGlobal.length;a++){if(rGlobal[a].readyState==4){if(rGlobal[a].status!==200){rGlobal[a].abort()}}}}};function getElementsById(c){var g=new Array();if(typeof(c)!="string"||!c){return g}if(document.evaluate){var f="//*[@id='"+c.toString()+"']";var a=document.evaluate(f,document,null,0,null);while((g[g.length]=a.iterateNext())){}g.pop()}else{if(document.all){if(document.all[c]){for(var e=0,b=document.all[c].length;e<b;e+=1){g[e]=document.all[c][e]}}}else{if(document.getElementsByTagName){var d=document.getElementsByTagName("*");for(var e=0,b=d.length;e<b;e+=1){if(d[e].id==c){g.push(d[e])}}}}}return g}var lastLoadedFile="";function loadPractice(b,a){if(lastLoadedFile!="http://"+sphost+"/"+b){spAjaxRequestWithId(displayPractice,host+"/"+b,"dec=dirDrill",0,"movie");lastLoadedFile="http://"+sphost+"/"+b}}var currentPracticeId;function displayPractice(req,id){var spBox=document.getElementById("movie");var practice=eval("("+findStart(req.responseText)+")");updateLikeThis(lastLoadedFile,practice.pracTitle+" "+practice.pracSportName);currentPracticeId=practice.pVId;if(typeof(practice.pracSportDir)!="undefined"){practice.baseDir="viewer/movies/"+practice.pracSportDir}if(typeof(practice.practiceVariantId)!="undefined"){practice.pVId=practice.practiceVariantId}practice.pracDescription=insertXML(practice.pracDescription);practice.pracCoachingPoints=insertXML(practice.pracCoachingPoints);var result="";result+="<div class='movie"+practice.pracSportName+"' style='background-color:"+practice.pracBGColor+";'>";result+=drawPractice(practice,practice.width,practice.height);result+="</div>";if(spBox){spBox.innerHTML=result}document.title=practice.pracTitle+" "+practice.pracSportName;var spBox=document.getElementById("theH1");if(spBox){spBox.innerHTML=practice.pracSportName+", "+practice.pracTitle}var spBox=document.getElementById("prTitle");if(spBox){spBox.innerHTML=practice.pracTitle}result="";if(practice.pracDescription!=""){result+="<p><strong>"+langres_spLib_description+"</strong></p>";result+="<ul><p>"+practice.pracDescription+"</p></ul>"}if(practice.pracCoachingPoints!=""){result+="<p><strong>"+langres_spLib_coachingPoints+"</strong></p>";result+="<ul>"+practice.pracCoachingPoints+"</ul>";if(practice.pracCoachingPoints.indexOf("PDF File")>-1){result+='<p><a href="/'+practice.baseDir+"/pdf/"+practice.fileName+'.pdf" >Download PDF File</a></p>'}}if(lastEmail=="b_ball909@hotmail.com"||lastEmail=="bram@sportplan.com"||lastEmail=="c.stott@volleyballengland.org"||lastEmail=="johndnurse@gmail.com"){result+="<p>code/fileName: "+practice.fileName+"</p>"}result+="<p>&copy; "+langres_spLib_copyright+" Sportplan Ltd, 2011</p>";var index=lastLoadedFile.indexOf("/drills");if(index<0){index=0}var pageUrl=lastLoadedFile.substring(index);var params="u="+userLoginId;params+="&t=prac";params+="&s="+practice.pracSportName;params+="&pageName="+pageUrl;params+="&practiceId="+practice.pVId;spAjaxRequestWithId(noEvent,host+"/AddLogEvent.do",params,0,"");var spBox=document.getElementById("pText");if(spBox){spBox.innerHTML=result}result="";result+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';result+='<tr><td width="100%"><img src="/drills/img/fr/grBg.gif" height="1" width="1"></td>';if(practice.fileType!="6"){result+='<td nowrap background="/drills/img/fr/orBg.gif" class="adtc" ><a href="javascript:addToClipboard(\''+practice.pVId+'\');" ><img src="/drills/img/fr/addToClip.gif" border="0" align="absmiddle">'+langres_spLib_addToClipboard+"&nbsp;</a></td>"}if(practice.fileType=="3"||practice.fileType=="0"){result+='<td nowrap class="en" ><a href="javascript:enlargeSWF(\'http://www.sportplan.net/'+practice.baseDir+"/"+practice.fileName+".swf',"+practice.width+","+practice.height+",'"+practice.pracBGColor+"');\" >";result+='<img src="/drills/img/fr/enlarge.gif" width="26" height="23" border="0" align="absmiddle">'+langres_spLib_enlarge+"&nbsp;</a>&nbsp;</td>"}result+="<td>&nbsp;</td></tr></table>";var spBox=document.getElementById("buttonHolder");if(spBox){spBox.innerHTML=result}else{var spBox=document.getElementById("buttonHolderPL");if(spBox){result="";result+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';result+='<tr><td width="100%"><img src="/drills/img/fr/grBg.gif" height="1" width="1"></td>';if(practice.fileType!="6"){tempDrillPractice=practice;if(typeof(isAnswers)!="undefined"){result+='<td nowrap background="/drills/img/fr/orBg.gif" nowrap class="en"  ><a href="javascript:insertFromDrills();" >&nbsp; Add to '+isAnswers+" &nbsp;</a></td>"}else{result+='<td nowrap background="/drills/img/fr/orBg.gif" nowrap class="en"  ><a href="javascript:insertFromDrills();" >&nbsp; Add to Session &nbsp;</a></td>'}if(isMember){result+='<td nowrap background="/drills/img/fr/orBg.gif" class="adtc" ><a href="javascript:addToClipboard(\''+practice.pVId+'\');" ><img src="/drills/img/fr/addToClip.gif" border="0" align="absmiddle">'+langres_spLib_addToClipboard+"&nbsp;</a></td>"}}result+="<td>&nbsp;</td></tr></table>";spBox.innerHTML=result}}var spBox=document.getElementById("smPTitle");if(spBox){spBox.innerHTML=practice.pracSportName+": <strong>"+practice.pracTitle+"</strong>"}checkForAd(practice);var tagsDiv=document.getElementById("tags");if(tagsDiv!=null){var displayHTML='<span style="font-weight:bold;">Tags:</span>';displayHTML+='<span id="keywords">'+practice.spKeyWords+"</span>";if(adminAccess){displayHTML+='<br /><a href="javascript:editDrillKeywords('+practice.pVId+');">edit keywords</a>'}tagsDiv.innerHTML=displayHTML}}function spWindowClose(){objOverlay=document.getElementById("overlay");if(objOverlay!=null){objOverlay.style.display="none";objOverlay.style.width="0px";objOverlay.style.height="0px";var a=document.getElementById("spWindow");if(a){a.style.display="none";a.style.left=-800+"px";a=document.getElementById("table_content");if(a){a.innerHTML=""}}var a=document.getElementById("spMediaWindow");if(a){a.style.display="none";a.style.left=-800+"px";var a=document.getElementById("media_content");if(a){a.innerHTML=""}}showFlash()}}function checkForAd(e){var d=document.getElementById("miniAd");if(d){d=d.innerHTML;d=miniAdverts[d];var a="";a+='<div class="chlk"  style="background-image:url(/'+e.baseDir+"/thumbs/"+e.fileName+".png);background-repeat:no-repeat;width:"+e.width+"px;padding-top:"+(e.height-50)+'px;overflow:hidden;">';a+='<div class="info" id="miniAdvert">';a+='<span style="float:right;width:20px;" class="false_cursor" onclick="hideMiniAdvert();">X</span>';a+=d;a+="</div>";a+="</div>";var c=document.getElementById("movie");if(c){c.innerHTML=a}}else{var d=document.getElementById("blipID");if(d){d=d.innerHTML;var a="";var b=e.width;if(b<300){b=300}a+='<div class="chlk"  style="background-repeat:no-repeat;background-position:center;width:'+b+"px;padding-top:"+(e.height-50)+'px;overflow:hidden;">';a+='<img src="/'+e.baseDir+"/"+e.fileName+'.gif" width="'+e.width+'" height="'+e.height+'" style="positon:absolute;z-index:-1;margin-top:-'+(e.height-50)+'px;"/>';a+='<div class="info" id="miniAdvert">';a+='<span style="float:right;width:20px;" class="false_cursor" onclick="hideMiniAdvert();">X</span>';a+="<a href=\"javascript:playBlip('"+d+"');\">Play video demonstration</a>";a+="</div>";a+="</div>";var c=document.getElementById("movie");if(c){c.innerHTML=a}}}}function hideMiniAdvert(){var a=document.getElementById("miniAdvert");if(a){a.className="infoBlank";a.innerHTML=""}}function noEvent(a,b){}function recordSessionView(c,a){if(c!=null&&typeof(c)!="undefined"){var b="seId="+c;b+="&vm="+a;spAjaxRequest(recordSessionViewResponse,"/drills/RecordSessionView.do",b,"")}}function recordSessionViewResponse(a){}function spWindowOpen(spHTML,spWidth,hideCloseButton,args){if(args!=null){args=eval("("+args+")")}var objOverlay=document.getElementById("overlay");if(objOverlay){objOverlay.style.display="block";objOverlay.style.width="100%"}else{var objBody=document.getElementsByTagName("body").item(0);var objOverlay=document.createElement("div");objOverlay.setAttribute("id","overlay");objOverlay.onclick=function(){return false};objOverlay.style.display="block";objOverlay.style.position="absolute";objOverlay.style.top="0";objOverlay.style.left="0";objOverlay.style.zIndex="90";objOverlay.style.width="100%";objOverlay.className="ui-widget-overlay";if(objBody){objBody.insertBefore(objOverlay,objBody.firstChild)}}var arrayPageSize=getPageSize();objOverlay.style.height=(arrayPageSize[1]+"px");objOverlay.style.display="block";var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=="number"){myWidth=window.innerWidth;myHeight=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight}}}var objWindow=document.getElementById("spWindow");if(objWindow){objWindow.style.display="block";objWindow.style.width=(spWidth+14)+"px";if(args!=null&&args.bgColor!=null){objWindow.style.backgroundColor=args.bgColor}else{objWindow.style.backgroundColor=""}if(args!=null&&args.bgImage!=null){if(args.bgImage=="none"){objWindow.style.backgroundImage="url(/drills/img/1.gif)"}else{objWindow.style.backgroundImage=args.bgImage}}else{objWindow.style.backgroundImage=""}var objCloseButton=document.getElementById("spWindowCloseHolder");if(objCloseButton){if(hideCloseButton==null&&typeof(args)=="undefined"){objCloseButton.style.display="block"}if(hideCloseButton&&hideCloseButton==true&&typeof(args)=="undefined"){objCloseButton.style.display="none"}else{if(hideCloseButton&&hideCloseButton==true&&(typeof(args)!="undefined"&&args.title!=null)){objCloseButton.style.display="none"}else{if(hideCloseButton&&(typeof(args)!="undefined"&&args.title!=null)){objCloseButton.style.display="none"}else{if(typeof(args)=="undefined"||(typeof(args)!="undefined"&&args.title==null)){objCloseButton.style.display="block"}else{objCloseButton.style.display="none"}}}}}var objTitle=document.getElementById("spWindowTitleHolder");if(objTitle){if(typeof(args)=="undefined"){objTitle.style.display="none"}else{if(typeof(args)!="undefined"&&args.title!=null){objTitle.style.display="block";var spObj=document.getElementById("ui-dialog-title-dialog");if(spObj){spObj.innerHTML=args.title}}else{objTitle.style.display="none"}}}else{if(lastEmail=="johndnurse@gmail.com"){alert("noTitle")}}}else{var objWindow=document.createElement("div");objWindow.setAttribute("id","spWindow");objWindow.className="ui-dialog ui-widget ui-widget-content ui-corner-all  ui-draggable ui-resizable";if(args!=null&&args.bgColor!=null){objWindow.style.backgroundColor=args.bgColor}else{objWindow.style.backgroundColor=""}if(args!=null&&args.bgImage!=null){if(args.bgImage=="none"){objWindow.style.backgroundImage="url(/drills/img/1.gif)"}else{objWindow.style.backgroundImage=args.bgImage}}else{objWindow.style.backgroundImage=""}objWindow.style.zIndex="110";objWindow.style.width=(spWidth+14)+"px";objBody.insertBefore(objWindow,objBody.firstChild);var objWindowCloseHolder=document.createElement("div");objWindowCloseHolder.setAttribute("id","spWindowCloseHolder");objWindowCloseHolder.style.height="16px";if(hideCloseButton==null&&args==null){objWindowCloseHolder.style.display="block"}if(hideCloseButton&&hideCloseButton==true&&(typeof(args)!="undefined"&&args.title!=null)){objWindowCloseHolder.style.display="none"}else{if(typeof(args)=="undefined"||(typeof(args)!="undefined"&&args.title==null)){objWindowCloseHolder.style.display="block"}else{objWindowCloseHolder.style.display="none"}}var objWindowClose=document.createElement("a");objWindowClose.className="ui-icon-close ui-corner-all";objWindowClose.style.right="0.3em";objWindowClose.style.top="0.3em";objWindowClose.style.position="absolute";objWindowClose.href="#";objWindowClose.onclick=function(){spWindowClose();return false};var objWindowCloseCross=document.createElement("span");objWindowCloseCross.className="ui-icon ui-icon-closethick";objWindowCloseCross.innerHTML="close";objWindowClose.appendChild(objWindowCloseCross);objWindowCloseHolder.appendChild(objWindowClose);objWindow.appendChild(objWindowCloseHolder);var objWindowTitleHolder=document.createElement("div");objWindowTitleHolder.setAttribute("id","spWindowTitleHolder");objWindowTitleHolder.className="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";if(typeof(args)=="undefined"||(typeof(args)!="undefined"&&args.title==null)){objWindowTitleHolder.style.display="none"}else{if(typeof(args)!="undefined"&&args.title!=null){objWindowTitleHolder.style.display="block"}else{objWindowTitleHolder.style.display="none"}}var objWindowTitle=document.createElement("span");objWindowTitle.setAttribute("id","ui-dialog-title-dialog");objWindowTitle.className="ui-dialog-title";if(args!=null&&args.title!=null){objWindowTitle.innerHTML=args.title}objWindowTitleHolder.appendChild(objWindowTitle);var objWindowTitleClose=document.createElement("a");objWindowTitleClose.className="ui-dialog-titlebar-close ui-corner-all";objWindowTitleClose.onmouseover=function(){this.className="ui-dialog-titlebar-close ui-corner-all ui-state-hover"};objWindowTitleClose.onmouseout=function(){this.className="ui-dialog-titlebar-close ui-corner-all"};objWindowTitleClose.href="#";objWindowTitleClose.onclick=function(){spWindowClose();return false};if(hideCloseButton==null){objWindowTitleClose.style.display="block"}if(hideCloseButton&&hideCloseButton==true){objWindowTitleClose.style.display="none"}else{objWindowTitleClose.style.display="block"}var objWindowTitleCloseCross=document.createElement("span");objWindowTitleCloseCross.className="ui-icon ui-icon-closethick";objWindowTitleCloseCross.innerHTML="close";objWindowTitleClose.appendChild(objWindowTitleCloseCross);objWindowTitleHolder.appendChild(objWindowTitleClose);objWindow.appendChild(objWindowTitleHolder);var tdContent=document.createElement("div");tdContent.className="ui-dialog-content ui-widget-content";tdContent.style.width="auto";tdContent.style.minHeight="59.4px";tdContent.style.height="auto";tdContent.setAttribute("id","table_content");objWindow.appendChild(tdContent)}if(!tdContent){var tdContent=document.getElementById("table_content")}tdContent.innerHTML='<div style="width:'+spWidth+'px;">'+spHTML+"</div>";var objButtonHolder=document.getElementById("spWindowButHolder");if(objButtonHolder){objButtonHolder.style.display="none";objButtonHolder.innerHTML=""}if(typeof(args)!="undefined"&&args.buttons!=null){var objButtonHolder=document.getElementById("spWindowButHolder");if(objButtonHolder){objButtonHolder.style.display="block"}else{var objButtonHolder=document.createElement("div");objButtonHolder.setAttribute("id","spWindowButHolder");objButtonHolder.className="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix";objWindow.appendChild(objButtonHolder)}var objButtonSetHolder=document.createElement("div");objButtonSetHolder.className="ui-dialog-buttonset";for(var j=0;j<args.buttons.length;j++){if(!args.buttons[j].fake){var objButtonSpan=document.createElement("span");objButtonSpan.className="ui-button-text";objButtonSpan.innerHTML=args.buttons[j].title;var objButton=document.createElement("button");objButton.className="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only";objButton.onclick=new Function(args.buttons[j].func);objButton.setAttribute("id",args.buttons[j].bid);objButton.appendChild(objButtonSpan);objButtonSetHolder.appendChild(objButton)}else{var objButton=document.createElement("div");objButton.className="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only";objButton.style.marginRight="5px";objButton.setAttribute("id",args.buttons[j].bid);if(typeof(args.buttons[j].link)!="undefined"){var target="";if(typeof(args.buttons[j].link.target!="undefined")){target=' target="'+args.buttons[j].link.target+'" '}objButton.innerHTML='<a id="'+args.buttons[j].link.aid+'" href="'+args.buttons[j].link.href+'"'+target+'class="ui-button-text ui-widget">'+args.buttons[j].title+"</a>"}objButtonSetHolder.appendChild(objButton)}}objButtonHolder.appendChild(objButtonSetHolder)}var objTitle=document.getElementById("spWindowTitleHolder");if(objTitle){if(objTitle.style.display=="none"){objTitle.style.display="block";objTitle.style.display="none"}}var IpopTop=(myHeight-objWindow.offsetHeight)/2;var IpopLeft=(myWidth-objWindow.offsetWidth)/2;if(IpopTop<10){IpopTop=10}objWindow.style.left=(IpopLeft+document.body.scrollLeft+document.documentElement.scrollLeft)+"px";objWindow.style.top=(IpopTop+document.body.scrollTop+document.documentElement.scrollTop)+"px";hideFlash()}function enlargeSWF(d,h,g,f){var a="<center>";hideFlash();a+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';a+='height="'+(g*2)+'" width="'+(h*2)+'">';a+='<param name="movie" value="'+d+'">';a+='<param name="quality" value="high">';a+='<param name="play" value="true">';a+='<param name="bgcolor" value="'+f+'">';a+='<embed src="'+d+'"';a+='quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"';a+='height="'+(g*2)+'" width="'+(h*2)+'" bgcolor="'+f+'" play="true"></object>';var e=document.getElementById("googleAdBlock");if(e){a+='<div style="margin:6px;border:1px solid #dddddd;padding:6px;">'+e.innerHTML+"</div>"}a+="</center>";var c=document.getElementById("theH1");if(c){var b=c.innerHTML;if(b.indexOf(",")>-1){b=b.substring(b.indexOf(",")+2,b.length)}}else{var b=""}spWindowOpen(a,640,null,'{"title":"Enlarge: '+b+'","buttons":[{"title":"Close","bid":"eClose","func":"spWindowClose()"}]}')}function getPageSize(){var c,a;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}var b,d;if(self.innerHeight){b=self.innerWidth;d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;d=document.body.clientHeight}}}if(a<d){pageHeight=d}else{pageHeight=a}if(c<b){pageWidth=b}else{pageWidth=c}arrayPageSize=new Array(pageWidth,pageHeight,b,d);return arrayPageSize}function hideFlash(){var e=document.getElementById("movie");if(e){e.style.display="none"}var e=document.getElementById("pLinks");if(e){e.style.display="none"}var e=document.getElementById("fbLikeHolder");if(e){e.style.display="none"}var e=document.getElementById("fb-root");if(e){e.style.display="none"}var a=getElementsById("movieHolder");if(lastEmail=="info@sportplan.com1"){alert(a.length)}for(var c=0;c<a.length;c++){a[c].style.display="none"}var a=getElementsById("movieHolderForum");for(var c=0;c<a.length;c++){a[c].style.display="none"}if(!document.getElementsByTagName){return}var b=document.getElementsByTagName("div");for(var c=0;c<b.length;c++){var d=b[c];if(((" "+d.className+" ").indexOf("practiceHolder")!=-1)&&(d.id)){d.style.display="none"}if(((" "+d.className+" ").indexOf("movieHolderPL")!=-1)&&(d.id)){d.style.display="none"}}}function showFlash(){var e=document.getElementById("movie");if(e){e.style.display="block"}var e=document.getElementById("pLinks");if(e){e.style.display="block"}var e=document.getElementById("fbLikeHolder");if(e){e.style.display="block"}var e=document.getElementById("fb-root");if(e){e.style.display="block"}var a=getElementsById("movieHolder");for(var c=0;c<a.length;c++){a[c].style.display="block"}var a=getElementsById("movieHolderForum");for(var c=0;c<a.length;c++){a[c].style.display="block"}if(!document.getElementsByTagName){}else{var b=document.getElementsByTagName("div");for(var c=0;c<b.length;c++){var d=b[c];if(((" "+d.className+" ").indexOf("practiceHolder")!=-1)&&(d.id)){d.style.display=""}if(((" "+d.className+" ").indexOf("movieHolderPL")!=-1)&&(d.id)){d.style.display=""}}}}function enlarge(b){if(top.location!=self.location){alert("Not available")}else{var a="";a+='<div id="enLargeContent">&nbsp;</div>';hideFlash();spWindowOpen(a,640);if(pageTracker){pageTracker._trackPageview("/enLargePractice")}spAjaxRequestWithId(upDateEnlarge,b,"dec=dirDrill",0,"enLargeContent")}}function upDateEnlarge(req,id){var pracNum=parseInt(id);var practice=eval("("+req.responseText+")");var result="<center>";practice.baseDir="viewer/movies/"+practice.pracSportDir;result+='<div style="background-color:'+practice.pracBGColor+";width:"+(parseInt(practice.width)*1.4)+'px;">';result+=drawPractice(practice,(parseInt(practice.width)*1.4),(parseInt(practice.height)*1.4));result+="</div>";var folderName=practice.pracSportName;if(practice.pracSportName=="Table Tennis"){folderName="Table-Tennis"}if(practice.pracSportName=="Schools Tennis"){folderName="Schools-Tennis"}if(practice.pracSportName=="Junior Golf"){folderName="Junior-Golf"}if(practice.pracSportName=="Grass Roots Cricket"){folderName="Grass-Roots-Cricket"}if(practice.pracSportName=="Field Hockey"){folderName="Hockey"}result+="</center>";spWindowOpen(result,(parseInt(practice.width)*1.4)+60,null,'{"title":"Enlarge: '+practice.pracTitle+'","buttons":[{"title":"Close","bid":"eClose","func":"spWindowClose()"}]}')}function buildCatLinks(){var a=document.getElementById("cLinks");var h=a.innerHTML;var b=new Array();while(h.indexOf('href="')>0){h=h.substring((h.indexOf('href="')+6),h.length);var e=h.substring(0,h.indexOf('"'));h=h.substring((h.indexOf(">")+1),h.length);var g=h.substring(0,h.indexOf("<"));var f=new spLink(e,g);b[b.length]=f}var j="";j+="<center>";for(var c=0;c<b.length;c++){if(b[c].href.indexOf("alert(")>-1){j+='<div class="practiceFolder false_cursor" onclick="document.location.href=\''+host+b[c].href+'\';"><div class="sbl"><div class="sbr"><div class="stl"><div class="str" >'}else{j+='<div class="practiceFolder false_cursor" onclick="document.location.href=\''+host+b[c].href+"?"+linkApp+'\';"><div class="sbl"><div class="sbr"><div class="stl"><div class="str" >'}j+='<center><img src="/drills/img/pracFolder.gif"><div id="pracFolderText"><strong>'+b[c].titleText+"</strong></div></center>";j+="</div></div></div></div></div>"}j+="</center>";var d=document.getElementById("catButs");if(d){d.innerHTML=j;d.style.height=(parseInt(b.length/6+1)*115)+"px";d.style.height=parseInt(d.offsetHeight)+"px"}var d=document.getElementById("notLoggedHeader");if(d){slidedown("notLoggedHeader")}var d=document.getElementById("fairUsageNotice");if(d){d.style.display="none";var d=document.getElementById("fairUsageNoticeMini");d.style.display="block"}var d=document.getElementById("sportInterestQ");if(d){d.style.display="block"}}function openShareChoices(b){var a="";a+="<p>Please choose a drill from this random shortlist to share on Facebook:</p>";a+='<div style="height:140px;border:1px solid #cccccc;background-color:#ffffff;margin:10px;margin-right:20px;padding:4px;" id="shareChoice">';a+='<img src="/drills/img/loading.gif"/>';a+="</div>";a+="<p>Your 10 bonus credits will be instantly added to your account.</p>";spWindowOpen(a,540,"",'{"title":"Share on Facebook","buttons":[{"title":"cancel","bid":"close","func":"spWindowClose()"}]}');var c="langCode=en&limit=3";c+="&sports[0]="+sportCodeIdFromSportName(b);spAjaxRequestWithId(setFBShareChoices,"/drills/JustViewed.do",c,0,"")}function setFBShareChoices(req,id){var fbDrills=eval("("+req.responseText+")");var result="";for(var t=0;t<fbDrills.length;t++){sDrillFileName=fbDrills[t].sportDirectory+"/thumbs/100/"+fbDrills[t].fileName;if(fbDrills[t].fileType==0||fbDrills[t].fileType==3){sDrillFileName+=".gif"}else{sDrillFileName+=".png"}result+='<div class="entry" ';result+=">";result+='<a href="javascript:void();" onclick="loadFBDrill(\''+fbDrills[t].practiceUrl+"');return false;\">";result+='<span class="thumb-inner">';result+='<img src="/'+sDrillFileName+'" border="0" width="100" height="66" alt="';result+=": "+fbDrills[t].title+" - "+fbDrills[t].category+'">';result+="</span>";result+="</a>";if(fbDrills[t].title.length!=0){result+='<div style="padding-left:6px;padding-right:6px;font-size:12px;line-height:14px;font-weight:bold;"><a href="#" onclick="loadFBDrill(\''+fbDrills[t].practiceUrl+"');return false;\">";if(fbDrills[t].title.length>22){result+=fbDrills[t].title.substring(0,20)+".."}else{result+=fbDrills[t].title}result+="</a></div>"}result+='<div style="color:#bbbbbb;font-size:10px;padding-left:6px;line-height:14px;">'+fbDrills[t].category+"</div>";result+="</div>"}var spBox=document.getElementById("shareChoice");if(spBox){spBox.innerHTML=result}}function loadFBDrill(a){spAjaxRequestWithId(shareFBDrill,"http://"+sphost+"/"+a,"dec=dirDrill",0,"shareChoice");lastLoadedFile="http://"+sphost+"/"+a}function shareFBDrill(req,id){var fbDrill=eval("("+req.responseText+")");var picPath="http://www.sportplan.net/viewer/movies/"+fbDrill.pracSportDir+"/thumbs/100/"+fbDrill.fileName;if(fbDrill.fileType==0||fbDrill.fileType==3){picPath+=".gif"}else{picPath+=".png"}spWindowClose();FB.ui({method:"feed",name:"Sportplan "+fbDrill.pracSportName,link:lastLoadedFile,picture:picPath,caption:"I am using Sportplan "+fbDrill.pracSportName+" Drills and Coaching Resources",description:fbDrill.pracTitle+" : "+removeXML(fbDrill.pracDescription),message:"I just earnt 10 bonus credits by sharing this drill on Facebook"},postToWallCallBackFunction)}function postToWallCallBackFunction(a){if(a&&a.post_id){if(pageTracker){pageTracker._trackPageview("/sharedOnFB")}spAjaxRequest(reloadAfterFBPost,"/drills/RecordUserAction.do","category=facebookPost","")}else{}}function reloadAfterFBPost(a){window.location.reload()}var samples=new Array();samples.Agility=new Array();samples.Agility[0]="/drills/Agility/Dynamic-Stretching/Lunges.jsp";samples.Agility[1]="/drills/Agility/Core-Strength/Swiss-Ball-alternate-leg-hamstring-curl.jsp";samples.Agility[2]="/drills/Agility/Speed-Footwork/Zig-Zag-Run-Backwards.jsp";samples.Athletics=new Array();samples.Athletics[0]="/drills/Athletics/Sprint-Drills/1-Leg-Hopping-Drill.jsp";samples.Athletics[1]="/drills/Athletics/Sprint-Drills/Bounding-drill.jsp";samples.Athletics[2]="/drills/Athletics/Discus/Full-turn-with-disc-ball.jsp";samples.Basketball=new Array();samples.Basketball[0]="/drills/Basketball/Shooting-Techniques/Free-throw-shooting.jsp";samples.Basketball[1]="/drills/Basketball/Screening/Off-the-screen-shooting-drill.jsp";samples.Basketball[2]="/drills/Basketball/Passing/Cross-Court-Shooting-Drill.jsp";samples.Cricket=new Array();samples.Cricket[0]="/drills/Cricket/Ground-fielding-and-throwing/Fielding-Catching-drill-.jsp";samples.Cricket[1]="/drills/Cricket/Back-foot-batting/The-back-foot-drive-and-defence.jsp";samples.Cricket[2]="/drills/Cricket/Batting-Mechanics/Back-Foot-Defence.jsp";samples.Football=new Array();samples.Football[0]="/drills/Football/Passing-and-Receiving/first-touch-with-outside-of-kicking-foot.jsp";samples.Football[1]="/drills/Football/Shooting/Shooting-with-the-ball-going-away-from-the-player-f100215.jsp";samples.Football[2]="/drills/Football/Conditioned-games/Width-and-Forward-Runs.jsp";samples.Golf=new Array();samples.Golf[0]="/drills/Golf/Tri-Golf-Chipping-Games/Sector-Ball.jsp";samples.Golf[1]="/drills/Junior-Golf/Short-Game-Exercises/Under-the-Bench.jsp";samples.Golf[2]="/drills/Junior-Golf/Long-Game-Exercises/Turn-and-Point.jsp";samples.Gymnastics=new Array();samples.Gymnastics[0]="/drills/Gymnastics/Key-1-Content-Forward-roll/Forward-Roll-to-Stand-valgym16.jsp";samples.Gymnastics[1]="/drills/Gymnastics/Key-4-Content-Trampette-Tuck/Tuck-shape-.jsp";samples.Gymnastics[2]="/drills/Gymnastics/Key-1-Body-Conditioning/Shoulder-Rock.jsp";samples.Hockey=new Array();samples.Hockey[0]="/drills/Hockey/Movement-off-the-ball/Movement-off-the-ball6.jsp";samples.Hockey[1]="/drills/Hockey/Shooting-Goalscoring/Shooting-Goalscoring14.jsp";samples.Hockey[2]="/drills/Hockey/Video-Techniques/Slap-Hit-direction.jsp";samples.Handball=new Array();samples.Handball[0]="/drills/Handball/warming-up/Cross-over-pass-and-follow-wu15.jsp";samples.Handball[1]="/drills/Handball/317-jump-shot-high/317-jump-shot-high-schottropb4.jsp";samples.Handball[2]="/drills/Handball/217-shooting-defend-shooting/217-shooting-defend-shooting-d49a.jsp";samples.Netball=new Array();samples.Netball[0]="/drills/Netball/Interception/Intercepting-angles.jsp";samples.Netball[1]="/drills/Netball/Wall-drills/Elevated-pass-(2-hands).jsp";samples.Netball[2]="/drills/Netball/Group-practices/Running-the-guantlet.jsp";samples.Rugby=new Array();samples.Rugby[0]="/drills/Rugby/Tackling/Tackling-2.jsp";samples.Rugby[1]="/drills/Rugby/Tag-Rugby/Team-of-5-v-1-v-1-v-1-v-1-v-1.jsp";samples.Rugby[2]="/drills/Rugby/Decision-making/2-vs-1-Decision-Making-r902015.jsp";samples.RugbyLeague=new Array();samples.RugbyLeague[0]="/drills/Rugby-League/Tackling/1-vs-1-Tackle-Practice-1v1RL.jsp";samples.RugbyLeague[1]="/drills/Rugby-League/Tag-rugby/Chain-Reaction-Progression-tagless303RL.jsp";samples.RugbyLeague[2]="/drills/Rugby-League/Passing/Individual-ball-carrying-2-wasp12RL.jsp";samples.Rounders=new Array();samples.Rounders[0]="/drills/Rounders/Throwing-Catching/Under-arm-flick-roundersc19.jsp";samples.Rounders[1]="/drills/Rounders/Skills/Catching-into-the-body-rounders12.jsp";samples.Rounders[2]="/drills/Rounders/Conditioned-games/Throw-to-move-the-football-rounders03.jsp";samples.Tennis=new Array();samples.Tennis[0]="/drills/Tennis/Volley-Drills/Alternating-volleys.jsp";samples.Tennis[1]="/drills/Tennis/Forehand-Backhand-Drill/Ground-strokes-under-pressure.jsp";samples.Tennis[2]="/drills/Tennis/Backhand-Drills/Lateral-Forehands-2.jsp";samples.Volleyball=new Array();samples.Volleyball[0]="/drills/Volleyball/1-Techniques/1-Techniques-volleyball083.jsp";samples.Volleyball[1]="/drills/Volleyball/6-Advanced-Drills/Slow-Motion-Serve.jsp";samples.Volleyball[2]="/drills/Volleyball/9-Conditioned-games/Volley-Pass-volleyball048.jsp";samples.Workout=new Array();samples.Workout[0]="/drills/Workout/Upper-Back-Shoulder/Lawnmowers.jsp";samples.Workout[1]="/drills/Workout/Core/Kneeling-Ab-burner.jsp";samples.Workout[2]="/drills/Workout/Triceps/Swiss-Ball-Press-up.jsp";samples.Swimming=new Array();samples.Swimming[0]="/drills/Swimming/Breaststroke-Technique/No-5-Pull-Action.jsp";samples.Swimming[1]="/drills/Swimming/Frontcrawl-Technique/Frontcrawl-Technique8.jsp";samples.Swimming[2]="/drills/Swimming/Butterfly-Technique/Hip-Position-.jsp";function loadGlobalSessionRole(a){if(typeof(spAjaxRequest)=="function"){spAjaxRequestWithId(loadGlobalSessionRoleResponse,"/drills/LoadGlobalSessionJsonRole.do","",a,"")}else{$.ajax({url:"/drills/LoadGlobalSessionJsonRole.do",processData:false,data:"&dec=none",success:function(b){loadGlobalSessionRoleResponse(convertResponse(b),a)}})}}var globalSessionRole=null;function loadGlobalSessionRoleResponse(req,nextFunction){globalSessionRole=eval("("+req.responseText+")");nextFunction()}function sendEmail(a){var d=a;if(d==null){d=document.emailForm}if(d==null){alert("Unfortunately the email could not be sent at this time. Please reload and try again, otherwise contact Sportplan at info@sportplan.com");return}var b=collectVariables(d);b+="&forward=ajax";if(typeof(spAjaxRequest)=="function"){spAjaxRequest(emailSent,"/drills/email.do",b,"")}else{$.ajax({url:"/drills/email.do",processData:false,data:b+"&dec=none",complete:emailSent})}var c=document.getElementById("sendingPending");if(c!=null){c.innerHTML='<img src="/drills/img/loading.gif" alt="loading..." />'}}function emailSent(a){if(a.responseText.indexOf("success")>=0){alert("Thank you, your email has been sent.")}else{alert("Unfortunately the email could not be sent at this time. Please reload and try again, otherwise contact Sportplan at info@sportplan.com")}var b=document.getElementById("sendingPending");if(b!=null){b.innerHTML=""}}function collectVariables(d){var a="";var c;for(var b=0;b<d.elements.length;b++){c=d.elements[b];if(c!=null){if(c.type=="radio"){if(c.checked){a+=c.name+"="+removeAmpersands(c.value)+"&"}}else{a+=c.name+"="+removeAmpersands(c.value)+"&"}}}a=a.split("'").join("");return a}function removeAmpersands(b){if(b!=null){var a=b.indexOf("&");while(a>=0){b=b.substring(0,a)+"%26"+b.substring(a+1,b.length);a=b.indexOf("&")}}return b}var SL;function AnswersPractice(d,j,m,l,h,i,k,g,q,b,p,o,e,c,n,a,f){this.id=d;this.title=j;this.description=m;this.coachingPoints=l;this.equipment=h;this.type=i;this.baseDir=k;this.fileName=g;this.fileType=q;this.colour=b;this.customPracticeId=p;this.imageSource=o;this.customType=e;this.width=c;this.height=n;this.swfSource=a;this.created=f}function displayAnswersPractice(f,d){var a="answersPractice";if(f.customPracticeId>0){a="answersCustomPractice"}var h=document.getElementById(a+d);if(h===null){return}var c="";c+="<div class='movie"+d+"' style='background-color:"+f.colour+";'>";c+=drawPractice(f,f.width,f.height);c+="</div>";var b='<p><strong style="color:#FF6600;">'+f.title+"</strong></p>";var i="";if(f.description!==""){i="<p>";i+="<strong>"+langres_spLib_description+"</strong><br />";i+=f.description;i+="</p>"}var g="";if(f.coachingPoints!==""){g="<p>";g+="<strong>"+langres_spLib_coachingPoints+"</strong><br />";g+=f.coachingPoints;g+="</p>";if(g.indexOf("PDF File")>-1){g+='<p><a href="/'+f.baseDir+"/pdf/"+f.fileName+'.pdf" >Download PDF File</a></p>'}}var e='<table cellpadding="5" cellspacing="0" border="0">';e+="<tr>";e+='<td valign="top" id="question">';e+=c;e+="<p>&copy; "+langres_spLib_copyright+" Sportplan Ltd, 2011</p>";e+="</td>";e+='<td valign="top" id="question">';e+=b;e+=i;e+=g;e+="</td>";e+="</tr>";e+="</table>";h.innerHTML=e}function setThreadCategory(b){var a="tId="+b;spAjaxRequestWithId(threadCategoriesResponse,"/drills/AnswersForum/LoadCategories.do",a,b,"")}function threadCategoriesResponse(req,threadId){var sportCategoryLanguages=eval("("+req.responseText+")");var displayHTML='<div style="margin:0px 20px 30px 20px;">';displayHTML+='<h2 style="color:#0071B6;">Change Category</h2>';displayHTML+='<form name="ChangeCategoryForm" action="/drills/AnswersForum/ChangeCategory.do" method="post" onsubmit="return false;">';displayHTML+="<div>";displayHTML+='<span style="font-weight:bold; margin-right:10px;">select sport/category:</span>';displayHTML+='<select id="fsclId" name="fsclId">';for(var i=0;i<sportCategoryLanguages.length;i++){displayHTML+='<option value="'+sportCategoryLanguages[i].id+'">'+sportCategoryLanguages[i].sportLanguage.languageName+" : "+sportCategoryLanguages[i].categoryLanguage.languageName+"</option>"}displayHTML+="</select>";displayHTML+='<input type="hidden" name="tId" value="'+threadId+'" />';displayHTML+="</form>";displayHTML+=spButton("change category","document.ChangeCategoryForm.submit();","AddBut","left");displayHTML+=spButton("cancel","spWindowClose();","CancelBut","left");displayHTML+="</div>";spWindowOpen(displayHTML,400)}function followUser(b,a){var c='<div style="margin:0px 20px 40px 20px;">';c+='<h2 style="color:#0071B6;">Follow '+a+"</h2>";c+="<p>Please confirm that you would like to follow "+a+"'s activity?</p>";c+="<p>By following "+a+" you will see notifications of their posted questions and answers in the activity feed that is shown on your home page.</p>";c+=spButton("yes, follow "+a,"confirmFollowUser("+b+", '"+a+"');","FollowBut","left");c+=spButton("no, cancel","spWindowClose();","CloseBut","left");c+="</div>";spWindowOpen(c,500)}function confirmFollowUser(b,a){var c="postingId="+b;spAjaxRequestWithId(followUserResponse,"/drills/FollowUser.do",c,a,"");var d='<div style="margin:0px 20px 30px 20px; align:center;"><img src="/drills/img/loading.gif" alt="loading..." /></div>';spWindowOpen(d,500)}function followUserResponse(b,a){var c='<div style="margin:0px 20px 40px 20px;">';if(b.getResponseHeader("followError")!=null){c+='<h2 style="color:red;">Error Following '+a+"</h2>";c+="<p>There was an error whilst trying to process your follow request. Please try again or contact us using the Feedback link on the right hand side.</p>"}else{c+='<h2 style="color:green;">Success</h2>';c+="<p>You are now following "+a+"'s activity!</p>"}c+=spButton("close","spWindowClose();","CloseBut","left");c+="</div>";spWindowOpen(c,500)}function explainFollowing(a){var b='<div style="margin:0px 20px 40px 20px;">';b+='<h2 style="color:#0071B6;">Following '+a+"</h2>";b+="<p>Sportplan has introduced <em>following</em> so that you can keep up to date with the people that you are interested in.</p>";b+="<p>By following "+a+" you will see notifications of their posted questions and answers in the activity feed that is shown on your home page.</p>";b+="<p>You can do this for any Sportplan user, it's that simple!</p>";b+=spButton("close","spWindowClose();","CloseBut","left");b+="</div>";spWindowOpen(b,500)}var usersQuestions=null;var usersAnswers=null;var lastUsedUsersFirstName=null;function seeUsersThreads(c,b,a){lastUsedUsersFirstName=b;var d="uaId="+c;if(a==null||a){spAjaxRequestWithId(displayUsersQuestions,"/drills/UsersQuestions.do",d,c,"");if(pageTracker){pageTracker._trackPageview("/answersForum/questions-"+lastUsedUsersFirstName)}}else{spAjaxRequestWithId(displayUsersAnswers,"/drills/UsersAnswers.do",d,c,"");if(pageTracker){pageTracker._trackPageview("/answersForum/answers-"+lastUsedUsersFirstName)}}var e='<div style="margin:0px 20px 40px 20px; align:center;"><img src="/drills/img/loading.gif" alt="loading..." /></div>';spWindowOpen(e,700)}function displayUsersQuestions(req,userAccountId){var displayHTML='<div style="margin:0px 20px 40px 20px;">';if(req.responseText=="error"){displayHTML+='<h2 style="color:red;">Error</h2>';displayHTML+="<p>There was an error whilst trying to load the user's questions. Please try again or contact us using the Feedback link on the right hand side.</p>"}else{var threads=eval("("+req.responseText+")");displayHTML+="<div>";displayHTML+='<span style="font-size:18px; font-weight:bold; color:#0071B6;">'+lastUsedUsersFirstName+"'s Questions</span>";displayHTML+='<a href="javascript:seeUsersThreads('+userAccountId+", '"+lastUsedUsersFirstName+'\', false);" style="font-size:12px; margin-left:30px;" class="false_cursor">view '+lastUsedUsersFirstName+"'s Answers</a>";displayHTML+="</div>";displayHTML+='<div style="height:400px; overflow:auto;">';var threadsHTML=displayThreads(threads);if(threadsHTML==""){threadsHTML='<div style="margin-top:10px;">This user has not posted any questions.</div>'}displayHTML+=threadsHTML;displayHTML+="</div><br />"}displayHTML+=spButton("close","spWindowClose();","CloseBut","left");displayHTML+="</div>";spWindowOpen(displayHTML,700)}function displayUsersAnswers(req,userAccountId){var displayHTML='<div style="margin:0px 20px 40px 20px;">';if(req.responseText=="error"){displayHTML+='<h2 style="color:red;">Error</h2>';displayHTML+="<p>There was an error whilst trying to load the user's answers. Please try again or contact us using the Feedback link on the right hand side.</p>"}else{var threads=eval("("+req.responseText+")");displayHTML+="<div>";displayHTML+='<span style="font-size:18px; font-weight:bold; color:#0071B6;">'+lastUsedUsersFirstName+"'s Answers</span>";displayHTML+='<a href="javascript:seeUsersThreads('+userAccountId+", '"+lastUsedUsersFirstName+'\', true);" style="font-size:12px; margin-left:30px;" class="false_cursor">view '+lastUsedUsersFirstName+"'s Questions</a>";displayHTML+="</div>";displayHTML+='<div style="height:400px; overflow:auto;">';var threadsHTML=displayThreads(threads);if(threadsHTML==""){threadsHTML='<div style="margin-top:10px;">This user has not answered any questions.</div>'}displayHTML+=threadsHTML;displayHTML+="</div><br />"}displayHTML+=spButton("close","spWindowClose();","CloseBut","left");displayHTML+="</div>";spWindowOpen(displayHTML,700)}function loadUsersThreads(a,d,b){var c="uaId="+a;spAjaxRequestWithId(loadThreadsResponse,b,c,d,"")}function loadThreadsResponse(req,displayDivId){var displayDiv=document.getElementById(displayDivId);if(displayDiv!=null){if(req.responseText!="error"){var threads=eval("("+req.responseText+")");displayDiv.innerHTML=displayThreads(threads)}}}function displayThreads(b){var c="";for(var a=0;a<b.length;a++){c+='<div class="questionDiv">';c+='<a href="'+b[a].pageName+'" class="questionTitleLink"><img src="/drills/img/qSquareB.gif" align="left" border="0"></a>';c+='<div class="questionDivContents">';c+='<a href="'+b[a].pageName+'" class="questionTitleLink">'+b[a].title+"</a>";c+="<br />";c+="(viewed "+b[a].viewed+" times) ";c+='<a href="/drills/answers/'+b[a].sportName+'/index.jsp"><strong>'+b[a].sportName+"</strong></a>";c+=" - ";c+='<a href="/drills/answers/'+b[a].sportName+"/"+b[a].categoryName+'/index.jsp">'+b[a].categoryName+"</a>";c+="<br />";c+="<div>";c+=b[a].answersCount+" answer";if(b[a].answersCount!=1){c+="s"}if(!(b[a].latestAnsweringUser==null||b[a].latestAnsweringUser=="")){c+=" : latest "+b[a].latestAnsweringUser}c+="</div>";c+="</div>";c+="</div>"}return c}function editAnswer(b){hideFlash();var c=document.getElementById("editAnswer"+b);if(c!=null){var a="";a+='<div style="padding:20">';a+="<strong>"+langres_answers_EditAnswer+":</strong><br />";a+='<textarea id="editedAnswer'+b+'" name="editedAnswer'+b+'" cols="60" rows="12">';a+=c.innerHTML;a+="</textarea>";a+="<br /><br />";if(lastEmail=="alex@sportplan.com"||lastEmail=="johndnurse@gmail.com"){a+='<a href="#" onclick="toggleEditor(\'editedAnswer'+b+"');return false;\">toggle editor</a><br/>"}a+=spButton(langres_answers_update,"updateAnswer("+b+");","updateAnswer"+b,"left");a+="</div>";spWindowOpen(a,500);setEditorToBoxSize(400,180);addEditor("editedAnswer"+b)}else{alert(langres_answers_cannotEdit)}}function updateAnswer(c){var a=document.getElementById("editedAnswer"+c);if(a!=null){toggleEditor("editedAnswer"+c);var b=document.getElementById("UpdateForm"+c);b.fmMessage.value=a.value;b.submit();spWindowClose()}else{alert(langres_answers_cannotUpdate);spWindowClose()}}function deleteAnswer(b){if(confirm(langres_answers_confirmDeleteAnswer)){var a=document.getElementById("DeleteForm"+b);a.submit()}}var attachedFS=null;function openAttachedForumSession(b,a){location.href="/drills/EditSession.do?OpenedSession=true&open=true&seId="+b+"&fsId="+a}function displayAttachedForumSession(req,forumSessionId){var fsDiv=document.getElementById("openSession"+forumSessionId);fsDiv.innerHTML=req.responseText;fsDiv.innerHTML="<strong>Contents of div with id: openSession"+forumSessionId+"</strong><br /><br />"+fsDiv.innerHTML;attachedFS=eval("("+findStart(req.responseText)+")");var result="";if(attachedFS.session.sportCodeId==3332){result+="<a href=\"javascript:printFromForum('Workout');\">Print Session</a><br/>"}else{result+="<a href=\"javascript:printFromForum('Open');\">"+langres_answers_ViewPrintPreview+"</a><br/>"}result+='<div style="height:50px;">';result+='<div style="margin:4px;width:80px;height:40px;float:left;overflow:hidden;">';result+='<img src="/drills/img/headerIcon.gif" width="78" height="43">';result+="</div>";for(var i=0;i<attachedFS.practices.length;i++){result+=' <div style="margin:4px;width:80px;float:left;overflow:hidden;">';result+=drawPractice(attachedFS.practices[i],56,34);result+="</div>"}result+="</div >";fsDiv.innerHTML=result;fsDiv.className="forumSessionHolder";fsDiv.style.display="block";fsDiv.style.height=parseInt(fsDiv.offsetHeight)+"px";if(fsDiv.height){fsDiv.height=parseInt(fsDiv.offsetHeight)+"px"}spWindowClose()}function printFromForum(b){var c="";hideFlash();c+='<div style="padding:10px;"><span style="color:#888888;font-size:15px;padding-bottom:6px;"><strong>'+langres_answers_selectPrintLayout+"</strong></span>";c+='<br><table width="460" border="0" cellspacing="0" cellpadding="0">';c+="<tr>";var a=false;if(b=="Workout"){var a=true}if(a){c+='<td><a href="/drills/layout/print/print'+b+'.jsp?layout=workoutCard" onclick="spWindowClose();pageTracker._trackPageview(\'/printWorkoutCard\');" target="_blank"><img src="/drills/img/printLayoutWorkout.gif" width="102" height="131" border="0"></a></td>';c+='<td style="width:10px;">&nbsp;</td>';c+='<td><a href="/drills/layout/print/print'+b+'.jsp?layout=sideBySide" onclick="spWindowClose();pageTracker._trackPageview(\'/printSideBySide\');" target="_blank"><img src="/drills/img/printLayout2.gif" width="102" height="131" border="0"></a></td>';c+='<td style="width:10px;">&nbsp;</td>'}else{c+='<td><a href="/drills/layout/print/print'+b+'.jsp?layout=standard" onclick="spWindowClose();pageTracker._trackPageview(\'/printStandard\');" target="_blank"><img src="/drills/img/printLayout1.gif" width="102" height="131" border="0"></a></td>';c+='<td style="width:10px;">&nbsp;</td>';c+='<td><a href="/drills/layout/print/print'+b+'.jsp?layout=sideBySide" onclick="spWindowClose();pageTracker._trackPageview(\'/printSideBySide\');" target="_blank"><img src="/drills/img/printLayout2.gif" width="102" height="131" border="0"></a></td>';c+='<td style="width:10px;">&nbsp;</td>';c+='<td><a href="javascript:alert(\'coming Soon\');pageTracker._trackPageview(\'/print2Up\');"><img src="/drills/img/printLayout3.gif" width="102" height="131" border="0"></a></td>';c+='<td style="width:10px;">&nbsp;</td>';c+='<td><a href="/drills/layout/print/print'+b+'.jsp?layout=4Up" onclick="spWindowClose();pageTracker._trackPageview(\'/print4Up\');" target="_blank"><img src="/drills/img/prLayout4up.gif" width="132" height="103" border="0"></a></td>'}c+="</tr></table>";c+='<p><a href="/drills/layout/print/print'+b+'.jsp?layout=new08" onclick="spWindowClose();pageTracker._trackPageview(\'/printNew08\');" target="_blank"><img src="/drills/img/printLayout08.gif" width="238" height="114" border="0"></a></p>';c+='<P style="color:#888888;font-size:13px;">'+langres_answers_templatesForA4+"<br/> NB "+langres_answers_popupBlockerAdvice+"</P></div>";spWindowOpen(c,550)}function showAttachmentOptions(){var a=document.getElementById("attachmentOptions");a.style.display="block";a=document.getElementById("openAttachmentOptions");a.style.display="none"}function openAttachmentOption(b){var a=b.attachmentType;hideFlash();if(a[0].checked){customPracticeAttachment()}else{if(a[1].checked){practiceVariantAttachment()}else{if(a[2].checked){sessionEntityAttachment()}}}}function customPracticeAttachment(a,c){if(a!=null&&c!=null){spAjaxRequest(displayCPAttachment,"/drills/OpenCustomPracticeInFolder.do","template=simple&forward=attachment&pracSportName="+c+"&bgImage="+a,"")}else{var d=document.getElementById("sportDrop");var b="";if(d!=null){b=d.options[d.selectedIndex].text}else{b=document.answerForm.sportName.value}spAjaxRequest(displayCPAttachment,"/drills/ShowCPOpenOptions.do","isMemberSport="+b+"&bgImage="+a,"")}}function displayCPAttachment(a){spWindowOpen(a.responseText,700)}var IFrameObj;var attachedcp=null;function imageToForm(){document.EditCustomPracticeForm.image.value=document.applets.canvas.GetImage(1,"png");var d;var a="server.html";if(!IFrameObj){try{var b=document.createElement("iframe");b.setAttribute("id","cpFrame");b.setAttribute("name","cpFrame");b.style.border="0px";b.style.width="0px";b.style.height="0px";IFrameObj=document.body.appendChild(b);if(document.frames){IFrameObj=document.frames.cpFrame}}catch(c){iframeHTML='<iframe id="cpFrame" name="cpFrame" style="';iframeHTML+="border:0px;";iframeHTML+="width:0px;";iframeHTML+="height:0px;";iframeHTML+='"></iframe>';document.body.innerHTML+=iframeHTML;IFrameObj=new Object();IFrameObj.document=new Object();IFrameObj.document.location=new Object();IFrameObj.document.location.iframe=document.getElementById("cpFrame");IFrameObj.document.location.replace=function(e){this.iframe.src=e}}}if(navigator.userAgent.indexOf("Gecko")!=-1&&!IFrameObj.contentDocument){setTimeout("imageToForm()",10);return}document.EditCustomPracticeForm.target="cpFrame";document.EditCustomPracticeForm.forward.value="attachment";document.EditCustomPracticeForm.submit()}function updateAttachedCPDetails(cpJSONOb){cpJSONOb=findStart(cpJSONOb);attachedcp=eval("("+cpJSONOb+")");spWindowClose();var attachmentDisplay=document.getElementById("attachmentDisplay");attachmentDisplay.innerHTML=attachedcp.title+"<br /><img src='"+attachedcp.imageSource+"' height='100px' alt='attached image' />";attachmentDisplay.style.display="block";var theForm=document.askQuestionForm;if(theForm==null){theForm=document.answerForm}theForm.customPracticeId.value=attachedcp.customPracticeId;theForm.attachedcp.value=cpJSONOb;var pageDimensions=getPageSize();var iebody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;iebody.scrollTop=pageDimensions[1]-200;theForm.answer.focus();theForm.practiceVariantId.value="";theForm.sessionEntityId.value=""}function showFCPImage(c,b){var a="<img src='"+c+"' width='"+b+"' alt='attached image' />";spWindowOpen(a,b)}function practiceVariantAttachment(){if(lastSportName==null||lastSportName==""||lastSportName=="Sports"){var sportSelect=document.getElementById("sportDrop");lastSportName=sportSelect.options[sportSelect.selectedIndex].text}var clipboardOptions="";var jsonBox=document.getElementById("jsonClipboard");if(jsonBox){jsonString=jsonBox.innerHTML;if(jsonString.length>5){clipSession=eval("("+findStart(jsonString)+")")}else{alert("Clipboard is Empty");return}}clipboardOptions+="<strong>"+langres_answers_Select_practice+":</strong> ("+langres_answers_clickThumbnailToSelect+")";clipboardOptions+='<table width="500" height="200" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">';for(var i=0;i<clipSession.practices.length;i++){clipboardOptions+='<div style="float:left; margin:4px;" class="false_cursor" onclick="selectPracticeVariant(\'';if(clipSession.practices[i].type==0){clipboardOptions+=clipSession.practices[i].practiceVariantId}else{clipboardOptions+=clipSession.practices[i].customPracticeId}clipboardOptions+="','"+clipSession.practices[i].type+"', "+i+');">'+drawPractice(clipSession.practices[i],100,66)+"</div>"}clipboardOptions+="</td></tr></table>";spWindowOpen(clipboardOptions,500)}function selectPracticeVariant(e,a,b){var d=document.askQuestionForm;if(d==null){d=document.answerForm}if(a==0){d.practiceVariantId.value=e;d.customPracticeId.value="";d.sessionEntityId.value=""}else{d.customPracticeId.value=e;d.practiceVariantId.value="";d.sessionEntityId.value=""}var c=document.getElementById("attachmentDisplay");c.innerHTML="<strong>"+langres_answers_SelectedAttachment+"</strong><br />"+drawPractice(b,100,66);c.style.display="block";spWindowClose()}function addFromLinkPracticeVariant(d,a){var c=document.askQuestionForm;if(c==null){c=document.answerForm}c.practiceVariantId.value=d;c.customPracticeId.value="";c.sessionEntityId.value="";var b=document.getElementById("attachmentDisplay");b.innerHTML="<strong>"+langres_answers_SelectedAttachment+'</strong><br /><img src="http://www.sportplan.net/viewer/movies/'+a+'.gif" width="100" height="66"/>'}function sessionEntityAttachment(){spWindowOpen(langres_answers_LoadingMyStuff+'...<img src="/sisvp/img/loading.gif" alt="" align="absmiddle" />',500);spAjaxRequest(displayMyStuffSessions,"/drills/FindMyStuffSessions.do","forward=list","")}function displayMyStuffSessions(req){var sessions=eval("("+findStart(req.responseText)+")");var sessionOptions="";sessionOptions+="<strong>"+langres_answers_Select_session+":</strong>";sessionOptions+='<table width="500" height="200" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">';sessionOptions+='<div style="height:200px;overflow:auto;">';for(var i=0;i<sessions.se.length;i++){sessionOptions+='<div style="margin:4px; font-size:12px; font-family:Verdana,Arial,sans-serif;" class="false_cursor" onclick="selectSessionEntity(\''+sessions.se[i].seId+"', '"+sessions.se[i].title+'\');"><img src="/userapp/app/images/sessFile.gif" alt="" align="absmiddle" /> '+sessions.se[i].title+"</div>"}sessionOptions+="</div></td></tr></table>";spWindowOpen(sessionOptions,500)}function selectSessionEntity(d,a){var c=document.askQuestionForm;if(c==null){c=document.answerForm}c.sessionEntityId.value=d;c.practiceVariantId.value="";c.customPracticeId.value="";var b=document.getElementById("attachmentDisplay");b.innerHTML="<strong>"+langres_answers_SelectedAttachment+'</strong><br /><img src="/userapp/app/images/sessFile.gif" alt="" align="absmiddle" /> '+a;b.style.display="block";spWindowClose()}var catDrop=new Array();var sportObs;function setupAskQuestion(question,sportName){sportObs=eval("("+answersSports+")");var sportDrop="<select id='sportDrop' onchange='changeCats(this)'>";var count=0;for(prop in sportObs.sports){if(prop!="toJSONString"&&prop!="parseJSON"){sportDrop+="<option value='"+prop+"'>"+prop+"</option>";catDrop[count]="<select id='catDrop' name='fscIndex'>";var max=sportObs.sports[prop].length;catDrop[count]+="<option value='-1'>&lt;select&gt;</option>";for(var i=0;i<max;++i){catDrop[count]+="<option value='"+sportObs.sports[prop][i][1]+"'>"+sportObs.sports[prop][i][0]+"</option>"}catDrop[count]+="</select>";++count}}sportDrop+="</select>";document.getElementById("sports").innerHTML="<strong>"+langres_answers_Select_sport+":</strong> "+sportDrop;document.getElementById("categories").innerHTML="<strong>"+langres_answers_Select_category+":</strong> "+catDrop[0];sportDrop=document.getElementById("sportDrop");for(var i=0;i<sportDrop.length;i++){if(sportDrop[i].text==sportName){sportDrop[i].selected=true;document.getElementById("sports").style.display="none";document.getElementById("sportsAlt").innerHTML="<strong>"+langres_answers_Sport+":</strong> <span style='color:#0000cc;'>"+sportName+"</span>";document.getElementById("sportsAlt").style.display="block";break}}changeCats(sportDrop);if(question!=null&&question!=""){question=question.replace(/&lt;br \/&gt;/g,"\n");var quoteMark=question.indexOf("&#039;");var formattedQ="";while(quoteMark>-1){formattedQ=question.substring(0,quoteMark)+"'";if(question.length>(parseInt(quoteMark)+6)){formattedQ+=question.substring(quoteMark+6)}question=formattedQ;quoteMark=question.indexOf("&#039;")}var remainder="";var spaceIndex=-1;if(question.length>50){remainder=question.substring(50);spaceIndex=remainder.indexOf(" ")}if(spaceIndex>-1){spaceIndex=50+spaceIndex;document.askQuestionForm.title.value=question.substring(0,spaceIndex)+"?";document.askQuestionForm.message.value=question}else{document.askQuestionForm.title.value=question;document.askQuestionForm.message.value=question}}var spObj=document.getElementById("catDrop");if(spObj){if(spObj.options.length==1){spObj.selectedIndex=1;var spObj=document.getElementById("categories");if(spObj){spObj.style.display="none"}}}updateQPreview()}function changeCats(a){document.getElementById("categories").innerHTML="<strong>"+langres_answers_Select_category+":</strong> "+catDrop[a.selectedIndex];if(sportObs.sports[a.options[a.selectedIndex].text].length==0){document.getElementById("categories").style.display="none"}else{document.getElementById("categories").style.display="block"}}function checkQuestion(b){updateQPreview();var e=b.title;var a=b.message;var h=e.value;h=h.replace(/:/g,"-");e.value=h;if(e.value==""){alert(langres_answers_noQuestionEntered);return false}if(e.value.indexOf(langres_answers_askQuestionHaveAnswered)>-1){alert(langres_answers_enterAlternativeSummary);e.focus();e.select();return false}if(a.value==""){alert(langres_answers_noQuestionBody);return false}if(a.value.indexOf(langres_answers_askQuestionHaveAnswered)>-1){alert(langres_answers_titleButNoBody);return false}var g=document.getElementById("sportDrop");var f=document.getElementById("catDrop");var d=g.options[g.selectedIndex].text;if(f.options[f.selectedIndex].value==-1){alert(langres_answers_please_select_category);return false}var c=f.options[f.selectedIndex].text;if(confirm(langres_answers_askUnderCategory+" '"+c+"'?")){b.message.value=removeNL(b.message.value);return document.askQuestionForm.submit()}else{return false}}function addEditor(a){if(!tinyMCE.get(a)&&!iPad){tinyMCE.execCommand("mceAddControl",false,a)}}function removeEditor(a){if(tinyMCE.get(a)){tinyMCE.execCommand("mceRemoveControl",false,a)}}function checkAnswer(b){var a=b.answer;tinyMCE.triggerSave();if(a.value==""){alert(langres_answers_noAnswerEntered);return false}return true}function setupThreadPage(a){setTimes("questionDate");setTimes("timeSpanA");updateReadCount(a)}var calendarMonths=new Array();calendarMonths[calendarMonths.length]=langres_answers_january;calendarMonths[calendarMonths.length]=langres_answers_february;calendarMonths[calendarMonths.length]=langres_answers_march;calendarMonths[calendarMonths.length]=langres_answers_april;calendarMonths[calendarMonths.length]=langres_answers_may;calendarMonths[calendarMonths.length]=langres_answers_june;calendarMonths[calendarMonths.length]=langres_answers_july;calendarMonths[calendarMonths.length]=langres_answers_august;calendarMonths[calendarMonths.length]=langres_answers_september;calendarMonths[calendarMonths.length]=langres_answers_october;calendarMonths[calendarMonths.length]=langres_answers_november;calendarMonths[calendarMonths.length]=langres_answers_december;function formattedDate(a){var b="";b+=a.getHours();b+=":";if(a.getMinutes()<10){b+="0"}b+=a.getMinutes();b+=" ";b+=a.getDate();b+="th ";b+=calendarMonths[parseInt(a.getMonth())];b+=" ";b+=a.getFullYear();return b}function setLastPostedTimes(h){var j=1;var d=new Date().getTime();while(true){var i=document.getElementById(h+"-"+j);++j;if(!i){break}var b=parseInt(i.innerHTML);if(b!="0"){var f=d-b;f=Math.round(f/1000);var a;if(f<60){a=f+" "+langres_answers_seconds}else{f=Math.round(f/60);if(f<60){a=f+" "+langres_answers_minutes}else{var c=Math.round(f/60);var g=f%60;if(c<24){a=c+" "+langres_answers_hours+" "+g+" "+langres_answers_minutes}else{var e=Math.round(c/24);a=e+" "+langres_answers_days}}}a=a+" "+langres_answers_ago+".";i.innerHTML=a;i.className="timeSpan_vis"}else{i.style.display="none"}}}function setTimes(i){var k=1;var e=new Date().getTime();while(true){var j=document.getElementById(i+"-"+k);++k;if(!j){break}var c=parseInt(j.innerHTML);var g=e-c;g=Math.round(g/1000);var a;if(g<60){a=g+" "+langres_answers_seconds}else{g=Math.round(g/60);if(g<60){a=g+" "+langres_answers_minutes}else{var d=Math.round(g/60);var h=g%60;if(d<24){a=d+" "+langres_answers_hours+" "+h+" "+langres_answers_minutes}else{var f=Math.round(d/24);a=f+" "+langres_answers_days}}}a=langres_answers_Posted+" "+a+" "+langres_answers_ago+".";var b=new Date(c);a+=" "+formattedDate(b);j.innerHTML=a;j.className="timeSpan_vis"}}function updateReadCount(a){spAjaxRequest(updateReadCountHandler,"/drills/IncrementReadCount.do","threadId="+a,"")}function updateReadCountHandler(a){}var updatePCount=2;function updateQPreview(){document.getElementById("questionPreviewTitle").innerHTML=document.askQuestionForm.title.value;try{var a=tinyMCE.get("message");if(a){tinyMCE.triggerSave()}document.getElementById("questionPreviewMessage").innerHTML=removeNL(document.askQuestionForm.message.value)}catch(b){}}function setupTinyMCE(){tinyMCE.init({mode:"textareas",theme:"simple",force_br_newlines:true,force_p_newlines:false,forced_root_block:""})}var fullSportsList='{"sportCodeId":"1001","sportName":"Hockey","homeImage":"/img/hockeyHome.jpg","offTestDrive":"false","aweberFormId":"72247779","aweberUnit":"hockeydrills","aweberRedirectID":"redirect_025c72627b31dbf4a3ca7188d5a4f2a6","TDaweberFormId":"2077908887","TDaweberUnit":"","TDaweberRedirectID":"redirect_2113394d1191dfecd22b4ac971825aa4"},{"sportCodeId":"1002","sportName":"Netball","homeImage":"/img/home/netballHome.jpg","offTestDrive":"false","aweberFormId":"1750508627","aweberUnit":"netballcoach","aweberRedirectID":"redirect_025c72627b31dbf4a3ca7188d5a4f2a6","TDaweberFormId":"1119922766","TDaweberUnit":"","TDaweberRedirectID":"redirect_8ab90ffe0d0cd6b68c3e21710ce333f7"},{"sportCodeId":"1009","sportName":"Rugby","homeImage":"/img/home/rugbyHome.jpg","offTestDrive":"false","aweberFormId":"433129528","aweberUnit":"rugbydrills","aweberRedirectID":"redirect_d905bcbfc7b9a54dc353bcc33e7542b2","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1011","sportName":"Football","homeImage":"/img/footballHome.jpg","offTestDrive":"false","aweberFormId":"125743661","aweberUnit":"football-drills","aweberRedirectID":"redirect_b604cb670dad177acfb001f1a37b4af3","TDaweberFormId":"1951863055","TDaweberUnit":"","TDaweberRedirectID":"redirect_e97c728ce8e76dd43aab3990ed41ed04"},{"sportCodeId":"2386","sportName":"Agility","homeImage":"/img/agilityHome.jpg","offTestDrive":"false","aweberFormId":"1765914510","aweberUnit":"agilitydrills","aweberRedirectID":"redirect_f2c577157eec881704652a5e57a99379","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1010","sportName":"Tennis","homeImage":"/img/tennisHome.jpg","offTestDrive":"false","aweberFormId":"1190407027","aweberUnit":"tennis-drills","aweberRedirectID":"redirect_a7675d523f49746f4f1b80d40ca02156","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1096","sportName":"Athletics","homeImage":"/img/athleticsHome.jpg","offTestDrive":"false","aweberFormId":"490964464","aweberUnit":"athleticscoach","aweberRedirectID":"redirect_9d6a81bbfc9611e0c1911ddb22fa6882","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1008","sportName":"Basketball","homeImage":"/img/home/basketballHome.jpg","offTestDrive":"false","aweberFormId":"2119744628","aweberUnit":"bbcoachdrills","aweberRedirectID":"redirect_34bdcb4a9332cb2c744ff2643e8f9cc9","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1012","sportName":"Cricket","homeImage":"/img/cricketHome.jpg","offTestDrive":"false","aweberFormId":"2108156259","aweberUnit":"cricketdrills","aweberRedirectID":"redirect_fcb2126e6e929fa40c773f05794f278f","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1013","sportName":"Gymnastics","homeImage":"/img/gymHome.jpg","offTestDrive":"false","aweberFormId":"1683465112","aweberUnit":"gym-drills","aweberRedirectID":"redirect_3eeb59ba4d8a1c69d48f02cc9f884408","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"3332","sportName":"Workout","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"2052696915","aweberUnit":"workouttrainer","aweberRedirectID":"redirect_94239d1e40539941b0c471dc369df297","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1614","sportName":"Badminton","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"1437959482","aweberUnit":"badminton-coach","aweberRedirectID":"redirect_1575e88280342f79243c3c4f0762fd66","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1015","sportName":"Golf","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"1778880544","aweberUnit":"golfcoach","aweberRedirectID":"redirect_ae52dbaaba4a6b9922c1ec69abde6af1","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"2128","sportName":"Handball","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"540996601","aweberUnit":"handballdrills","aweberRedirectID":"redirect_00aafe660f724621f7d992e94eca34cc","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1003","sportName":"Swimming","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"122284539","aweberUnit":"swimcoach","aweberRedirectID":"redirect_1e764fc8dcba4dc0a6911681ba97b4c9","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"1613","sportName":"Volleyball","homeImage":"/img/home/genHome.jpg","offTestDrive":"false","aweberFormId":"538649787","aweberUnit":"volleyballcoach","aweberRedirectID":"redirect_881868f4dc7b85d7f984f1c79f58b323","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"3762","sportName":"Rounders","homeImage":"/img/home/roundersHome.gif","offTestDrive":"false","aweberFormId":"328240317","aweberUnit":"roundersdrills","aweberRedirectID":"redirect_969e639d77d826632d3b6f1b702a3f9d","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"3849","sportName":"Rugby League","homeImage":"/img/home/rugbyHome.jpg","offTestDrive":"false","aweberFormId":"614574774","aweberUnit":"rugbyleague","aweberRedirectID":"redirect_92aa20c9e0a13c0b3e93cc917544dfa4","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""},{"sportCodeId":"3848","sportName":"Ice Hockey","homeImage":"/img/home/genHome.jpg","offTestDrive":"","aweberFormId":"","aweberUnit":"","aweberRedirectID":"redirect_92aa20c9e0a13c0b3e93cc917544dfa4","TDaweberFormId":"","TDaweberUnit":"","TDaweberRedirectID":""}';function playWithUSI(){if(!isAweberSport()){var a="";a+='<div style="height:360px;width:600px;">';a+='<div style="padding:16px;"><p style="font-size:20px;"><strong>'+lastFullName.substring(0,lastFullName.indexOf(" "))+", welcome to Sportplan!</strong><br/>";a+="Please set-up your My Sports options:</p>";a+='<p style="font-size:20px;line-height:30px;color:#6699ff;font-weight:bold;">Why choose My Sports?</p>';a+='<ul style="font-size:16px;line-height:25px;"><li>My Sports puts quick links at the top of the page to improve navigation</li>';a+="<li>Choose to get free updates by email in your favourite sports</li>";a+="<li>You can change your My Sport choices at any time</li>";a+="</ul>";a+=spButton("Press to Continue","startMySports()","123","left");a+="</div>";a+="</div>";spWindowOpen(a,640)}}function isAweberSport(){var c=getCookieName("aweberSport");if(c){if(c.length>0){var a=null;a=sportCodeIdFromSportName(c);if(a!=null){var b='{"userSportInterests":[{"interestId":"0","sportCodeId":"'+a+'","updateEmailRequested":"true","isNew":"true","isDelete":"false"}]}';var e="sportInterestsString="+b;spAjaxRequest(aweberSetSportResponse,"/ltad/UpdateSportInterest.do",e,document.getElementById("mySportNetQuestion"));if(typeof(pageTracker)!="undefined"){pageTracker._trackPageview("/aweberSport/"+c)}var d=new Date();putCookie("aweberSport","",d.toUTCString());return true}var d=new Date();putCookie("aweberSport","",d.toUTCString());return false}}return false}function aweberSetSportResponse(a){if(window.location.href.indexOf("DrillsLogin.do")>1){window.location.href="http://"+sphost+"/drills/index.jsp"}else{window.location.href=window.location.href}}function startMySports(){spWindowClose();var a="";a+='<div style="width:600px;overflow:visible;height:560px;" id="mySportHolder">';a+='<div style="padding:8px;overflow:visible;" id="mySportOptionsBox">';a+=drawMySportsOutline();a+='<div style="margin-top:10px;font-size:20px;line-height:30px;">Please choose your sports from the list below:</div>';a+=drawMoreSportsOutline();if(myUSI!=null){if(myUSI.userSportInterests.length>0){a+=spButton("Finish","closeMySports()","123","right")}}a+="</div>";a+="</div>";a+="</div>";spWindowOpen(a,640,null,'{"title":"'+lastFullName.substring(0,lastFullName.indexOf(" "))+', My Sport Set-Up"}');populateMySports("PopUp","icon");populateMoreSports("PopUp","icon")}function closeMySports(){window.location.href=window.location.href}function drawMySportsOutline(){var a="";a+='<table  border="0" cellspacing="0" cellpadding="0" width="570">';a+='<tr><td><img src="/drills/img/home/lbtl.gif" alt="" width="12" height="8"></td>';a+='<td bgcolor="#DDF0F7" width="100%"><img src="/drills/img/home/lbt.gif" alt="" width="1" height="8"></td>';a+='<td><img src="/drills/img/home/lbtr.gif" alt="" width="12" height="8"></td>';a+='</tr><tr bgcolor="#DDF0F7"><td>&nbsp;</td><td class="folderListTitle">My Sports</td><td>&nbsp;</td></tr><tr>';a+='<td><img src="/drills/img/home/lbml.gif" alt="" width="12" height="12"></td>';a+='<td background="/drills/img/home/lbm.gif"><img src="/drills/img/home/lbm.gif" alt="" width="1" height="12"></td>';a+='<td><img src="/drills/img/home/lbmr.gif" alt="" width="12" height="12"></td>';a+='</tr><tr><td background="/drills/img/home/lbl.gif"><img src="/drills/img/home/lbl.gif" width="12" height="1"></td>';a+='<td valign="top" style="width:240px;background-color:#ffffff;" id="mySportOptionsPopUp">';a+="&nbsp;";a+='</td><td background="/drills/img/home/lbr.gif"><img src="/drills/img/home/lbr.gif" width="12" height="8"></td></tr><tr><td><img src="/drills/img/home/lbbl.gif" alt="" width="12" height="10"></td>';a+='<td background="/drills/img/home/lbb.gif"><img src="/drills/img/home/lbb.gif" width="1" height="10"></td>';a+='<td><img src="/drills/img/home/lbbr.gif" alt="" width="12" height="10"></td>';a+="</tr></table>";return a}function drawMoreSportsOutline(){var a="";a+='<table  border="0" cellspacing="0" cellpadding="0" width="570">';a+='<tr><td><img src="/drills/img/home/gtl.gif" alt="" width="12" height="8"></td>';a+='<td bgcolor="#E6E6E6" width="100%"><img src="/drills/img/home/gt.gif" alt="" width="1" height="8"></td>';a+='<td><img src="/drills/img/home/gtr.gif" alt="" width="12" height="8"></td>';a+='</tr><tr bgcolor="#E6E6E6"><td>&nbsp;</td><td class="folderListTitle" style="color:#666666;">More Sports</td><td>&nbsp;</td></tr><tr>';a+='<td><img src="/drills/img/home/gml.gif" alt="" width="12" height="12"></td>';a+='<td background="/drills/img/home/gm.gif"><img src="/drills/img/home/gm.gif" alt="" width="1" height="12"></td>';a+='<td><img src="/drills/img/home/gmr.gif" alt="" width="12" height="12"></td>';a+='</tr><tr><td background="/drills/img/home/gl.gif"><img src="/drills/img/home/gl.gif" width="12" height="1"></td>';a+='<td valign="top" style="width:240px;background-color:#ffffff;" id="moreSportOptionsPopUp">';a+="&nbsp;";a+='</td><td background="/drills/img/home/gr.gif"><img src="/drills/img/home/gr.gif" width="12" height="8"></td></tr><tr><td><img src="/drills/img/home/gbl.gif" alt="" width="12" height="10"></td>';a+='<td background="/drills/img/home/gb.gif"><img src="/drills/img/home/gb.gif" width="1" height="10"></td>';a+='<td><img src="/drills/img/home/gbr.gif" alt="" width="12" height="10"></td>';a+="</tr></table>";return a}var myUSI=null;function populateMySports(where,type){var box=document.getElementById("USIdetails");if(box&&box.innerHTML.length>5||myUSI!=null){if(myUSI==null){myUSI=eval("("+findStart(box.innerHTML)+")")}SL=eval("(["+fullSportsList+"])");if(where=="PopUp"){var spBox=document.getElementById("mySportOptionsPopUp")}if(where=="home"){var spBox=document.getElementById("loggedInHomeSports")}if(spBox){if(type=="icon"){var result='<div style="width:580px;">';var foundSelected=0;var usedUSI=new Array();for(var i=0;i<myUSI.userSportInterests.length;i++){if(!checkForUsedUSI(myUSI.userSportInterests[i].sportCodeId,usedUSI)&&myUSI.userSportInterests[i].isDelete=="false"&&myUSI.userSportInterests[i].interestId!=-1){result+='<div class="mySportHolder" ';if(myUSI.userSportInterests[i].isNew=="false"){result+=' onclick="editSportInterest('+i+');"'}result+=">";result+='<table width="74"  border="0" cellspacing="0" cellpadding="0"><tr><td>';result+='<img src="http://'+sphost+"/drills/"+getSportImage(myUSI.userSportInterests[i].sportCodeId)+'" alt="'+myUSI.userSportInterests[i].sportName+'" width="71" height="50" border="0" align="absmiddle" /></td>';result+='</tr><tr><td align="center" style="font-size:10px;color:#000099;">'+myUSI.userSportInterests[i].sportName+"</td></tr></table>";usedUSI[usedUSI.length]=myUSI.userSportInterests[i].sportCodeId;result+="</div>"}}result+="</div>"}if(type=="list"){var result='<div style="width:190px;overflow:hidden;">';var foundSelected=0;var usedUSI=new Array();for(var i=0;i<myUSI.userSportInterests.length;i++){if(!checkForUsedUSI(myUSI.userSportInterests[i].sportCodeId,usedUSI)&&myUSI.userSportInterests[i].isDelete=="false"&&myUSI.userSportInterests[i].interestId!=-1){result+='<div style="padding:2px;border-bottom:1px dashed #dddddd;">';if(myUSI.userSportInterests[i].isMember=="true"){result+='<img src="/drills/img/home/memWStar.gif" width="18" height="18" align="absmiddle"> '}if(myUSI.userSportInterests[i].isMember=="false"){result+='<img src="/drills/img/home/nonMemWStar.gif" width="18" height="18" align="absmiddle"> '}result+='<a href="/drills/'+myUSI.userSportInterests[i].sportName+'/index.jsp" ';result+=' class="sportLinkHome">'+myUSI.userSportInterests[i].sportName+"</a>";if(myUSI.userSportInterests[i].isMember=="false"&&myUSI.userSportInterests[i].isOnSale=="true"){result+=' <a href="http://'+sphost+"/drills/SetupTUD.do?forward=subscribe&sportName="+myUSI.userSportInterests[i].sportName+"&forwardPage=http://"+sphost+'/">subscribe</a>'}usedUSI[usedUSI.length]=myUSI.userSportInterests[i].sportCodeId;result+="</div>"}}result+="</div>"}spBox.innerHTML=result;if(parseInt(spBox.offsetHeight)>160){spBox.innerHTML=result+'<div class="clear"></div>'}}}}function checkForSportInterest(b){for(var a=0;a<myUSI.userSportInterests.length;a++){if(myUSI.userSportInterests[a].interestId!=-1){if(myUSI.userSportInterests[a].sportCodeId==b&&myUSI.userSportInterests[a].isDelete=="false"){return true}}}return false}function getSportImage(sportCodeId){if(SL){}else{SL=eval("(["+fullSportsList+"])")}for(var i=0;i<SL.length;i++){if(SL[i].sportCodeId==sportCodeId){return SL[i].homeImage}}return false}var SL;function processMyUSI(sportName){if(myUSI==null){var box=document.getElementById("USIdetails")}if(sportName=="Field Hockey"){sportName="Hockey"}if(box&&box.innerHTML.length>5||myUSI!=null){if(myUSI==null){var USI=eval("("+findStart(box.innerHTML)+")")}else{var USI=myUSI}var result="";var foundSelected=0;var usedUSI=new Array();for(var i=0;i<USI.userSportInterests.length;i++){if(!checkForUsedUSI(USI.userSportInterests[i].sportCodeId,usedUSI)&&USI.userSportInterests[i].isDelete=="false"&&USI.userSportInterests[i].interestId!=-1){result+='<a href="/drills/'+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+'/index.jsp" ';if(sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)==sportName){result+=' class="tpSelected" ';foundSelected=1}result+=" >"+sportNameFromSportCodeId(USI.userSportInterests[i].sportCodeId)+"</a>";usedUSI[usedUSI.length]=USI.userSportInterests[i].sportCodeId}}var box2=document.getElementById("USI");if(box2){box2.innerHTML=result}}}function populateMoreSports(c,f){if(c=="PopUp"){var e=document.getElementById("moreSportOptionsPopUp")}if(c=="home"){var e=document.getElementById("loggedInHomeNotSports")}if(e){if(f=="icon"){if(c=="PopUp"){var b='<div style="width:580px;">'}if(c=="home"){var b="<div >"}var g=0;var a=new Array();for(var d=0;d<SL.length;d++){if(!checkForSportInterest(SL[d].sportCodeId)){b+='<div class="mySportHolder" ';if(c=="PopUp"){b+='onclick="addSportInterest('+d+');"'}b+=">";b+='<table width="74"  border="0" cellspacing="0" cellpadding="0"><tr><td>';b+='<img src="/drills'+SL[d].homeImage+'" alt="'+SL[d].sportName+'" width="71" height="50" border="0" align="absmiddle" /></td>';b+='</tr><tr><td align="center" style="font-size:10px;color:#000099;">'+SL[d].sportName+"</td></tr></table>";b+="</div>"}}b+="</div>"}if(f=="list"){}e.innerHTML=b}}var IFrameObj;var addedMySportIndex;function addSportInterest(b){var a="";addedMySportIndex=b;var c=document.getElementById("mySportOptionsBox");if(c){a+='<p style="font-size:16px;font-weight:bold;"><img src="/drills'+SL[b].homeImage+'" align="absmiddle"/> Adding '+SL[b].sportName+" to your My Sports </p>";a+='<div id="mySportNetQuestion" style="padding:10px;">&nbsp;</div>';c.innerHTML=a}updateSingleUserMySports(b)}function setUpIframe(){var e;var a="server.html";var d="notDone";if(IFrameObj){d="found iframe"}if(!IFrameObj){try{var b=document.createElement("iframe");b.setAttribute("id","cpFrame");b.setAttribute("name","cpFrame");b.style.border="0px";b.style.width="10px";b.style.height="10px";IFrameObj=document.body.appendChild(b);if(document.frames){IFrameObj=document.frames.cpFrame}}catch(c){iframeHTML='<iframe id="cpFrame" name="cpFrame" style="';iframeHTML+="border:0px;";iframeHTML+="width:0px;";iframeHTML+="height:0px;";iframeHTML+='"></iframe>';document.body.innerHTML+=iframeHTML;IFrameObj=new Object();IFrameObj.document=new Object();IFrameObj.document.location=new Object();IFrameObj.document.location.iframe=document.getElementById("cpFrame");IFrameObj.document.location.replace=function(f){this.iframe.src=f};d="catch"}}if(navigator.userAgent.indexOf("Gecko")!=-1&&!IFrameObj.contentDocument){return;d="gecko"}return d}function UserSportInterest(c,g,f,e,b,h,a,d){this.interestId=c;this.sportCodeId=g;this.sportName=f;this.isMember=e;this.isOnSale=b;this.updateEmailRequested=h;this.isNew=a;this.isDelete=d}function updateSingleUserMySports(c){var a='{"userSportInterests":[{"interestId":"0","sportCodeId":"'+SL[c].sportCodeId+'","updateEmailRequested":"true","isNew":"true","isDelete":"false"}]}';var d="sportInterestsString="+a;var b=new UserSportInterest(0,SL[c].sportCodeId,SL[c].sportName,"false","false","false","true","false");myUSI.userSportInterests[myUSI.userSportInterests.length]=b;spAjaxRequest(updateSingleUserMySportsHandler,"/ltad/UpdateSportInterest.do",d,document.getElementById("mySportNetQuestion"))}function updateSingleUserMySportsHandler(a){if(a.getResponseHeader("sportsInterestError")){alert("Error: "+a.getResponseHeader("sportsInterestError"));return}document.getElementById("mySportNetQuestion").innerHTML="<p>Done</p>";setTimeout("askAboutEmails()",1000)}function deleteSportInterest(b){var a='{"userSportInterests":[{"interestId":"'+myUSI.userSportInterests[b].interestId+'","sportCodeId":"'+myUSI.userSportInterests[b].sportCodeId+'","updateEmailRequested":"true","isNew":"false","isDelete":"true"}]}';var c="sportInterestsString="+a;myUSI.userSportInterests[b].isDelete="true";myUSI.userSportInterests[b].interestId="-1";spAjaxRequest(deleteSportInterestHandler,"/ltad/UpdateSportInterest.do",c,document.getElementById("mySportNetQuestion"))}function deleteSportInterestHandler(a){if(a.getResponseHeader("sportsInterestError")){alert("Error: "+a.getResponseHeader("sportsInterestError"));return}document.getElementById("mySportNetQuestion").innerHTML="<p>Done</p>";setTimeout("startMySports()",1000)}function drawAweberForm(e,b,d,c){var a="";a+='<center><form method="post" target="cpFrame" action="http://www.aweber.com/scripts/addlead.pl" style="margin:0;"';a+=">";a+='<input type="hidden" name="meta_web_form_id" value="'+e+'">';a+='<input type="hidden" name="meta_split_id" value="">';a+='<input type="hidden" name="unit" value="'+b+'">';if(c=="email"){a+='<input type="hidden" name="redirect" value="http://'+sphost+'/drills/layout/sportsInterest/mySportThankyou.jsp" id="'+d+'">';a+='<input type="hidden" name="meta_redirect_onlist" value="http://'+sphost+'/drills/layout/sportsInterest/mySportThankyou.jsp">'}else{if(c=="testDrive"){a+='<input type="hidden" name="redirect" value="http://'+sphost+'/drills/layout/sportsInterest/lessonPlansThankyou.jsp" id="'+d+'">';a+='<input type="hidden" name="meta_redirect_onlist" value="http://'+sphost+'/drills/layout/sportsInterest/lessonPlansThankyou.jsp">'}}a+='<input type="hidden" name="meta_adtracking" value="interest">';a+='<input type="hidden" name="meta_message" value="1">';a+='<input type="hidden" name="meta_required" value="from">';a+='<input type="hidden" name="meta_forward_vars" value="1">';a+='<input type="hidden" name="from" value="'+lastEmail+'">';a+='<input type="hidden" name="name" value="'+lastFullName+'">';a+='<input type="submit" name="submit" value="Yes, please" style="padding:2px;font-size:14px;">';a+='&nbsp; &nbsp; <input type="button" name="notThanks" value="No, thank you" style="padding:2px;font-size:14px;" ';if(c=="email"){a+='onclick="nextQuestion()"/>'}else{if(c=="testDrive"){a+='onclick="finishMySport()"/>'}}a+="</form></center>";return a}function askAboutEmails(){var a="";var b=document.getElementById("mySportNetQuestion");if(b){a+='<p style="font-size:20px;line-height:30px;color:#6699ff;font-weight:bold;"><img src="/drills/img/ads/infoEmail.jpg" align="right"/>Get More for Free </p>';a+='<p style="font-size:16px;font-weight:bold;">Would you like to receive FREE '+SL[addedMySportIndex].sportName+" Coaching and Training Tips by email?</p>";a+=drawAweberForm(SL[addedMySportIndex].aweberFormId,SL[addedMySportIndex].aweberUnit,SL[addedMySportIndex].aweberRedirectID,"email");b.innerHTML=a}}function nextQuestion(){var a="";if(SL[addedMySportIndex].offTestDrive=="true"){a+='<p style="font-size:20px;line-height:30px;color:#ff9966;font-weight:bold;"><img src="/drills/img/ads/'+SL[addedMySportIndex].sportName.toLowerCase()+'LessonPlans.gif" width="192" height="185" align="right">PLUS, Get Free Weekly Session Plans </p>';a+='<p style="font-size:16px;font-weight:bold;">Would you like to Test Drive '+SL[addedMySportIndex].sportName+" Weekly Session Plans?</p>";a+=drawAweberForm(SL[addedMySportIndex].TDaweberFormId,SL[addedMySportIndex].TDaweberUnit,SL[addedMySportIndex].TDaweberRedirectID,"testDrive");var b=document.getElementById("mySportNetQuestion");if(b){b.innerHTML=a}}else{finishMySport()}}function lessonPlanThankyou(){var a="";var b=document.getElementById("mySportNetQuestion");if(b){a+='<p style="font-size:16px;font-weight:bold;"><img src="/drills/img/ads/alertEmail.jpg" align="absmiddle"/> You will be sent an email to confirm your Test Drive </p>';a+='<div id="mySportNetQuestion" style="padding:10px;">&nbsp;</div>';b.innerHTML=a}setTimeout("finishMySport()",5000)}function editSportInterest(b){var a="";var c=document.getElementById("mySportOptionsBox");if(c){a+='<p style="font-size:16px;font-weight:bold;"><img src="/drills'+SL[b].homeImage+'" align="absmiddle"/> Edit My Sports: '+myUSI.userSportInterests[b].sportName+" </p>";a+='<div id="mySportNetQuestion" style="padding:10px;">&nbsp;';a+=spButton("Not Now","startMySports()","123","left");a+=spButton("Delete "+myUSI.userSportInterests[b].sportName+" from My Sports","deleteSportInterest("+b+");","123","left");a+="</div>";c.innerHTML=a}}function finishMySport(){var a="";var b=document.getElementById("mySportOptionsBox");if(b){a+='<p style="font-size:16px;font-weight:bold;"> Would you like to add more My Sports? </p>';a+='<div id="mySportNetQuestion" style="padding:10px;">&nbsp;';a+=spButton("Finished","closeMySports();","123","left");a+=spButton("Add more Sports","startMySports()","123","left");a+="</div>";b.innerHTML=a}}function homePageUSI(){};
