var arrCourses=[];var popupWidth=472;function Course(G,D,F,C,B,A,E){this.Title=G;this.School=D;this.Colour=F;this.StartDate=C;this.EndDate=B;this.RRP=A;this.Price=E}function highlightCourses(){for(var B=0;B<arrCourses.length;B++){var A=document.getElementById("dt"+arrCourses[B].StartDate);if(A){if("dt"+arrCourses[B].StartDate==A.id){A.getElementsByTagName("a")[0].style.fontWeight="bold";A.getElementsByTagName("a")[0].style.color="#FF3399"}}}}function getWindowSize(){var B=0,A=0;var C=typeof window.innerWidth;if(C=="number"){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;A=document.body.clientHeight}}}var D=[];D[0]=B;D[1]=A;return D}function showInfo(A,K,G,I){var E=[];for(var D=0;D<arrCourses.length;D++){if(arrCourses[D].StartDate==K){E[E.length]=arrCourses[D]}}if(E.length>0){var F='<div id="courseInfoArrow"></div>';F+='<span class="top">';F+='<div class="courseLine">';F+='<div class="courseCatHead">&nbsp;</div>';F+='<div class="courseTitleHead">Course Title</div>';F+='<div class="courseRRPHead">RRP</div>';F+='<div class="courseWSSPriceHead">WSS Price</div>';F+="</div>";for(D=0;D<E.length;D++){F+='<div class="courseLine">';F+='<div class="courseCat" style="background-color: #'+E[D].Colour+';">&nbsp;</div>';F+='<div class="courseTitle">'+E[D].Title+", "+E[D].School+"</div>";F+='<div class="courseRRP"><span class="strikeout">'+G+(E[D].RRP*I).toFixed(2)+"</span></div>";F+='<div class="courseWSSPrice">'+G+(E[D].Price*I).toFixed(2)+"</div>";F+="</div>"}F+="</span>";F+='<div class="bottom">&nbsp;</div>';document.getElementById("courseInfo").innerHTML=F;var C=0;var B=0;if(!A){var A=window.event}if(A.pageX||A.pageY){C=A.pageX;B=A.pageY}if(A.clientX||A.clientY){C=A.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;B=A.clientY+document.body.scrollTop+document.documentElement.scrollTop}var H=document.getElementById("courseInfoArrow");H.style.left="0px";H.style.top="40px";H.style.backgroundImage="url(images/popupArrowLeft.gif)";var J=getWindowSize();if(C>((J[0]/2))){C=C-popupWidth-40;H.style.left=popupWidth-6+"px";H.style.top="40px";H.style.backgroundImage="url(images/popupArrowRight.gif)"}document.getElementById("courseInfo").style.top=B-40+"px";document.getElementById("courseInfo").style.left=C+20+"px";document.getElementById("courseInfo").style.display="block"}}function hideInfo(){document.getElementById("courseInfo").innerHTML="";document.getElementById("courseInfo").style.display="none"};