var itemCallback;var itemUpdateURL;var gAid=0;var historyDirty=true;var busystatus=0;var bidCount=0;var ref="";var onBidBalanceChange;var onBidComplete;var onBidButtonHover;var onBidButtonLeave;if(typeof(YAHOO)!="undefined"){onBidBalanceChange=new YAHOO.util.CustomEvent("onBidBalanceChange");onBidComplete=new YAHOO.util.CustomEvent("onBidComplete");onBidButtonHover=new YAHOO.util.CustomEvent("onBidButtonHover");onBidButtonLeave=new YAHOO.util.CustomEvent("onBidButtonLeave")}function ItemImageLink(a){return"http://images.bidcactus.com/items/"+a}function ImageLink(a){if(window.location.protocol=="http:"){return"http://images.bidcactus.com/"+a}else{return"/images/"+a}}function formatmoney(a){whole=Math.floor(a/100);cents=Math.round((a-whole*100));output="$"+whole;if(cents>=0){if(cents==0){output+=".00"}else{if(cents<10){output+=".0"+cents}else{output+="."+cents}}}return output}function intToTime(a){hrs=Math.floor(a/3600);a-=hrs*3600;minutes=Math.floor(a/60);a-=minutes*60;if(hrs<10){hrs="0"+hrs}if(minutes<10){minutes="0"+minutes}if(a<10){a="0"+a}return(hrs+":"+minutes+":"+a)}function SetAutoTick(a){onBidBalanceChange.subscribe(SetBidBalance);waitBox=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:false});waitBox.setHeader("Reconnecting, please wait...");waitBox.setBody('<img src="http://l.yimg.com/a/i/us/per/gr/gp/rel_interstitial_loading.gif" />');waitBox.render(document.body);pid=document.getElementById("loginpid").value;if(pid>0){getEngine().setComet(true)}if(a){getEngine().setUpcomingEnabled(true);getEngine().onUpcoming.subscribe(ProcessUpcoming)}getEngine().onReconnect.subscribe(onReconnect);getEngine().start()}function onReconnect(b,a){if(a[0]==true){waitBox.show()}else{waitBox.hide()}}function SetBidBalance(b,a){newbidbalance=a[0];inp=document.getElementById("bidbalance");if(inp){inp.value=newbidbalance}}function UpcomingItemClick(a){theElement=document.getElementById("UPCOMINGAID"+a);if(!theElement){return}aid=theElement.value;i=0;do{button=document.getElementById("upcomingVoteButn"+i);if(button){if(i==a){button.className="upcomingVoted"}else{button.className="upcomingNotVoted"}}i++}while(button);getEngine().setVote(aid)}function checkrName(a){if(document.getElementById(a).value==""){document.getElementById(a+"Val").innerHTML="<span style='color:red'>Required: Cannot be Empty</span>"}else{document.getElementById(a+"Val").innerHTML="<span style='color:#336699'>Required: Okay</span>"}}function checkrNameBilling(a){if(document.getElementById(a).value==""){document.getElementById(a+"Val").innerHTML="<img src='images/non.png' width='10' height='10'>"}else{document.getElementById(a+"Val").innerHTML="<img src='images/bluecheck.png' width='10' height='10'>"}}function checkLogin(){if(document.loginForm.txtloginusername.value==""&&document.loginForm.txtloginpassword.value==""){document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popLoginError").style.display="block";document.getElementById("transGray").style.display="block";document.getElementById("popWinJS").innerHTML="";document.getElementById("txtloginusername2").focus();return false}else{return true}}function redeemLogin(){document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popLoginError").innerHTML="In order to redeem a gift certificate, you must first have an account with Bidcactus.  Please login or if you do not have an account please <a href='register.php'>click here to register</a>.";document.getElementById("popLoginError").style.display="block";document.getElementById("transGray").style.display="block";document.getElementById("popWinJS").innerHTML="";document.location="#wintop"}function isValidEmail(a){return(a.indexOf("@")>0)}function checkwinLogin(){if(document.winloginForm.txtloginusername.value!=""&&document.winloginForm.txtloginpassword.value!=""){return true}else{document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popLoginError").style.display="block";document.getElementById("transGray").style.display="block";document.getElementById("popEmailJS").style.display="none";document.getElementById("popWinJS").innerHTML="";return false}}function checkwinEmail(){if(isValidEmail(document.winemailForm.txtforgotemail.value)){return true}else{document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popEmailJS").style.display="block";document.getElementById("popLoginError").style.display="none";document.getElementById("popWinJS").innerHTML="";document.getElementById("transGray").style.display="block";return false}}function badlogin(){document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popLoginError").style.display="block";document.getElementById("transGray").style.display="block";document.getElementById("popWinJS").innerHTML=""}function bademail(){document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popEmailJS").style.display="block";document.getElementById("popLoginError").style.display="none";document.getElementById("popWinJS").innerHTML="";document.getElementById("transGray").style.display="block"}function goodemail(){document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="none";document.getElementById("popWinJS").innerHTML="Thank you, the request has been received and an email has been sent with your login credentials.";document.getElementById("transGray").style.display="block"}function initExpanders(){var e=YAHOO.util.Dom.getElementsByClassName("expandContent");for(var f=0;f<e.length;f++){e[f].style.display="none"}var b=YAHOO.util.Dom.getElementsByClassName("expander");for(var c=0;c<b.length;c++){newLink=b[c].href.split("#");newLink=newLink[1];var a=b[c].getAttribute("rel");if(a!=null){a="','"+a}else{a=""}b[c].href="javascript: showHide('"+newLink+a+"')"}}function showHide(e,a){e=(e+"Content");var b=YAHOO.util.Dom.getElementsByClassName("expandContent");for(var c=0;c<b.length;c++){if(b[c].id==e){if(b[c].style.display=="block"){b[c].style.display="none"}else{b[c].style.display="block"}}else{if(b[c].id==a){b[c].style.display="block"}else{b[c].style.display="none"}}}}function ProcessUpcoming(b,a){data=a[0];for(i=0;i<7;i++){if(typeof(data[i])!="undefined"){var c=data[i];aidElement=document.getElementById("UPCOMINGAID"+i);if(aidElement.value!=c.a){aidElement.value=c.a;urlElement=document.getElementById("UPCOMINGURL"+i);if(urlElement.src!=ItemImageLink(c.t)){urlElement.src=ItemImageLink(c.t)}if(c.d){urlElement.alt=c.d}else{urlElement.alt=""}titleElement=document.getElementById("UPCOMINGTITLE"+i);titleElement.innerHTML=c.n;priceElement=document.getElementById("UPCOMINGPRICE"+i);priceElement.innerHTML=formatmoney(c.r);descElement=document.getElementById("UPCOMINGDESC"+i);if(c.s){descElement.innerHTML=c.s}else{descElement.innerHTML=""}}classElement=document.getElementById("UPCOMINGCL"+i);if(classElement){if(c.l){auctionClass=c.l}else{auctionClass=""}if(classElement.className!="cl_"+auctionClass){classElement.className="cl_"+auctionClass;iconElement=document.getElementById("UPCOMINGAC"+i);if(iconElement){switch(auctionClass){case"BEGINNER":iconElement.title="Beginners Only Auction - Open to users<br/>who have won fewer than five auctions!";break;case"EXPERT":iconElement.title="Expert Auction - Win limits do not apply!";break;default:iconElement.title="";break}}}}meterElement=document.getElementById("UPCOMINGMETER"+i);if(c.c<33){if(!YAHOO.util.Dom.hasClass(meterElement,"meterRed")){YAHOO.util.Dom.removeClass(meterElement,"meterGreen");YAHOO.util.Dom.removeClass(meterElement,"meterYellow");YAHOO.util.Dom.addClass(meterElement,"meterRed")}}else{if(c.c<66){if(!YAHOO.util.Dom.hasClass(meterElement,"meterYellow")){YAHOO.util.Dom.removeClass(meterElement,"meterGreen");YAHOO.util.Dom.removeClass(meterElement,"meterRed");YAHOO.util.Dom.addClass(meterElement,"meterYellow")}}else{if(!YAHOO.util.Dom.hasClass(meterElement,"meterGreen")){YAHOO.util.Dom.removeClass(meterElement,"meterYellow");YAHOO.util.Dom.removeClass(meterElement,"meterRed");YAHOO.util.Dom.addClass(meterElement,"meterGreen")}}}buttonElement=document.getElementById("upcomingVoteButn"+i);if(c.a==getEngine().getVote()){if(!YAHOO.util.Dom.hasClass(buttonElement,"upcomingVoted")){YAHOO.util.Dom.removeClass(buttonElement,"upcomingNotVoted");YAHOO.util.Dom.addClass(buttonElement,"upcomingVoted")}}else{if(!YAHOO.util.Dom.hasClass(buttonElement,"upcomingNotVoted")){YAHOO.util.Dom.removeClass(buttonElement,"upcomingVoted");YAHOO.util.Dom.addClass(buttonElement,"upcomingNotVoted")}}rowElement=document.getElementById("UPCOMINGROW"+i);if(YAHOO.util.Dom.hasClass(rowElement,"hideRow")){YAHOO.util.Dom.removeClass(rowElement,"hideRow")}}else{rowElement=document.getElementById("UPCOMINGROW"+i);if(!YAHOO.util.Dom.hasClass(rowElement,"hideRow")){YAHOO.util.Dom.addClass("UPCOMINGROW"+i,"hideRow")}}}}function ProcessHistory(d,c){var b=c[0]["p"];var a=c[0]["h"];var f=a.length;var e=document.getElementById("bidderhistory").rows.length;var g=f-(e-2);if(g>0){while(g-->0){var j=document.getElementById("bidderhistory").insertRow(2);j.insertCell(0);j.insertCell(1);j.insertCell(2)}}var h=document.getElementById("bidderhistory");for(lcv=0;lcv<f;lcv++){h.rows[lcv+2].cells[0].innerHTML="<span style='font-weight: normal;'>"+formatmoney(b)+"</span>";h.rows[lcv+2].cells[1].innerHTML="<span style='font-weight: normal;'>"+a[lcv]["b"]+"</span>";h.rows[lcv+2].cells[2].innerHTML="<span style='font-weight: normal;'>"+a[lcv]["t"]+"</span>";b--}}function FinishedBid(a){response=YAHOO.lang.JSON.parse(a.responseText);if(response.c==1){if(response.b){bids=response.b;onBidBalanceChange.fire(bids)}if(response.a){onBidComplete.fire(response)}}else{if(response.c==99){window.location="index.php"}else{if(response.c>=2){newTop=120;if(typeof(window.pageYOffset)=="number"){newTop+=window.pageYOffset}else{if(document.body&&document.body.scrollTop){newTop+=document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){newTop+=document.documentElement.scrollTop}}}if(window.messageY){newTop+=window.messageY}document.getElementById("popWrapper").style.top=newTop+"px";document.getElementById("popWrapper").style.display="block";document.getElementById("popWrapper").verticalAlign="middle";document.getElementById("popWinJS").style.color="black";if(response.c==6){document.getElementById("popWinJS").innerHTML="<br/>Beginners Only Auction<br/><br/>"}else{document.getElementById("popWinJS").innerHTML="<br/>A Message From Bidcactus:<br/><br/>"}document.getElementById("popWinJScontent").style.color="black";document.getElementById("popWinJScontent").style.padding="0 12px 12px 12px";document.getElementById("popWinJScontent").innerHTML="<br/>"+response.m+"<br/>";document.getElementById("transGray").style.display="block";response=null}}}try{a.onreadystatechange=null}catch(b){a.onreadystatechange=function(){}}}function BidFailed(){}function PerformBid(a){bidCount=bidCount+1;username=document.getElementById("loginuser").value;pid=document.getElementById("loginpid").value;if(username!=""&&pid!=0){url="bid.php?who="+username+"&pid="+pid+"&auctid="+a;callback={success:FinishedBid,failure:BidFailed,timeout:10000,cache:false};YAHOO.util.Connect.asyncRequest("GET",url,callback)}}function getResetBidCount(){bc=bidCount;bidCount=0;return bc}function tset(a){url="tset.php?tset="+a;callback={success:null,failure:null,timeout:10000,cache:false};YAHOO.util.Connect.asyncRequest("GET",url,callback);return true};var redeemDialog;var doReload;YAHOO.util.Event.onDOMReady(function(){var redeemSubmit=function(){this.submit()};var redeemCancel=function(){this.cancel()};var handleOK=function(){this.hide();if(doReload){window.location.reload(true)}};var redeemSuccess=function(resp){var result=eval("("+resp.responseText+")");doReload=false;var msg="";if(result.status=="ok"){document.getElementById("giftcode").value="";msg="Your coupon code has been redeemed for "+result.bids+" bids.";doReload=true}else{if(result.status=="used"){document.getElementById("giftcode").value="";msg="The code that you entered has already been redeemed."}else{if(result.status=="invalid"){msg="The code that you entered is not valid.  Please verify that you typed it correctly and try again."}else{if(result.status=="session"){msg="Sorry, your session has expired.  Please log in and try again.";doReload=true}else{msg="Sorry, that code can not be redeemed. "+result.reason}}}}var msg1=new YAHOO.widget.SimpleDialog("msg1",{width:"300px",fixedcenter:true,visible:false,draggable:true,close:true,constraintoviewport:true,text:msg,modal:true,buttons:[{text:"OK",handler:handleOK,isDefault:true}]});msg1.setHeader("Redeem Coupon Code");msg1.render("dlgContainer");msg1.show()};var redeemFailure=function(resp){document.getElementById("giftcode").value="";alert("Sorry, an error occurred while trying to process your gift code.  Please try again later.")};var redeemValidate=function(){return true};redeemDialog=new YAHOO.widget.Dialog("dlgRedeem",{width:"350px",fixedcenter:true,visible:false,constraintoviewport:true,modal:true,buttons:[{text:"Submit",handler:redeemSubmit,isDefault:true},{text:"Cancel",handler:redeemCancel}]});redeemDialog.callback={success:redeemSuccess,failure:redeemFailure};redeemDialog.validate=redeemValidate;redeemDialog.render();var activateDialog=function(){var elem=document.getElementById("dlgContainer");elem.style.display="block";redeemDialog.show()};YAHOO.util.Event.addListener("redeemButton","click",activateDialog,redeemDialog,true)});var engine;function getEngine(){if(!engine){engine=new cactusengine()}return engine}function cactusengine(){engine=this;this.useComet=false;this.tickSerial="";this.auctionsDirty=false;this.upcomingEnabled=false;this.upcomingTicks=0;this.voteAID=0;this.lastVote=0;this.errorCount=0;this.historyAID=0;this.historyPrice=0;this.timer=null;this.kill=false;this.callback={success:engine.tickComplete,failure:engine.tickError,timeout:2500,cache:false,scope:this};this.onItemTick=new YAHOO.util.CustomEvent("onItemTick",this);this.onAuctionUpdate=new YAHOO.util.CustomEvent("onAuctionUpdate",this);this.onUpcoming=new YAHOO.util.CustomEvent("onUpcoming",this);this.onReconnect=new YAHOO.util.CustomEvent("onReconnect",this);this.onHistory=new YAHOO.util.CustomEvent("onHistory",this)}cactusengine.prototype.setVote=function(a){if(this.lastVote!=a){this.voteAID=a}};cactusengine.prototype.getVote=function(){return this.lastVote};cactusengine.prototype.setComet=function(a){this.useComet=a};cactusengine.prototype.setUpcomingEnabled=function(a){this.upcomingEnabled=a;this.upcomingTicks=22};cactusengine.prototype.setAuctionDirty=function(){this.auctionsDirty=true};cactusengine.prototype.setHistoryAID=function(a){this.historyAID=a};cactusengine.prototype.start=function(){if(this.useComet){this.onTick()}else{this.timer=setInterval(engine.onTick,1000)}};cactusengine.prototype.stop=function(){if(this.useComet){this.kill=true}else{clearInterval(this.timer)}};cactusengine.prototype.onTick=function(){itemUpdateURL="/CactusWeb/ItemUpdates?";if(engine.tickSerial!=""){itemUpdateURL+="x="+engine.tickSerial+"&"}if(engine.auctionsDirty){itemUpdateURL+="d=1&";engine.auctionsDirty=false}if(engine.upcomingEnabled){if(engine.upcomingTicks==0){itemUpdateURL+="u=1&";engine.upcomingTicks=22}else{engine.upcomingTicks--}}if(engine.historyAID!=0){itemUpdateURL+="h="+engine.historyAID+"&hp="+engine.historyPrice+"&"}if(engine.voteAID!=0){if(engine.lastVote!=0){itemUpdateURL+="xv="+engine.lastVote+"&"}itemUpdateURL+="v="+engine.voteAID+"&";engine.lastVote=engine.voteAID;engine.voteAID=0}YAHOO.util.Connect.asyncRequest("GET",itemUpdateURL.substr(0,itemUpdateURL.length-1),engine.callback)};cactusengine.prototype.tickError=function(){this.errorCount++;if(this.errorCount>30){window.location.reload()}else{if(this.errorCount>2){}}if(this.useComet){setTimeout(engine.onTick,1000)}};cactusengine.prototype.tickComplete=function(a){try{itemdata=YAHOO.lang.JSON.parse(a.responseText);if(this.errorCount>0){this.errorCount=0}if(itemdata.i){this.onAuctionUpdate.fire(itemdata.i)}if(itemdata.a){this.onItemTick.fire(itemdata.a)}if(itemdata.u){this.onUpcoming.fire(itemdata.u)}if(itemdata.h){if(itemdata.h["p"]&&itemdata.h["h"]){this.historyPrice=itemdata.h["p"];this.onHistory.fire(itemdata.h)}}}catch(b){}if(this.useComet==true&&this.kill==false){if(itemdata.s){this.tickSerial=itemdata.s;setTimeout(this.onTick,Math.round(Math.random()*150))}else{setTimeout(this.onTick,1000)}}};var boxes=new Array();function FindBox(a){for(i=0;i<boxes.length;i++){if(boxes[i].aid==a){return i}}return -1}function box(e,f,h,c,g,a,d,b){this.boxno=e;this.aid=f;this.time=-2;this.timeIsRed=false;this.canBid=false;this.highBidder="";this.price=-2;this.retailprice=d*100;this.dirtyTime=-1;this.increment=a;this.auctionClass=b;this.inzone=false;this.gone=false;this.lastbid=0;this.anim=new YAHOO.util.ColorAnim(document.getElementById("HIGHBID_Dat"+this.boxno),{backgroundColor:{from:"#ef0000",to:"#ffffff"}},0.5);this.onComplete=new YAHOO.util.CustomEvent("onComplete",this);if(document.getElementById("auctionClass"+this.boxno)){this.tt=new YAHOO.widget.Tooltip("tt",{context:"auctionClass"+this.boxno,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},width:"270px"})}if(document.getElementById("itemFlag"+this.boxno)){this.ptt=new YAHOO.widget.Tooltip("tt",{context:"itemFlag"+this.boxno,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},width:"270px"})}if(onBidComplete){onBidComplete.subscribe(this.processBidResponse,this)}}box.prototype.attach=function(a){a.onItemTick.subscribe(this.itemTick,this);a.onAuctionUpdate.subscribe(this.auctionUpdate,this);this.setTooltip()};box.prototype.flashPrice=function(){this.anim.animate()};box.prototype.setTime=function(a){bound=document.getElementById("BB_Dat"+this.boxno);div=document.getElementById("Tim_Dat"+this.boxno);if(this.time!=a){this.time=a;if(this.time<0){if(this.gone==false){this.gone=true;this.inzone=false;YAHOO.util.Dom.removeClass(bound,"bb_zone");YAHOO.util.Dom.addClass(bound,"bb_gone")}}else{if(this.gone==true){this.gone=false;YAHOO.util.Dom.removeClass(bound,"bb_gone")}}if(this.time>=0&&this.time<120){if(this.inzone==false){this.inzone=true;YAHOO.util.Dom.addClass(bound,"bb_zone")}}else{if(this.inzone==true){this.inzone=false;YAHOO.util.Dom.removeClass(bound,"bb_zone")}}if(this.time<10){if(this.timeIsRed==false){YAHOO.util.Dom.addClass(div,"itemTimerRed");this.timeIsRed=true}}else{if(this.timeIsRed==true){YAHOO.util.Dom.removeClass(div,"itemTimerRed");this.timeIsRed=false}}if(this.time>2){thedisplay=intToTime(this.time)}else{if(this.time==2){thedisplay="going..."}else{if(this.time==1){thedisplay="GOING..."}else{if(this.time==0){thedisplay="GOING..."}else{if(this.time<0){thedisplay="Gone";this.onComplete.fire()}}}}}div.innerHTML=thedisplay}};box.prototype.setHighBidder=function(a){if(this.highBidder!=a){div=document.getElementById("BIDDER_Dat"+this.boxno);this.highBidder=a;div.innerHTML=this.highBidder;usernamefield=document.getElementById("loginuser");if(usernamefield){username=usernamefield.value;if(this.highBidder==username){YAHOO.util.Dom.addClass("BB_Dat"+this.boxno,"topBidder")}else{YAHOO.util.Dom.removeClass("BB_Dat"+this.boxno,"topBidder")}}}};box.prototype.setPrice=function(a){if(this.price!=a){div=document.getElementById("HIGHBID_Dat"+this.boxno);if(div){div.innerHTML=formatmoney(a)}if(this.price!=-1){this.flashPrice()}this.price=a;div=document.getElementById("savingprice");if(div){div.innerHTML=formatmoney(a)}div=document.getElementById("savingtotcont");if(div){div.innerHTML=formatmoney(this.retailprice-a)}}};box.prototype.setBidButton=function(){usernamefield=document.getElementById("loginuser");if(usernamefield){username=usernamefield.value;if(this.time>0&&username!=this.highBidder){if(this.canBid==false){this.canBid=true;YAHOO.util.Dom.addClass("BB_Dat"+this.boxno,"canbid")}}else{if(this.canBid==true){this.canBid=false;YAHOO.util.Dom.removeClass("BB_Dat"+this.boxno,"canbid")}}}};box.prototype.itemTick=function(b,a,c){data=a[0];for(i=0;i<data.length;i++){auctiondata=data[i];if(c.boxno==auctiondata.x){c.itemUpdate(auctiondata)}}};box.prototype.itemUpdate=function(a){if(a.a==this.aid){this.dirtyTime=-1;this.setTime(a.t);this.setHighBidder(a.w);this.setPrice(a.p);this.setBidButton()}else{this.dirtyTime++;getEngine().setAuctionDirty()}};box.prototype.processBidResponse=function(b,a,c){response=a[0];if(c.aid==response.a){auctiondata=new Array();auctiondata.a=c.aid;auctiondata.t=response.t;auctiondata.w=document.getElementById("loginuser").value;auctiondata.p=response.p;c.itemUpdate(auctiondata)}historyDirty=true};box.prototype.auctionUpdate=function(b,a,c){data=a[0];for(i=0;i<data.length;i++){auctiondata=data[i];if(c.boxno==auctiondata.x){if(c.aid!=auctiondata.a){c.aid=auctiondata.a;url="itemDetails.php?auctid="+c.aid+"&itemid="+auctiondata.i;link=document.getElementById("Tit_Link"+c.boxno);if(link){link.href=url;link.innerHTML=auctiondata.n}link=document.getElementById("HRFPhoto"+c.boxno);if(link){link.href=url}link=document.getElementById("TopPicLink"+c.boxno);if(link){link.href=url}img=document.getElementById("PIC_Dat"+c.boxno);if(img){img.src=ItemImageLink(auctiondata.t);if(auctiondata.d==undefined||auctiondata.d==""){img.alt=auctiondata.n}else{img.alt=auctiondata.d}}c.retailprice=auctiondata.r*100;div=document.getElementById("RET_Dat"+c.boxno);if(div){div.innerHTML="Retails for: "+formatmoney(c.retailprice)}if(c.increment!=auctiondata.c){YAHOO.util.Dom.removeClass("BB_Dat"+c.boxno,"inc_"+c.increment);c.increment=auctiondata.c;YAHOO.util.Dom.addClass("BB_Dat"+c.boxno,"inc_"+c.increment)}if(typeof(auctiondata.j)=="undefined"){auctionClass=""}else{auctionClass=auctiondata.j}if(c.auctionClass!=auctionClass){if(c.auctionClass!=""){YAHOO.util.Dom.removeClass("BB_Dat"+c.boxno,"cl_"+c.auctionClass)}c.auctionClass=auctionClass;c.setTooltip();if(c.auctionClass!=""){YAHOO.util.Dom.addClass("BB_Dat"+c.boxno,"cl_"+c.auctionClass)}}}}}};box.prototype.setTooltip=function(){div=document.getElementById("auctionClass"+this.boxno);if(!div){div=document.getElementById("itemdetails_"+this.auctionClass)}if(div){if(this.auctionClass=="BEGINNER"){div.title="Beginners Only Auction - Open to users<br/>who have won fewer than five auctions!"}else{if(this.auctionClass=="EXPERT"){div.title="Expert Auction - Win limits do not apply!"}else{div.title=""}}}div=document.getElementById("itemFlag"+this.boxno);if(div){switch(this.increment){case 1:div.title="Penny Auction - the auction price increases<br/>by one cent every time a bid is placed";break;case 5:div.title="Nickel Auction - the auction price increases by five cents every time a bid is placed";break;case 10:div.title="Dime Auction - the auction price increases by ten cents every time a bid is placed";break}}};box.prototype.click=function(){userpid=document.getElementById("loginpid").value;username=document.getElementById("loginuser").value;if(userpid>0){if(document.getElementById("bidbalance").value>0){dt=new Date().getTime();if((this.highBidder!=username)&&(this.time>=1)&&(dt-this.lastbid>1000)){PerformBid(this.aid);this.lastbid=dt}}else{document.location="bids.php?nobids=true"}}else{scroll(0,0);document.getElementById("popWrapper").style.display="block";document.getElementById("popLogin").style.display="block";document.getElementById("popLoginError").innerHTML="Sorry, you must have an account with bidcactus to bid.  Please login or if you do not have an account please <a href='register.php'>click here to register</a>.";document.getElementById("popLoginError").style.display="block";document.getElementById("transGray").style.display="block";document.getElementById("popWinJS").innerHTML="";document.location="#wintop"}};