
 //dbugScripts - will include non-compressed versions of this code if "jsdebug=true" is in the url of this page,
 //otherwise it will execute this code.

 if(!dbugScripts("http://publish.cnet.com:8100/html/rb/js/tron/officeHours/",["officeHours.tron.global.js"])) {
 /*	officeHours.tron.global.js - packed	*/
       new Native({name:"Date",initialize:Date,protect:true});["now","parse","UTC"].each(function(A){Native.genericize(Date,A,true);});Date.$Methods=new Hash();["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","UTCDate","UTCDay","UTCFullYear","AMPM","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds"].each(function(A){Date.$Methods.set(A.toLowerCase(),A);});$each({ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"},function(B,A){Date.$Methods.set(A,B);});Date.implement({set:function(B,C){B=B.toLowerCase();var A=Date.$Methods;if(A.has(B)){this["set"+A.get(B)](C);}return this;},get:function(B){B=B.toLowerCase();var A=Date.$Methods;if(A.has(B)){return this["get"+A.get(B)]();}return null;},clone:function(){return new Date(this.get("time"));},increment:function(A,B){return this.multiply(A,B);},decrement:function(A,B){return this.multiply(A,B,false);},multiply:function(B,G,A){B=B||"day";G=$pick(G,1);A=$pick(A,true);var H=A?1:-1;var E=this.format("%m").toInt()-1;var C=this.format("%Y").toInt();var D=this.get("time");var F=0;switch(B){case"year":G.times(function(I){if(Date.isLeapYear(C+I)&&E>1&&H>0){I++;}if(Date.isLeapYear(C+I)&&E<=1&&H<0){I--;}F+=Date.$units.year(C+I);});break;case"month":G.times(function(K){if(H<0){K++;}var J=E+(K*H);var I=I;if(J<0){I--;J=12+J;}if(J>11||J<0){I+=(J/12).toInt()*H;J=J%12;}F+=Date.$units.month(J,I);});break;default:F=Date.$units[B]()*G;break;}this.set("time",D+(F*H));return this;},isLeapYear:function(){return Date.isLeapYear(this.get("year"));},clearTime:function(){this.set("hr",0);this.set("min",0);this.set("sec",0);this.set("ms",0);return this;},diff:function(D,B){B=B||"day";if($type(D)=="string"){D=Date.parse(D);}switch(B){case"year":return D.format("%Y").toInt()-this.format("%Y").toInt();break;case"month":var A=(D.format("%Y").toInt()-this.format("%Y").toInt())*12;return A+D.format("%m").toInt()-this.format("%m").toInt();break;default:var C=D.get("time")-this.get("time");if(C<0&&Date.$units[B]()>(-1*(C))){return 0;}else{if(C>=0&&C<Date.$units[B]()){return 0;}}return((D.get("time")-this.get("time"))/Date.$units[B]()).round();}},getWeek:function(){var A=(new Date(this.get("year"),0,1)).get("date");return Math.round((this.get("dayofyear")+(A>3?A-4:A+3))/7);},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");},getGMTOffset:function(){var A=this.get("timezoneOffset");return((A>0)?"-":"+")+Math.floor(Math.abs(A)/60).zeroise(2)+(A%60).zeroise(2);},parse:function(A){this.set("time",Date.parse(A));return this;},format:function(A){A=A||"%x %X";if(!this.valueOf()){return"invalid date";}if(Date.$formats[A.toLowerCase()]){A=Date.$formats[A.toLowerCase()];}var B=this;return A.replace(/\%([aAbBcdHIjmMpSUWwxXyYTZ])/g,function(C,E){switch(E){case"a":return Date.$days[B.get("day")].substr(0,3);case"A":return Date.$days[B.get("day")];case"b":return Date.$months[B.get("month")].substr(0,3);case"B":return Date.$months[B.get("month")];case"c":return B.toString();case"d":return B.get("date").zeroise(2);case"H":return B.get("hr").zeroise(2);case"I":return((B.get("hr")%12)||12);case"j":return B.get("dayofyear").zeroise(3);case"m":return(B.get("mo")+1).zeroise(2);case"M":return B.get("min").zeroise(2);case"p":return B.get("hr")<12?"AM":"PM";case"S":return B.get("seconds").zeroise(2);case"U":return B.get("week").zeroise(2);case"W":throw new Error("%W is not supported yet");case"w":return B.get("day");case"x":var D=Date.$cultures[Date.$culture];return B.format("%"+D[0].substr(0,1)+D[3]+"%"+D[1].substr(0,1)+D[3]+"%"+D[2].substr(0,1).toUpperCase());case"X":return B.format("%I:%M%p");case"y":return B.get("year").toString().substr(2);case"Y":return B.get("year");case"T":return B.get("GMTOffset");case"Z":return B.get("Timezone");case"%":return"%";}return E;});},setAMPM:function(A){A=A.toUpperCase();if(this.format("%H").toInt()>11&&A=="AM"){return this.decrement("hour",12);}else{if(this.format("%H").toInt()<12&&A=="PM"){return this.increment("hour",12);}}return this;}});Date.prototype.compare=Date.prototype.diff;Date.prototype.strftime=Date.prototype.format;Date.$nativeParse=Date.parse;$extend(Date,{$months:["January","February","March","April","May","June","July","August","September","October","November","December"],$days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$daysInMonth:function(B,A){if(Date.isLeapYear(A.toInt())&&B===1){return 29;}return[31,28,31,30,31,30,31,31,30,31,30,31][B];},$epoch:-1,$era:-2,$units:{ms:function(){return 1;},second:function(){return 1000;},minute:function(){return 60000;},hour:function(){return 3600000;},day:function(){return 86400000;},week:function(){return 608400000;},month:function(C,A){var B=new Date();return Date.$daysInMonth($pick(C,B.format("%m").toInt()),$pick(A,B.format("%Y").toInt()))*86400000;},year:function(A){A=A||new Date().format("%Y").toInt();return Date.isLeapYear(A.toInt())?31622400000:31536000000;}},$formats:{db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S",iso8601:"%Y-%m-%dT%H:%M:%S%T",rfc822:"%a, %d %b %Y %H:%M:%S %Z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"},isLeapYear:function(A){return new Date(A,1,29).getDate()==29;},parseUTC:function(B){var A=new Date(B);var C=Date.UTC(A.get("year"),A.get("mo"),A.get("date"),A.get("hr"),A.get("min"),A.get("sec"));return new Date(C);},parse:function(F){var C=$type(F);if(C=="number"){return new Date(F);}if(C!="string"){return F;}if(!F.length){return null;}for(var B=0,A=Date.$parsePatterns.length;B<A;B++){var D=Date.$parsePatterns[B].re.exec(F);if(D){try{return Date.$parsePatterns[B].handler(D);}catch(E){dbug.log("date parse error: ",E);return null;}}}return new Date(Date.$nativeParse(F));},parseMonth:function(D,C){var B=-1;switch($type(D)){case"object":B=Date.$months[D.get("mo")];break;case"number":B=Date.$months[D-1]||false;if(!B){throw new Error("Invalid month index value must be between 1 and 12:"+index);}break;case"string":var A=Date.$months.filter(function(E){return this.test(E);},new RegExp("^"+D,"i"));if(!A.length){throw new Error("Invalid month string");}if(A.length>1){throw new Error("Ambiguous month");}B=A[0];}return(C)?Date.$months.indexOf(B):B;},parseDay:function(A,D){var C=-1;switch($type(A)){case"number":C=Date.$days[A-1]||false;if(!C){throw new Error("Invalid day index value must be between 1 and 7");}break;case"string":var B=Date.$days.filter(function(E){return this.test(E);},new RegExp("^"+A,"i"));if(!B.length){throw new Error("Invalid day string");}if(B.length>1){throw new Error("Ambiguous day");}C=B[0];}return(D)?Date.$days.indexOf(C):C;},fixY2K:function(B){if(!isNaN(B)){var A=new Date(B);if(A.get("year")<2000&&B.toString().indexOf(A.get("year"))<0){A.increment("year",100);}return A;}else{return B;}},$cultures:{US:["month","date","year","/"],GB:["date","month","year","/"]},$culture:"US",$cIndex:function(A){return Date.$cultures[Date.$culture].indexOf(A)+1;},$parsePatterns:[{re:/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{2,4})$/,handler:function(B){var C=new Date();var A=Date.$cultures[Date.$culture];C.set("year",B[Date.$cIndex("year")]);C.set("month",B[Date.$cIndex("month")]-1);C.set("date",B[Date.$cIndex("date")]);return Date.fixY2K(C);}},{re:/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{2,4})\s(\d{1,2}):(\d{1,2})(\w{2})$/,handler:function(A){var B=new Date();B.set("year",A[Date.$cIndex("year")]);B.set("month",A[Date.$cIndex("month")]-1);B.set("date",A[Date.$cIndex("date")]);B.set("hr",A[4]);B.set("min",A[5]);B.set("ampm",A[6]);return Date.fixY2K(B);}}]});Number.implement({zeroise:function(A){return String(this).zeroise(A);}});String.implement({repeat:function(C){var A=[];for(var B=0;B<C;B++){A.push(this);}return A.join("");},zeroise:function(A){return"0".repeat(A-this.length)+this;}});["LastDayOfMonth","Ordinal"].each(function(A){Date.$Methods.set(A.toLowerCase(),A);});Date.implement({timeAgoInWords:function(){var A=(arguments.length>0)?arguments[1]:new Date();return Date.distanceOfTimeInWords(this,A,arguments[2]);},getOrdinal:function(){var A=this.get("date");return(A>3&&A<21)?"th":["th","st","nd","rd","th"][Math.min(A%10,4)];},getDayOfYear:function(){return((Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+1,0,0,0)-Date.UTC(this.getFullYear(),0,1,0,0,0))/Date.$units.day());},getLastDayOfMonth:function(){var A=this.clone();A.setMonth(A.getMonth()+1,0);return A.getDate();}});$extend(Date,{distanceOfTimeInWords:function(D,B,C){var F=((B.getTime()-D.getTime())/1000).toInt();if(F<60){return"less than a minute ago";}else{if(F<120){return"about a minute ago";}else{if(F<(45*60)){return(F/60).round()+" minutes ago";}else{if(F<(90*60)){return"about an hour ago";}else{if(F<(24*60*60)){return"about "+(F/3600).round()+" hours ago";}else{if(F<(48*60*60)){return"1 day ago";}else{var E=(F/86400).round();if(E>30){var A="%B %d";if(B.getYear()!=D.getYear()){A+=", %Y";}if(C){A+=" %I:%M %p";}return D.strftime(A);}else{return E+" days ago";}}}}}}}}});Date.$parsePatterns.extend([{re:/^(\d{4})(?:-?(\d{2})(?:-?(\d{2})(?:[T ](\d{2})(?::?(\d{2})(?::?(\d{2})(?:\.(\d+))?)?)?(?:Z|(?:([-+])(\d{2})(?::?(\d{2}))?)?)?)?)?)?$/,handler:function(A){var C=0;var B=new Date(A[1],0,1);if(A[2]){B.setMonth(A[2]-1);}if(A[3]){B.setDate(A[3]);}if(A[4]){B.setHours(A[4]);}if(A[5]){B.setMinutes(A[5]);}if(A[6]){B.setSeconds(A[6]);}if(A[7]){B.setMilliseconds(("0."+A[7]).toInt()*1000);}if(A[9]){C=(A[9].toInt()*60)+A[10].toInt();C*=((A[8]=="-")?1:-1);}C-=B.getTimezoneOffset();B.setTime((B*1)+(C*60*1000).toInt());return B;}},{re:/^tod/i,handler:function(){return new Date();}},{re:/^tom/i,handler:function(){return new Date().increment();}},{re:/^yes/i,handler:function(){return new Date().decrement();}},{re:/^(\d{1,2})(st|nd|rd|th)?$/i,handler:function(A){var B=new Date();B.setDate(A[1].toInt());return B;}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+)$/i,handler:function(A){var B=new Date();B.setMonth(Date.parseMonth(A[2],true),A[1].toInt());return B;}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+),? (\d{4})$/i,handler:function(A){var B=new Date();B.setMonth(Date.parseMonth(A[2],true),A[1].toInt());B.setYear(A[3]);return B;}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?,? (\d{4})$/i,handler:function(A){var B=new Date();B.setMonth(Date.parseMonth(A[1],true),A[2].toInt());B.setYear(A[3]);return B;}},{re:/^next (\w+)$/i,handler:function(D){var E=new Date();var B=E.getDay();var C=Date.parseDay(D[1],true);var A=C-B;if(C<=B){A+=7;}E.setDate(E.getDate()+A);return E;}},{re:/^\d+\s[a-zA-z]..\s\d.\:\d.$/,handler:function(B){var C=new Date();B=B[0].split(" ");C.setDate(B[0]);var A;Date.$months.each(function(E,D){if(new RegExp("^"+B[1]).test(E)){A=D;}});C.setMonth(A);C.setHours(B[2].split(":")[0]);C.setMinutes(B[2].split(":")[1]);C.setMilliseconds(0);return C;}}]);var TextFieldCounter=new Class({Implements:[Options,Events],options:{countUpdateSelector:".cnt",fieldSelector:"textarea",commonParentSelector:"dd",errorClass:"validation-advice",findCounter:function(A){return A.getParent(this.options.commonParentSelector).getElement(this.options.countUpdateSelector);}},initialize:function(B,A){this.setOptions(A);this.form=$(B);this.findCounter=this.options.findCounter;this.form.getElements(this.options.fieldSelector).each(this.setFieldValidation.bind(this));this.fireEvent("onInit");},setFieldValidation:function(D){var B=D.get("validatorProps");if(!B){return ;}B=JSON.decode(B);if(!B&&!B.maxLength){return ;}try{var A=this.findCounter(D);}catch(C){var A=null;}if(!A){return ;}D.addEvent("keyup",function(){var E=D.value.trim().length;A.set("text",E);if((E<(B.minLength||0))||(E>B.maxLength)){A.addClass(this.options.errorClass);}else{A.removeClass(this.options.errorClass);}}.bind(this));},resetCounter:function(B){var A=this.findCounter(B);if(!A){return ;}A.set("text","0").removeClass(this.options.errorClass);},resetAllCounters:function(){this.form.getElements(this.options.fieldSelector).each(this.resetCounter.bind(this));}});var OfficeHours=new Class({Implements:Options,options:{isEditor:false,threadId:null,rootMessageId:null,videoStatus:null,hasVideo:false,videoDates:{current:null,upcoming:null}},initialize:function(A){this.autoplay=true;this.setOptions(A);if(PageVars.get("pageType")=="9765"){this.dojoSubscribe();this.setDojoConnectionTimer();this.makeRequest(".eoh-videoInfo",this.displayVideoInfo.bind(this));this.makeRequest(".eoh-videoArea",this.displayVideoArea.bind(this));this.makeRequest(".eoh-contentAux",this.displayContentAux.bind(this));this.writeChat();}else{if(PageVars.get("pageType")=="9766"){if(this.options.videoDates.current!=null){this.displayAirTime(this.options.videoDates.current,".inProgressShow .dateToParse.current");}if(this.options.videoDates.upcoming!=null){this.displayAirTime(this.options.videoDates.upcoming,".nextShow .dateToParse.upcoming");}}}},makeRequest:function(A,B){new Request({url:new Link(PageVars.getPath({pageType:9769})).mergeQueryString({nomesh:null,_tilename_:A,threadId:this.options.threadId,threadID:this.options.threadId,forumRootMessageId:this.options.rootMessageId,videoStatus:this.options.videoStatus,hasVideo:this.options.hasVideo}).get("href"),onSuccess:function(C){B(C);}}).send();},displayVideoInfo:function(A){$$(".videoInfo").set("html",A);this.displayAirTime(this.options.videoDates.current,".videoInfo .dateToParse.current");this.displayAirTime(this.options.videoDates.upcoming,".videoInfo .dateToParse.upcoming");},displayVideoArea:function(A){$("videoArea").set("html",A);if($("videoArea").getElement("#universalVideo").hasClass("doneVideo")){loadUniversalPlayer({parentElement:$("universalVideo"),lumiereQueryType:"id",lumiereQueryValue:PageVars.get("assetId"),autoPlay:this.autoplay,preRollAd:true,firstVideoPostAd:false,firstVideoPostRoll:false,contentPostRollAd:false,useCurrentPageUrl:false,hideTabs:true,hideEmailBtn:true,externalLinks:true,relatedVideo:false,initAction:false});}if($("videoArea").getElement("#universalVideo").hasClass("live")){loadUniversalPlayer({parentElement:$("universalVideo"),lumiereQueryType:"live",lumiereQueryValue:"live",autoPlay:this.autoplay,preRollAd:true,firstVideoPostAd:false,firstVideoPostRoll:false,contentPostRollAd:false,useCurrentPageUrl:false,hideTabs:true,hideEmailBtn:true,externalLinks:true,relatedVideo:false,liveId:"officehours",liveHed:"",liveDeck:PageVars.get("title"),liveImage:PageVars.get("description"),liveRelatedLink:"http://www.cnettv.com/",liveNcat:PageVars.get("breadcrumb"),liveUrl:"http://www.cnettv.com",liveHost:"cnet.fc.llnwd.net/cnet",liveAspectRatio:"16:9",liveVideoId:PageVars.get("assetId"),initAction:false});}this.displayAirTime(this.options.videoDates.current,".statusMessage .dateToParse.current");this.displayAirTime(this.options.videoDates.upcoming,".statusMessage .dateToParse.upcoming");},displayContentAux:function(A){$("contentAux").set("html",A);if($("submitQuestion")){$("submitQuestion").getElement("a.submit").addEvent("click",function(){if(!UserVars.isLoggedIn()){CURS.Manager.checkLogin({registerHed:"Join CNET to ask a question",loginHed:"Please log in to CNET to ask a question",appId:"159",nextAction:this.sendQuestion.bind(this)});}else{this.sendQuestion();}}.bind(this));$("submitQuestion").getElement("textarea[name=body]").addEvent("keyup",function(){var D=$("submitQuestion").getElement("textarea[name=body]").get("validatorProps");if(!D){return ;}D=JSON.decode(D);if(!D&&!D.maxLength){return ;}var C=this.value.trim().length;var B=$("submitQuestion").getElement(".charCount span").set("text",C);if((C<(D.minLength||0))||(C>D.maxLength)){B.addClass("validation-advice");}else{B.removeClass("validation-advice");}});}},cleanDate:function(A){this.cleanedDate=(A.format("%d").substring(0,1)=="0")?A.format("%d").substring(1):A.format("%d");this.cleanedDate=this.cleanedDate+A.get("ordinal");return this.cleanedDate;},displayAirTime:function(A,B){this.parsedDate=new Date.parse(A);switch(this.parsedDate.get("day")-new Date().get("day")){case 0:if(this.parsedDate.get("week")==new Date().get("week")){if(!this.videoIsLive){this.countdownToAir($$(B));this.countdown=setInterval(this.countdownToAir.bind(this),60000,$$(B));}}else{$$(B).set("text",this.parsedDate.format("%A, %B "+this.cleanDate(this.parsedDate)+", %Y %X PDT"));}break;case 1:$$(B).set("text","Tomorrow at "+this.parsedDate.format("%X PDT"));break;case -1:if(this.parsedDate.get("week")==new Date().get("week")){$$(B).set("text","Yesterday at "+this.parsedDate.format("%X PDT"));}else{$$(B).set("text",this.parsedDate.format("%A, %B "+this.cleanDate(this.parsedDate)+", %Y %X PDT"));}break;default:$$(B).set("text",this.parsedDate.format("%A, %B "+this.cleanDate(this.parsedDate)+", %Y %X PDT"));}},countdownToAir:function(B){this.airTime=new Date.parse(this.options.videoDates.current);if(new Date().diff(this.airTime,"minute")<=30&&new Date().diff(this.airTime,"minute")>5){B.set("text","Begins in "+new Date().diff(this.airTime,"minute")+" minutes");}else{if(new Date().diff(this.airTime,"minute")<=5){if(this.countdown){clearInterval(this.countdown);}if(new Date().diff(this.airTime,"minute")<=0){this.videoIsLive=true;this.makeRequest(".eoh-videoInfo",this.displayVideoInfo.bind(this));this.endCountdown=setInterval(this.countdownToEnd.bind(this),300000);}else{var A=setInterval('if(new Date().diff(this.airTime, "minute") <= 0){this.makeRequest(".eoh-videoInfo", this.displayVideoInfo.bind(this)); clearInterval("toLiveInt");this.videoIsLive = true;this.endCountdown = setInterval(this.countdownToEnd.bind(this), 300000);};',60000);}B.set("text","Begins in a few minutes");if(B.getParent(".statusMessage")[0]!=null){this.autoplay=false;this.makeRequest(".eoh-videoArea",this.displayVideoArea.bind(this));}}else{B.set("text","Today at "+this.parsedDate.format("%X PDT"));}}},countdownToEnd:function(){if(new Date().diff(this.airTime,"minute")<=-35){this.makeRequest(".eoh-videoInfo",this.displayVideoInfo.bind(this));this.makeRequest(".eoh-videoArea",this.displayVideoArea.bind(this));this.makeRequest(".eoh-contentAux",this.displayContentAux.bind(this));}},writeChat:function(){var B=(UserVars.get("ursRegId")=="")?"25252525252525":UserVars.get("ursRegId");var A=new FlashObject("http://swf.userplane.com/CommunicationSuite/mc.swf","mc","645","260","9","#ffffff",true,"best");A.addParam("scale","noscale");A.addParam("menu","true");A.addParam("salign","LT");A.addParam("wmode","transparent");A.addParam("allowScriptAccess","always");A.addVariable("strServer","flashcom.cnet.userplane.com");A.addVariable("strSwfServer","swf.userplane.com");A.addVariable("strApplicationName","CommunicationSuite");A.addVariable("strDomainID","api.cnet.com");A.addVariable("strInstanceID","cnettv_eoh");A.addVariable("strSpawnID","");A.addVariable("strSessionGUID",B);A.addVariable("strKey","");A.addVariable("strCssID","mc");A.useExpressInstall("expressinstall.swf");A.setAttribute("xiRedirectUrl","");A.write("flashcontent");this.checkChatLogin();},checkChatLogin:function(){if(UserVars.isLoggedIn()){$$(".memberChat h2 span").dispose();}$$("#mc, #openLogin").addEvent("click",function(){if(!UserVars.isLoggedIn()){CURS.Manager.checkLogin({registerHed:"Join CNET to chat with members",loginHed:"Please log in to CNET to chat with members",appId:"159",nextAction:this.resetChat.bind(this)});}}.bind(this));},resetChat:function(){$("flashcontent").empty();this.writeChat();$$(".memberChat h2 span").dispose();},dojoSubscribe:function(){dojo.require("dojo.io.cometd");dojo.addOnLoad(function(){dbug.log("subscribe");cometd.init({},"/7751-4-0.html");cometd.subscribe("/forums/thread/"+this.options.threadId,false,"incomingHandler");}.bind(this));},dojoResubscribe:function(){dbug.log("in resubscribe");var C=new Date().getTime();var D=15000;var A=new Date(C-D);var B=new Date(cometd.currentTransport.lastTimestamp);dbug.log("testDate = "+A);dbug.log("cometd.currentTransport.lastTimeStamp = "+cometd.currentTransport.lastTimestamp);dbug.log("lastCometDate = "+B);if(A.getTime()>B.getTime()){dbug.log("cometd's current transport not connected. gonna subscribe again.");cometd.unsubscribe("/forums/thread/"+this.options.threadId,false,"incomingHandler");cometd.init({},"/7751-4-0.html");cometd.subscribe("/forums/thread/"+this.options.threadId,false,"incomingHandler");}else{dbug.log("still connected");}this.setDojoConnectionTimer();},setDojoConnectionTimer:function(){setTimeout(this.dojoResubscribe.bind(this),15000);dbug.log("reconnect is timed");},sendQuestion:function(F){if(!this.options.isEditor){var A=$("submitQuestion").getElement("input[name=subject]");A.set("value","Question from "+UserVars.get("userName")+" "+new Date().toLocaleTimeString());var E=$("submitQuestion").getElement("textarea[name=body]").get("validatorProps");if(!E){return ;}E=JSON.decode(E);if(!E&&!E.maxLength){return ;}var C=$("submitQuestion").getElement("textarea[name=body]").value.trim().length;var D=$("submitQuestion").getElement(".submitMsg");if((C<(E.minLength||0))||(C>E.maxLength)){D.addClass("validation-advice");$("submitQuestion").getElement("textarea[name=body]").addClass("validation-advice");if(C<(E.minLength||0)){D.set("text","Error: Please enter a minumum of 10 characters");}if(C>E.maxLength){D.set("text","Error: Please enter a maximum of 200 characters");}}else{this.submitForm(F);D.set("text","Thank you for your submission");D.addClass("successful");$("submitQuestion").getElement("textarea[name=body]").removeClass("validation-advice");$("submitQuestion").getElement("textarea[name=body]").set("value","");}}else{var B=$("askEditor").getElement(".currentQuestion");B.getElement("p").set("text",$("submitQuestion").getElement("textarea[name=body]").value);$("submitQuestion").getElement("textarea[name=body]").set("value","");}},submitForm:function(){$("submitQuestion").send();}});var incomingHandler=function(B){var A=$("askEditor").getElement(".currentQuestion");if(B.data.isUserEditor=="true"){if(A.getElement(".byline").getElement("a")!=null){A.getElement(".byline").getElement("a").destroy();}var C=new Element("a",{href:"http://www.cnet.com"+B.data.replyUserLink}).set("text",B.data.replyUsername);A.getElement("p").set("text",B.data.replyBody);A.getElement(".byline").set("text","by ");A.getElement(".byline").adopt(C);}};function csEvent(A,C,B){var I,E,D,G,H,F;if(A=="InstantCommunicator.StartConversation"){I=C;E=B;launchWM(userRegId,I);}else{if(A=="User.ViewProfile"){I=C;}else{if(A=="User.Block"){D=C;G=B;}else{if(A=="User.AddFriend"){H=C;F=B;}else{if(A=="Chat.Help"){}else{if(A=="User.NoTextEntry"){}else{if(A=="Connection.Success"){}else{if(A=="Connection.Failure"){if(C=="Session.Timeout"){}if(C=="User.Banned"){}}}}}}}}}}function launchWM(A,C){var B=window.open("wm.cfm?strDestinationUserID="+C,"WMWindow_"+replaceAlpha(A)+"_"+replaceAlpha(C),"width=468,height=595,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1");if(B==null){alert("Your popup blocker stopped an IM window from opening");}}function replaceAlpha(D){var C="";for(var B=0;B<D.length;B++){var A=D.charAt(B);if((A>="A"&&A<="Z")||(A>="a"&&A<="z")||(A>="0"&&A<="9")){C+=A;}else{C+="_";}}return C;}function getLocaleData(C){var A=(C=="mc");var B={historyNotificationMessage:"********** The messages above were sent before you arrived",whisperHowToMessage:"",userJoinNotificationMessage:(""),userLeaveNotificationMessage:"",userNameChangeNotificationMessage:"",userMessageSentMessage:"SCREEN_NAME: MESSAGE",textAdvertisementMessage:"Check out our sponsored link:",userNotAuthorizedErrorMessage:"You could not be authorized.\n\nPlease re-login to the\nwebsite and try again.",serverLicenseErrorMessage:"The license for this\nUserplane app is no longer valid.\n\nYou should have your webmaster contact\nUserplane Support (support@userplane.com)\nto resolve this issue.",userBanNoticeErrorMessage:"You've been banned from this\napplication by a site administrator.\n\nYou'll need to get in touch with them\nfor more information.",clientVersionErrorMessage:"Your web browser is running an old\nversion of this application.\n\nYou should empty your browser's cache\nand log back in.",serverMaxUsersErrorMessage:"The chat has reached the max\nallowed number of users.\nPlease try again later.",serverNoAdminErrorMessage:"This chat requires that an Admin is\nlogged in at all times.\nCurrently none are connected.\nPlease try again later.",invalidDomainErrorMessage:"This chat is currently offline",whisperSentMessage:"You whispered to SCREEN_NAME",whisperNotSentMessage:"Your whisper wasn't sent. Please check the name and try again",whisperReceivedMessage:"SCREEN_NAME whispers",whisperPersonalMessage:"You whispered to yourself",floodControlSlowDownMessage:"********** Please slow down. You must wait a few seconds",floodControlResumeMessage:"********** You may now resume sending"};if(A){B.userJoinNotificationMessage="";B.userLeaveNotificationMessage="";B.userCountLabel="chatting";B.watcherCountLabel="observing";B.copyrightText="&copy; 2008 Userplane";}return B;}function getPreferences(A){return{useTimestamps:false,branding:"Chat with CNET Members",brandingOpacity:0.25,chatButtonLabel:"Enter Chat",sendMessageButtonLabel:"Enter",showMinichatFooter:false,minichatBuddyPicURL:"",showMinichatBuddyPic:false,showMinichatDescription:false,showMinichatRoomName:false,minichatBuddyPicMaxWidth:160,minichatBuddyPicMaxHeight:60,minichatBackgroundColor:"000000",minichatForegroundColor:"AAAAAA",minichatConversationBackgroundColor:"000000",minichatConversationBorderColor:"8a8a8a",minichatConversationLinkColor:"8a8a8a",minichatConversationForegroundColor:"8a8a8a",minichatConversationWhisperColor:"8a8a8a",minichatConversationAnnouncementColor:"8a8a8a",onlineUserMessageColor:"8a8a8a",localUserMessageColor:"8a8a8a",scrollBarBorderColor:"8a8a8a",scrollbarTrackColor:"8a8a8a",scrollbarThumbColor:"8a8a8a",overrideCustomFontColors:"true",useHistoryColor:"true",historyColor:"8a8a8a",roomUserlistWidth:"120",inlineChatButton:"false"};}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;
 /* end packed code */
 }
       