function OpenProdDetail(a){window.open("/ProductMini.asp?ITEMNO="+a,"ProductDetail","screenX=75,screenY=75,width=700,height=500,dependent=yes,directories=0,hotkeys=0,location=0,menubar=0,status=0,titlebar=0,toolbar=0,resizable=1,scrollbars=1,alwaysRaised=1")}function openKitDetails(a){window.open(a,"","top=60,left=60,height=550,width=400,scrollbars=yes")}function PRMVideo(a){window.open("/webVideo/videoAsp/Avemco.asp?type="+a,"vid","height=400,width=380,top=100,left=200")}function PRMTestims(){window.open("/prm_testimonials.htm","vid","height=500,width=590,top=100,left=200,resizable,dependent,alwaysraised,scrollbars")}function PlayVideo(a){window.open("/webVideo/videoAsp/PlayVideo.asp?id="+a,"Video","height=410,width=370,top=100,left=200,alwaysraised=yes,dependent=yes,titlebar=no")}function openFlashVid(h,g,b,c,k,d,e,a){var l=document.getElementById(g);var j=document.getElementById(g+"-container");var f=new Dimension(h);if(a){callFlashPlayPauseVideo(a)}swfobject.embedSWF("/Flash/product-demo.swf",g,c,k,"9.0.0","/Flash/expressInstall.swf",{flvurl:b},{wmode:"Transparent"},{});l.style.position="absolute";l.style.padding=0;l.style.margin=0;l.style.display="block";l.style.zindex=100;j.style.display="block";j.style.position="absolute";j.style.left=f.x+e+"px";j.style.top=f.y+d+"px";return false}function closeFlashVid(a){callFlashPlayPauseVideo(a);document.getElementById(a+"-container").style.display="none"}function callFlashPlayPauseVideo(b){var a=document.getElementById(b);a.pauseResume()}function openInfoBubble(a){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}function toggleReadMore(b,c){var a;var d;d=b;a=(document.getElementById(d+"_more").style.display=="block");if(a){document.getElementById(d+"_more").style.display="none";document.getElementById(d+"_descr").style.overflow="hidden";document.getElementById(d+"_descr").style.height=c+"px";document.getElementById(d+"_descr").style.borderBottomStyle="solid";document.getElementById(d+"_morebtn").innerHTML="<span class='moreBtn'>&nbsp;Expand</span>"}else{document.getElementById(d+"_more").style.display="block";document.getElementById(d+"_descr").style.overflow="visible";document.getElementById(d+"_descr").style.height="auto";document.getElementById(d+"_descr").style.borderBottomStyle="none";document.getElementById(d+"_morebtn").innerHTML="<span class='lessBtn'></span>"}}function Dimension(a){this.x=-1;this.y=-1;this.w=0;this.h=0;if(a==document){this.x=a.body.scrollLeft;this.y=a.body.scrollTop;this.w=a.body.clientWidth;this.h=a.body.clientHeight}else{if(a!=null){var d=a;var c=d.offsetLeft;while((d=d.offsetParent)!=null){c+=d.offsetLeft}var d=a;var b=d.offsetTop;while((d=d.offsetParent)!=null){b+=d.offsetTop}this.x=c;this.y=b;this.w=a.offsetWidth;this.h=a.offsetHeight}}}function validateMediaSelection(f,c){var d=-1;var j=c.split(",");var h="";var a;var k=f.mediaType;var l;var e=false;var g="";if(k.value!=null){d=0;g=k.value;if(k.value.indexOf("kingschoolsonline")>-1){e=true}}else{for(i=0;i<k.length;i++){if(k[i].checked){d=i;g=k[i].value;if(k[i].value.indexOf("kingschoolsonline")>-1){e=true}}}}if(e){var b;b="Your online learning is just a few clicks away!\n\n";b+="We will now open a new window to www.kingschoolsONLINE.com to complete the purchase of this online course.\n\n";b+="KING Online Courses are purchased separately from other items.  If you have added ";b+="other items to your cart, you may wish to click 'Cancel' here and complete the purchase of ";b+="those items.  Otherwise, click 'OK' to continue on to the convenience of KING Online Learning!\n\n";b+=" - Click 'OK' to complete the purchase of your online course at www.KingSchoolsONLINE.com, or...\n\n";b+=" - Click 'Cancel' to continue shopping on www.KingSchools.com";var l=confirm(b);if(l){KSOnlineWin=window.open("http://"+g,"KSOnline","left=20,top=20,scrollbars=1,width=900,height=600,toolbar=1,resizable=1");KSOnlineWin.focus;return false}else{return false}}if(d==-1){for(i=0;i<j.length;i++){if(i==j.length-2){a=" and "}else{if(i<j.length-1){a=", "}else{a=" "}}h+=j[i];h+=a}alert("This course is offered in "+h+"formats.  Please indicate which media type you would like to receive.");return false}f.ITN.value=g;return true}function jumpLoc(a){var b;b=a.options[a.selectedIndex].value;if(b!=""){if(b.indexOf(".asp")==-1){window.location.href="#"+b;a.options.selectedIndex=null}else{window.location.href=b}}}function validateEmail(b){var a=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(b.value.length==undefined||b.value.length<1){alert("Please enter your email address first");b.focus();return false}else{if(a.test(b.value)==false){alert("The Email Address field does not contain a valid email address.");b.focus();b.value="";return false}}};

