var basic_debug=1;var payment_divs;var basic_agent=0;var basic_LoadFinished=0;function showDiv(D,A){if(basic_LoadFinished==0){return false}var B="show";var C=document.getElementById(D);if(C.className.indexOf("displayBlock")!=-1){B="hide"}if(A=="show"||A=="hide"){B=A}var E=C.parentNode.getElementsByTagName("div");for(x=0;x<E.length;x++){if(E[x].className.indexOf("showDiv")!=-1){E[x].className=E[x].className.replace(/displayBlock/i,"displayNone")}}if(B=="show"){C.className=C.className.replace(/displayNone/i,"displayBlock")}}window.onunload=function(){document.body.innerHTML=""};function fillInternational(D){box=document.getElementById("InternationalExchangeDropDown");box.options.length=0;var B=D.options;var C=D.selected||false;for(var A=0;A<B.length;A++){box.options[A]=new Option(B[A].text,B[A].value,null,(C&&C==B[A].value?true:false))}if(D.selectedIndex){box.selectedIndex=D.selectedIndex}}function update_InternationalExchange(){var A="/ajax/updateInternationalExchange.php";passParams="amount="+document.getElementById(document.getElementById("AmountToExchangeID").value).innerHTML+"&rand="+Math.random();var B=new Ajax.Request(A,{method:"get",parameters:passParams,onSuccess:function(D,C){fillInternational(C)}})}function payment_setup(A){parentElm=document.getElementById(A);payment_divs=parentElm.getElementsByTagName("div");if(document.getElementById("eBillmeOption")){document.getElementById("eBillmeOption").onclick=function(){if(document.getElementById("EmailN").checked==true){alert("You must supply a valid email address to receive your eBill");document.getElementById("creditCardOption").checked=true}else{if(document.getElementById("Email").value.match("bowlingball.com")=="bowlingball.com"){alert("You must supply a valid email address to receive your eBill");document.getElementById("creditCardOption").checked=true}else{payment_showDescription("eBillme");updateCartInfo("CardName=eBillme")}}}}document.getElementById("billMeLaterOption").onclick=function(){updateCartInfo("CardName=BillMeLater");payment_showDescription("BillMeLater");if(basic_agent==1){alert('Agent Script \n\n "May I have your permission to share your personal information with Bill Me Later and allow Bill Me Later to review your credit?"')}};document.getElementById("MoneyPakOption").onclick=function(){updateCartInfo("CardName=MoneyPak");payment_showDescription("MoneyPak")};if(document.getElementById("MazoomaOption")){document.getElementById("MazoomaOption").onclick=function(){updateCartInfo("CardName=Mazooma");payment_showDescription("Mazooma")}}if(document.getElementById("RevolutionMoneyOption")){document.getElementById("RevolutionMoneyOption").onclick=function(){updateCartInfo("CardName=RevolutionMoney");payment_showDescription("RevolutionMoney")}}document.getElementById("creditCardOption").onclick=function(){updateCartInfo("CardName=CreditCard");payment_showDescription("CreditCard")};document.getElementById("giftCertOption").onclick=function(){updateCartInfo("CardName=GiftCertificate");payment_showDescription("GiftCertificate")};document.getElementById("VTOption").onclick=function(){updateCartInfo("CardName=VirtualTournamentPayment");payment_showDescription("VirtualTournaments")};document.getElementById("MoneyOrdersOption").onclick=function(){updateCartInfo("CardName=Money+Order");payment_showDescription("MoneyOrders")};document.getElementById("ChecksOption").onclick=function(){updateCartInfo("CardName=Check");payment_showDescription("Checks")};if(document.getElementById("WireTransferOption")){document.getElementById("WireTransfersOption").onclick=function(){updateCartInfo("CardName=WireTransfer");payment_showDescription("wireTransfers")}}if(basic_agent==0){document.getElementById("AgentScript").className="displayNone"}else{}}function payment_showDescription(A){for(x=0;x<payment_divs.length;x++){payment_divs[x].className="displayNone"}if(A==0){return }document.getElementById(A).className="displayBlock"}function imageFlip_setupListners(B){var A=B.getElementsByTagName("img");for(x=0;x<A.length;x++){basic_setImageFlip(A[x])}}function basic_setImageFlip(A){A.onclick=function(){basic_imageFlip(A)}}function basic_imageFlip(A){var B=String(A.src);var C;var D;if(B.indexOf("-tn")>=0){B=B.replace("-tn","-lp")}else{if(B.indexOf("-thumb")>=0){B=B.replace("-thumb","")}else{if(B.indexOf("-lp")==-1&&B.indexOf("-s")==-1&&B.indexOf("/CaptionedImages/")==-1){D=B.substr(B.length-4);C=B.substr(0,B.indexOf("-"));B=C+"-lp-1"+D}}}document.getElementById("largeImage").src=B}function basic_showHide(C,B){var A;C=document.getElementById(C);if(B!="display"||B!="visibility"){B="display"}if(C){A=String(C.className);switch(B){case"display":if(A.indexOf("displayNone")!=-1){A=A.replace(/displayNone/g,"displayBlock")}else{if(A.indexOf("displayBlock")!=-1){A=A.replace(/displayBlock/g,"displayNone")}else{debugAlert("Element Not properly Set Up, exiting function")}}document.getElementById(C.id).className=A;break;case"visibility":if(A.indexOf("hidden")!=-1){A=A.replace(/hidden/g,"visible")}else{if(A.indexOf("visible")!=-1){A=A.replace(/visible/g,"hidden")}else{debugAlert("Element Not properly Set Up, exiting function")}}document.getElementById(C.id).className=A;break}}else{debugAlert("Element Does not Exist or is not defined.")}}function debugAlert(A){if(basic_debug==1){alert(A)}}function writeFlash(A){document.getElementById(A).innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="780" height="210" id="bowlingball.2008-04-08" align="middle">\n<param name="allowScriptAccess" value="sameDomain" />\n<param name="movie" value="/flash/bowlingball.2008-04-08.swf" />\n<param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="wmode" value="transparent" /> <embed src="/flash/bowlingball.2008-04-08.swf" quality="high" bgcolor="#ffffff" width="780" height="210" name="bowlingball.2008-04-08" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" /> </object>'}var arrDivID=new Array();var arrDivGroup=new Array();var browser=navigator.appName;function old_showDiv(A){if(document.getElementById(A).style.display=="none"){DivGroup=null;for(i=0;i<arrDivID.length;i++){if(A==arrDivID[i]){DivGroup=arrDivGroup[i];document.getElementById(A).style.display="inline"}for(a=0;a<arrDivID.length;a++){if(A!=arrDivID[a]){if(DivGroup==arrDivGroup[a]){document.getElementById(arrDivID[a]).style.display="none"}}}}}else{for(i=0;i<arrDivID.length;i++){document.getElementById(A).style.display="none"}}callStretchMain()}function setarrDivID(A,B){for(i=0;i<A.length;i++){arrDivID[i]=A[i];arrDivGroup[i]=B[i]}}function callStretchMain(){}function stretchMain(){}function SafeAddOnload(){}function SafeOnload(){}function submitGiftCertificate(){var A=document.theForm.GiftCertificate.value;applyGiftCert("GiftCertificateStatus","applyGiftCertificate.php","Applying Gift Certificate "+A,"GiftCertificate="+A,1);document.theForm.GiftCertificate.value=""}var horizontal_offset="9px";var vertical_offset="0";var ie=document.all;var ns6=document.getElementById&&!document.all;function getposOffset(D,C){var B=(C=="left")?D.offsetLeft:D.offsetTop;var A=D.offsetParent;while(A!=null){B=(C=="left")?B+A.offsetLeft:B+A.offsetTop;A=A.offsetParent}return B}function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function clearbrowseredge(D,B){var A=(B=="rightedge")?parseInt(horizontal_offset)*-1:parseInt(vertical_offset)*-1;if(B=="rightedge"){var C=ie&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-30:window.pageXOffset+window.innerWidth-40;dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;if(C-dropmenuobj.x<dropmenuobj.contentmeasure){A=dropmenuobj.contentmeasure+D.offsetWidth+parseInt(horizontal_offset)}}else{var C=ie&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18;dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;if(C-dropmenuobj.y<dropmenuobj.contentmeasure){A=dropmenuobj.contentmeasure-D.offsetHeight}}return A}function showhint(D,C,B,A){if((ie||ns6)&&document.getElementById("hintbox")){dropmenuobj=document.getElementById("hintbox");dropmenuobj.innerHTML=D;dropmenuobj.style.left=dropmenuobj.style.top=-500;if(A!=""){dropmenuobj.widthobj=dropmenuobj.style;dropmenuobj.widthobj.width=A}dropmenuobj.x=getposOffset(C,"left");dropmenuobj.y=getposOffset(C,"top");dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(C,"rightedge")+C.offsetWidth-300+"px";dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(C,"bottomedge")+"px";dropmenuobj.style.visibility="visible";C.onmouseout=hidetip}}function hidetip(A){dropmenuobj.style.visibility="hidden";dropmenuobj.style.left="-500px"}function createhintbox(){var A=document.createElement("div");A.setAttribute("id","hintbox");document.body.appendChild(A)}function init(){createhintbox();if(document.getElementById("flashAd")){writeFlash("flashAd")}if(document.getElementById("TabContainer")){tab_setupListners("TabContainer")}if(document.getElementById("dropDown1")){dropdown_setupListners("topNav")}if(document.getElementById("InternationalExchange")){document.getElementById("ViewInternationalExchange").onclick=function(){update_InternationalExchange();basic_showHide("InternationalExchange","display")}}if(document.getElementById("productThumbNails")){imageFlip_setupListners(document.getElementById("productThumbNails"))}if(document.getElementById("CheckOut")){document.getElementById("EmailN").onclick=function(){document.getElementById("Email").value="none@bowlingball.com";document.getElementById("Email").disabled="on";document.getElementById("WhyEmail").style.display="inline"};document.getElementById("EmailY").onclick=function(){document.getElementById("Email").disabled=false;document.getElementById("Email").value="";document.getElementById("WhyEmail").style.display="none"}}if(document.getElementById("paymentOptions")){}if(navigator.platform&&navigator.userAgent){var A=String(navigator.platform);var B=String(navigator.userAgent);if(document.getElementById("UserDetect")){var C=document.getElementById("UserDetect");if(A.indexOf("Mac")!=-1){if(B.indexOf("Mozilla")!=-1){C.href="/css/basicMac-Moz.css"}}}}basic_LoadFinished=1}if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(K,B,L,D,H,I,F,E,C,J){if(!document.getElementById){return }this.DETECT_KEY=J?J:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(K){this.setAttribute("swf",K)}if(B){this.setAttribute("id",B)}if(L){this.setAttribute("width",L)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(I){this.addParam("bgcolor",I)}var A=F?F:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var G=(E)?E:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(C){this.setAttribute("redirectUrl",C)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(B,A){this.params[B]=A},getParams:function(){return this.params},addVariable:function(B,A){this.variables[B]=A},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var C=new Array();var B;var A=this.getVariables();for(B in A){C[C.length]=B+"="+A[B]}return C},getSWFHTML:function(){var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}B='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';B+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var F=this.getParams();for(var E in F){B+=[E]+'="'+F[E]+'" '}var D=this.getVariablePairs().join("&");if(D.length>0){B+='flashvars="'+D+'"'}B+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}B='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';B+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var E in C){B+='<param name="'+E+'" value="'+C[E]+'" />'}var A=this.getVariablePairs().join("&");if(A.length>0){B+='<param name="flashvars" value="'+A+'" />'}B+="</object>"}return B},write:function(B){if(this.getAttribute("useExpressInstall")){var A=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof B=="string")?document.getElementById(B):B;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var E=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){E=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var B=1;var C=3;while(B){try{C++;B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+C);E=new deconcept.PlayerVersion([C,0,0])}catch(D){B=null}}}else{try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(D){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");E=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(D){if(E.major==6){return E}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(D){}}if(B!=null){E=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}}return E};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(C){var D=document.location.search||document.location.hash;if(C==null){return D}if(D){var B=D.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==C){return B[A].substring((B[A].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var B=document.getElementsByTagName("OBJECT");for(var C=B.length-1;C>=0;C--){B[C].style.display="none";for(var A in B[C]){if(typeof B[C][A]=="function"){B[C][A]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

