//mootools base javascript (moo.base.js), cnet.base.js, cnet.global.utils.js
//see readme.txt in parent directory for details
//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.
//example: dbugScripts("/the/location/of/my/scripts/",["script1.js","script2.js","etc"])
//returns true if scripts are included, otherwise false.
function dbugScripts(baseurl,libs){	if(window.location.href.indexOf("basePath=this")>0){var path=baseurl.substring(baseurl.substring(7,baseurl.length).indexOf("/")+8,baseurl.length);var href=window.location.href; baseurl=href.substring(href.substring(7,href.length).indexOf("/")+8,href.length);} if(window.location.href.indexOf("jsdebug=true")>0){ for(i=0;i<libs.length;i++){document.write("<scri"+"pt src=\""+baseurl+libs[i]+"\" type=\"text/javascript\"></script>");}return true;}return false;};
if(!dbugScripts("http://c18-x-publish1.cnet.com:8100/html/rb/js/global/cat/",["redball.global.framework.js"])){
/*	redball.global.framework.js - packed	*/
dbug={logged:[],timers:{},loadtimers:{},loadtimerlogged:[],firebug:false,debug:false,log:function(){this.logged.push(arguments)},nolog:function(msg){this.logged.push(arguments)},time:function(name){this.timers[name]=new Date().getTime()},loadtime:function(name){this.loadtimers[name]=new Date().getTime()},timeEnd:function(name){if(this.timers[name]>0){var end=new Date().getTime()-this.timers[name];this.log('%s: %s',name,end);this.timers[name]=false}else this.log('no such timer: %s',name)},loadtimeEnd:function(name){if(this.loadtimers[name]>0){var end=new Date().getTime()-this.loadtimers[name];this.loadtimerlogged.push(['%s: %s',name,end]);this.loadtimers[name]=false}else this.log('no such load timer: %s',name)},enable:function(){if(this.firebug){this.debug=true;this.log=console.debug;this.time=console.time;this.timeEnd=console.timeEnd;this.log('enabling dbug');for(i=0;i<this.logged.length;i++){this.log.apply(console,this.logged[i])}this.logged=[]}},showLoadTimers:function(){if(!this.debug)this.enable();for(i=0;i<this.loadtimerlogged.length;i++){this.log.apply(console,this.loadtimerlogged[i])}},disable:function(){if(this.firebug)this.debug=false;this.log=this.nolog;this.time=function(){};this.timeEnd=function(){}}};if(typeof console!="undefined"){if(typeof console.debug!="undefined"){dbug.firebug=true;if(window.location.href.indexOf("jsdebug=true")>0)dbug.enable()}}dbug.loadtime('redball global framework');var Class=function(properties){var klass=function(){for(var p in this){if(this[p])this[p]._proto_=this}if(arguments[0]!='noinit'&&this.initialize)return this.initialize.apply(this,arguments)};klass.extend=this.extend;klass.implement=this.implement;klass.prototype=properties;return klass};Class.empty=function(){};Class.create=function(properties){return new Class(properties)};Class.prototype={extend:function(properties){var pr0t0typ3=new this('noinit');for(var property in properties){var previous=pr0t0typ3[property];var current=properties[property];if(previous&&previous!=current)current=previous.parentize(current)||current;pr0t0typ3[property]=current}return new Class(pr0t0typ3)},implement:function(properties){for(var property in properties)this.prototype[property]=properties[property]}};Object.extend=function(){var args=arguments;if(args[1])args=[args[0],args[1]];else args=[this,args[0]];for(var property in args[1])args[0][property]=args[1][property];return args[0]};Object.Native=function(){for(var i=0;i<arguments.length;i++)arguments[i].extend=Class.prototype.implement};new Object.Native(Function,Array,String,Number);Function.extend({parentize:function(current){var previous=this;return function(){this.parent=previous;return current.apply(this,arguments)}}});if(!Array.prototype.forEach){Array.prototype.forEach=function(fn,bind){for(var i=0;i<this.length;i++)fn.call(bind,this[i],i)}}Array.extend({each:Array.prototype.forEach,copy:function(){var newArray=[];for(var i=0;i<this.length;i++)newArray.push(this[i]);return newArray},remove:function(item){for(var i=0;i<this.length;i++){if(this[i]==item)this.splice(i,1)}return this},test:function(item){for(var i=0;i<this.length;i++){if(this[i]==item)return true};return false},extend:function(newArray){for(var i=0;i<newArray.length;i++)this.push(newArray[i]);return this},associate:function(keys){var newArray=[];for(var i=0;i<this.length;i++)newArray[keys[i]]=this[i];return newArray}});function $A(array){return Array.prototype.copy.call(array)};Function.extend({pass:function(args,bind){var fn=this;if($type(args)!='array')args=[args];return function(){return fn.apply(bind||fn._proto_||fn,args)}},bind:function(bind){var fn=this;return function(){return fn.apply(bind,arguments)}},bindAsEventListener:function(bind){var fn=this;return function(event){fn.call(bind,event||window.event);return false}},delay:function(ms,bind){return setTimeout(this.bind(bind||this._proto_||this),ms)},periodical:function(ms,bind){return setInterval(this.bind(bind||this._proto_||this),ms)}});function $clear(timer){clearTimeout(timer);clearInterval(timer);return null};function $type(obj){if(!obj)return false;var type=false;if(obj instanceof Function)type='function';else if(obj.nodeName){if(obj.nodeType==3&&!/\S/.test(obj.nodeValue))type='textnode';else if(obj.nodeType==1)type='element'}else if(obj instanceof Array)type='array';else if(typeof obj=='object')type='object';else if(typeof obj=='string')type='string';else if(typeof obj=='number'&&isFinite(obj))type='number';return type};var Chain=new Class({chain:function(fn){this.chains=this.chains||[];this.chains.push(fn);return this},callChain:function(){if(this.chains&&this.chains.length)this.chains.splice(0,1)[0].delay(10,this)},clearChain:function(){this.chains=[]}});String.extend({test:function(regex,params){return this.match(new RegExp(regex,params))},toInt:function(){return parseInt(this)},camelCase:function(){return this.replace(/-\D/gi,function(match){return match.charAt(match.length-1).toUpperCase()})},capitalize:function(){return this.toLowerCase().replace(/\b[a-z]/g,function(match){return match.toUpperCase()})},trim:function(){return this.replace(/^\s*|\s*$/g,'')},clean:function(){return this.replace(/\s\s/g,' ').trim()},rgbToHex:function(array){var rgb=this.test('([\\d]{1,3})','g');if(rgb[3]==0)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(rgb[i]-0).toString(16);hex.push(bit.length==1?'0'+bit:bit)}var hexText='#'+hex.join('');if(array)return hex;else return hexText},hexToRgb:function(array){var hex=this.test('^[#]{0,1}([\\w]{1,2})([\\w]{1,2})([\\w]{1,2})$');var rgb=[];for(var i=1;i<hex.length;i++){if(hex[i].length==1)hex[i]+=hex[i];rgb.push(parseInt(hex[i],16))}var rgbText='rgb('+rgb.join(',')+')';if(array)return rgb;else return rgbText}});Number.extend({toInt:function(){return this}});var Element=new Class({initialize:function(el){if($type(el)=='string')el=document.createElement(el);return $(el)},inject:function(el,where){el=$(el)||new Element(el);switch(where){case"before":$(el.parentNode).insertBefore(this,el);break;case"after":{if(!el.getNext())$(el.parentNode).appendChild(this);else $(el.parentNode).insertBefore(this,el.getNext())}break;case"inside":el.appendChild(this);break}return this},injectBefore:function(el){return this.inject(el,'before')},injectAfter:function(el){return this.inject(el,'after')},injectInside:function(el){return this.inject(el,'inside')},adopt:function(el){this.appendChild($(el)||new Element(el));return this},remove:function(){this.parentNode.removeChild(this)},clone:function(contents){return $(this.cloneNode(contents||true))},replaceWith:function(el){var el=$(el)||new Element(el);this.parentNode.replaceChild(el,this);return el},appendText:function(text){if(this.getTag()=='style'&&window.ActiveXObject)this.styleSheet.cssText=text;else this.appendChild(document.createTextNode(text));return this},hasClass:function(className){return!!this.className.test("\\b"+className+"\\b")},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className.trim()).clean();return this},removeClass:function(className){if(this.hasClass(className))this.className=this.className.replace(className.trim(),'').clean();return this},toggleClass:function(className){if(this.hasClass(className))return this.removeClass(className);else return this.addClass(className)},setStyle:function(property,value){if(property=='opacity')this.setOpacity(parseFloat(value));else this.style[property.camelCase()]=value;return this},setStyles:function(source){if($type(source)=='object'){for(var property in source)this.setStyle(property,source[property])}else if($type(source)=='string'){if(window.ActiveXObject)this.cssText=source;else this.setAttribute('style',source)}return this},setOpacity:function(opacity){if(opacity==0){if(this.style.visibility!="hidden")this.style.visibility="hidden"}else{if(this.style.visibility!="visible")this.style.visibility="visible"}if(window.ActiveXObject)this.style.filter="alpha(opacity="+opacity*100+")";this.style.opacity=opacity;return this},getStyle:function(property){var proPerty=property.camelCase();var style=this.style[proPerty]||false;if(!style){if(document.defaultView)style=document.defaultView.getComputedStyle(this,null).getPropertyValue(property);else if(this.currentStyle)style=this.currentStyle[proPerty]}if(style&&['color','backgroundColor','borderColor'].test(proPerty)&&style.test('rgb'))style=style.rgbToHex();return style},addEvent:function(action,fn){this[action+fn]=fn.bind(this);if(this.addEventListener)this.addEventListener(action,fn,false);else this.attachEvent('on'+action,this[action+fn]);var el=this;if(this!=window)Unload.functions.push(function(){el.removeEvent(action,fn);el[action+fn]=null});return this},removeEvent:function(action,fn){if(this.removeEventListener)this.removeEventListener(action,fn,false);else this.detachEvent('on'+action,this[action+fn]);return this},getBrother:function(what){var el=this[what+'Sibling'];while($type(el)=='textnode')el=el[what+'Sibling'];return $(el)},getPrevious:function(){return this.getBrother('previous')},getNext:function(){return this.getBrother('next')},getFirst:function(){var el=this.firstChild;while($type(el)=='textnode')el=el.nextSibling;return $(el)},getLast:function(){var el=this.lastChild;while($type(el)=='textnode')el=el.previousSibling;return $(el)},setProperty:function(property,value){var el=false;switch(property){case'class':this.className=value;break;case'style':this.setStyles(value);break;case'name':if(window.ActiveXObject&&this.getTag()=='input'){el=$(document.createElement('<input name="'+value+'" />'));$A(this.attributes).each(function(attribute){if(attribute.name!='name')el.setProperty(attribute.name,attribute.value)});if(this.parentNode)this.replaceWith(el)};default:this.setAttribute(property,value)}return el||this},setProperties:function(source){for(var property in source)this.setProperty(property,source[property]);return this},setHTML:function(html){this.innerHTML=html;return this},getProperty:function(property){return this.getAttribute(property)},getTag:function(){return this.tagName.toLowerCase()},getOffset:function(what){what=what.capitalize();var el=this;var offset=0;do{offset+=el['offset'+what]||0;el=el.offsetParent}while(el);return offset},getTop:function(){return this.getOffset('top')},getLeft:function(){return this.getOffset('left')},getValue:function(){var value=false;switch(this.getTag()){case'select':value=this.getElementsByTagName('option')[this.selectedIndex].value;break;case'input':if((this.checked&&['checkbox','radio'].test(this.type))||(['hidden','text','password'].test(this.type)))value=this.value;break;case'textarea':value=this.value}return value}});new Object.Native(Element);Element.extend({hasClassName:Element.prototype.hasClass,addClassName:Element.prototype.addClass,removeClassName:Element.prototype.removeClass,toggleClassName:Element.prototype.toggleClass});function $Element(el,method,args){if($type(args)!='array')args=[args];return Element.prototype[method].apply(el,args)};function $(el){if($type(el)=='string')el=document.getElementById(el);if($type(el)=='element'){if(!el.extend){Unload.elements.push(el);el.extend=Object.extend;el.extend(Element.prototype)}return el}else return false};window.addEvent=document.addEvent=Element.prototype.addEvent;window.removeEvent=document.removeEvent=Element.prototype.removeEvent;var Unload={elements:[],functions:[],vars:[],unload:function(){Unload.functions.each(function(fn){fn()});window.removeEvent('unload',window.removeFunction);Unload.elements.each(function(el){for(var p in Element.prototype){window[p]=null;document[p]=null;el[p]=null}el.extend=null})}};window.removeFunction=Unload.unload;window.addEvent('unload',window.removeFunction);var Ajax=ajax=new Class({setOptions:function(options){this.options={method:'post',postBody:null,async:true,onComplete:Class.empty,onStateChange:Class.empty,update:null,evalScripts:false};Object.extend(this.options,options||{})},initialize:function(url,options){this.setOptions(options);this.url=url;this.transport=this.getTransport()},request:function(){this.transport.open(this.options.method,this.url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if(this.options.method=='post'){this.transport.setRequestHeader('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType)this.transport.setRequestHeader('Connection','close')}switch($type(this.options.postBody)){case'element':this.options.postBody=$(this.options.postBody).toQueryString();break;case'object':this.options.postBody=Object.toQueryString(this.options.postBody)}if($type(this.options.postBody)=='string')this.transport.send(this.options.postBody);else this.transport.send(null);return this},onStateChange:function(){this.options.onStateChange.delay(10,this);if(this.transport.readyState==4&&this.transport.status==200){if(this.options.update)$(this.options.update).setHTML(this.transport.responseText);this.options.onComplete.pass([this.transport.responseText,this.transport.responseXML],this).delay(20);if(this.options.evalScripts)this.evalScripts.delay(30,this);this.transport.onreadystatechange=Class.empty;this.callChain()}},evalScripts:function(){if(scripts=this.transport.responseText.match(/<script[^>]*?>[\S\s]*?<\/script>/g)){scripts.each(function(script){eval(script.replace(/^<script[^>]*?>/,'').replace(/<\/script>$/,''))})}},getTransport:function(){if(window.XMLHttpRequest)return new XMLHttpRequest();else if(window.ActiveXObject)return new ActiveXObject('Microsoft.XMLHTTP')}});Ajax.implement(new Chain);Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&')};Element.extend({send:function(options){options=Object.extend(options,{postBody:this.toQueryString(),method:'post'});return new Ajax(this.getProperty('action'),options).request()},toQueryString:function(){var queryString=[];$A(this.getElementsByTagName('*')).each(function(el){var name=$(el).name;var value=el.getValue();if(value&&name)queryString.push(encodeURIComponent(name)+'='+encodeURIComponent(value))});return queryString.join('&')}});function $S(){var els=[];$A(arguments).each(function(sel){if($type(sel)=='string')els.extend(document.getElementsBySelector(sel));else if($type(sel)=='element')els.push($(sel))});return $Elements(els)};var $$=$S;function $E(selector,filter){return($(filter)||document).getElement(selector)};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector)};function $Elements(elements){return Object.extend(elements,new Elements)};Element.extend({getElements:function(selector){var filters=[];selector.clean().split(' ').each(function(sel,i){var bits=sel.test('^(\\w*|\\*)(?:#([\\w_-]+)|\\.([\\w_-]+))?(?:\\[["\']?(\\w+)["\']?(?:([\\*\\^\\$]?=)["\']?(\\w*)["\']?)?\\])?$');if(!bits)return;if(!bits[1])bits[1]='*';var param=bits.remove(bits[0]).associate(['tag','id','class','attribute','operator','value']);if(i==0){if(param['id']){var el=this.getElementById(param['id']);if(!el||((param['tag']!='*')&&($Element(el,'getTag')!=param['tag'])))return;filters=[el]}else{filters=$A(this.getElementsByTagName(param['tag']))}}else{filters=$Elements(filters).filterByTagName(param['tag']);if(param['id'])filters=$Elements(filters).filterById(param['id'])}if(param['class'])filters=$Elements(filters).filterByClassName(param['class']);if(param['attribute'])filters=$Elements(filters).filterByAttribute(param['attribute'],param['value'],param['operator'])},this);filters.each(function(el){$(el)});return $Elements(filters)},getElementById:function(id){var el=document.getElementById(id);if(!el)return false;for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){if(!parent)return false}return el},getElement:function(selector){return this.getElementsBySelector(selector)[0]},getElementsBySelector:function(selector){var els=[];selector.split(',').each(function(sel){els.extend(this.getElements(sel))},this);return $Elements(els)}});document.extend=Object.extend;document.extend({getElementsByClassName:function(className){return document.getElements('.'+className)},getElement:Element.prototype.getElement,getElements:Element.prototype.getElements,getElementsBySelector:Element.prototype.getElementsBySelector});var Elements=new Class({action:function(actions){this.each(function(el){el=$(el);if(actions.initialize)actions.initialize.apply(el);for(var action in actions){var evt=false;if(action.test('^on[\\w]{1,}'))el[action]=actions[action];else if(evt=action.test('([\\w-]{1,})event$'))el.addEvent(evt[1],actions[action])}})},filterById:function(id){var found=[];this.each(function(el){if(el.id==id)found.push(el)});return found},filterByClassName:function(className){var found=[];this.each(function(el){if($Element(el,'hasClass',className))found.push(el)});return found},filterByTagName:function(tagName){var found=[];this.each(function(el){found.extend($A(el.getElementsByTagName(tagName)))});return found},filterByAttribute:function(name,value,operator){var found=[];this.each(function(el){var att=el.getAttribute(name);if(!att)return;if(!operator)return found.push(el);switch(operator){case'*=':if(att.test(value))found.push(el);break;case'=':if(att==value)found.push(el);break;case'^=':if(att.test('^'+value))found.push(el);break;case'$=':if(att.test(value+'$'))found.push(el)}});return found}});new Object.Native(Elements);var Fx=fx={};Fx.Base=new Class({setOptions:function(options){this.options=Object.extend({onStart:Class.empty,onComplete:Class.empty,transition:Fx.Transitions.sineInOut,duration:500,unit:'px',wait:true,fps:50},options||{})},step:function(){var time=new Date().getTime();if(time<this.time+this.options.duration){this.cTime=time-this.time;this.setNow()}else{this.options.onComplete.pass(this.element,this).delay(10);this.clearTimer();this.callChain();this.now=this.to}this.increase()},set:function(to){this.now=to;this.increase();return this},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(from,to){return this.options.transition(this.cTime,from,(to-from),this.options.duration)},custom:function(from,to){if(!this.options.wait)this.clearTimer();if(this.timer)return;this.options.onStart.pass(this.element,this).delay(10);this.from=from;this.to=to;this.time=new Date().getTime();this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return this},clearTimer:function(){this.timer=$clear(this.timer);return this},setStyle:function(element,property,value){element.setStyle(property,value+this.options.unit)}});Fx.Base.implement(new Chain);Fx.Style=Fx.Base.extend({initialize:function(el,property,options){this.element=$(el);this.setOptions(options);this.property=property.camelCase()},hide:function(){return this.set(0)},goTo:function(val){return this.custom(this.now||0,val)},increase:function(){this.setStyle(this.element,this.property,this.now)}});Fx.Styles=Fx.Base.extend({initialize:function(el,options){this.element=$(el);this.setOptions(options);this.now={}},setNow:function(){for(var p in this.from)this.now[p]=this.compute(this.from[p],this.to[p])},custom:function(objFromTo){if(this.timer&&this.options.wait)return;var from={};var to={};for(var p in objFromTo){from[p]=objFromTo[p][0];to[p]=objFromTo[p][1]}return this.parent(from,to)},increase:function(){for(var p in this.now)this.setStyle(this.element,p,this.now[p])}});Element.extend({effect:function(property,options){return new Fx.Style(this,property,options)},effects:function(options){return new Fx.Styles(this,options)}});Fx.Transitions={linear:function(t,b,c,d){return c*t/d+b},sineInOut:function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b}};var Cookie={set:function(key,value,duration){var date=new Date();date.setTime(date.getTime()+((duration||365)*86400000));document.cookie=key+"="+value+"; expires="+date.toGMTString()+"; path=/"},get:function(key){var myValue,myVal;document.cookie.split(';').each(function(cookie){if(myVal=cookie.trim().test(key+'=(.*)'))myValue=myVal[1]});return myValue},remove:function(key){this.set(key,'',-1)}};var Json={toString:function(obj){var string=[];var isArray=function(array){var string=[];array.each(function(ar){string.push(Json.toString(ar))});return string.join(',')};var isObject=function(object){var string=[];for(var property in object)string.push('"'+property+'":'+Json.toString(object[property]));return string.join(',')};switch($type(obj)){case'number':string.push(obj);break;case'string':string.push('"'+obj+'"');break;case'function':string.push(obj);break;case'object':string.push('{'+isObject(obj)+'}');break;case'array':string.push('['+isArray(obj)+']')}return string.join(',')},evaluate:function(str){return eval('('+str+')')}};var Window={disableImageCache:function(){if(window.ActiveXObject)document.execCommand("BackgroundImageCache",false,true)},extend:Object.extend,getWidth:function(){return window.innerWidth||document.documentElement.clientWidth||0},getHeight:function(){return window.innerHeight||document.documentElement.clientHeight||0},getScrollHeight:function(){return document.documentElement.scrollHeight},getScrollWidth:function(){return document.documentElement.scrollWidth},getScrollTop:function(){return document.documentElement.scrollTop||window.pageYOffset||0},getScrollLeft:function(){return document.documentElement.scrollLeft||window.pageXOffset||0},onDomReady:function(init){var state=document.readyState;if(state&&document.childNodes&&!document.all&&!navigator.taintEnabled){if(state.test(/loaded|complete/))return init();else return Window.onDomReady.pass(init).delay(100)}else if(state&&window.ActiveXObject){var script=$('_ie_ready_');if(!script)document.write("<script id='_ie_ready_' defer='true' src='://'></script>");$('_ie_ready_').addEvent('readystatechange',function(){if(this.readyState=='complete')init()});return}else{var myInit=function(){if(arguments.callee.done)return;arguments.callee.done=true;init()};window.addEvent("load",myInit);document.addEvent("DOMContentLoaded",myInit)}}};Fx.Elements=Fx.Base.extend({initialize:function(elements,options){this.elements=[];elements.each(function(el){this.elements.push($(el))},this);this.setOptions(options);this.now={}},setNow:function(){for(var i in this.from){var iFrom=this.from[i];var iTo=this.to[i];var iNow=this.now[i]={};for(var p in iFrom)iNow[p]=this.compute(iFrom[p],iTo[p])}},custom:function(objObjs){if(this.timer&&this.options.wait)return;var from={};var to={};for(var i in objObjs){var iProps=objObjs[i];var iFrom=from[i]={};var iTo=to[i]={};for(var prop in iProps){iFrom[prop]=iProps[prop][0];iTo[prop]=iProps[prop][1]}}return this.parent(from,to)},increase:function(){for(var i in this.now){var iNow=this.now[i];for(var p in iNow)this.setStyle(this.elements[i.toInt()],p,iNow[p])}}});Fx.Accordion=Fx.Elements.extend({extendOptions:function(options){Object.extend(this.options,Object.extend({start:'open-first',fixedHeight:false,fixedWidth:false,alwaysHide:false,wait:false,onActive:Class.empty,onBackground:Class.empty,height:true,opacity:true,width:false},options||{}))},initialize:function(togglers,elements,options){this.parent(elements,options);this.extendOptions(options);this.previousClick='nan';togglers.each(function(tog,i){$(tog).addEvent('click',function(){this.showThisHideOpen(i)}.bind(this))},this);this.togglers=togglers;this.h={};this.w={};this.o={};this.elements.each(function(el,i){this.now[i]={};$(el).setStyles({'height':0,'overflow':'hidden'})},this);switch(this.options.start){case'first-open':this.elements[0].setStyle('height',this.elements[0].scrollHeight+this.options.unit);break;case'open-first':this.showThisHideOpen(0);break}},hideThis:function(i){if(this.options.height)this.h={'height':[this.elements[i].offsetHeight,0]};if(this.options.width)this.w={'width':[this.elements[i].offsetWidth,0]};if(this.options.opacity)this.o={'opacity':[this.now[i]['opacity']||1,0]}},showThis:function(i){if(this.options.height)this.h={'height':[this.elements[i].offsetHeight,this.options.fixedHeight||this.elements[i].scrollHeight]};if(this.options.width)this.w={'width':[this.elements[i].offsetWidth,this.options.fixedWidth||this.elements[i].scrollWidth]};if(this.options.opacity)this.o={'opacity':[this.now[i]['opacity']||0,1]}},showThisHideOpen:function(iToShow){if(iToShow!=this.previousClick||this.options.alwaysHide){this.previousClick=iToShow;var objObjs={};var err=false;var madeInactive=false;this.elements.each(function(el,i){this.now[i]=this.now[i]||{};if(i!=iToShow){this.hideThis(i)}else if(this.options.alwaysHide){if(el.offsetHeight==el.scrollHeight){this.hideThis(i);madeInactive=true}else if(el.offsetHeight==0){this.showThis(i)}else{err=true}}else if(this.options.wait&&this.timer){this.previousClick='nan';err=true}else{this.showThis(i)}objObjs[i]=Object.extend(this.h,Object.extend(this.o,this.w))},this);if(err)return;if(!madeInactive)this.options.onActive.call(this,this.togglers[iToShow],iToShow);this.togglers.each(function(tog,i){if(i!=iToShow||madeInactive)this.options.onBackground.call(this,tog,i)},this);return this.custom(objObjs)}}});var Prototype={Version:'CNET Prototype Lite, MooTools edition ver. 1.0',ScriptFragment:'(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}};Object.extend(String.prototype,{camelize:function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1)}return camelizedString}});var Position={cumulativeOffset:function(element){return[Element.getTop(),Element.getLeft()]}};if(!window.Event){var Event=new Object()}Object.extend(Event,{element:function(event){return event.target||event.srcElement},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation()}else{event.returnValue=false;event.cancelBubble=true}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))element=element.parentNode;return element},observe:function(element,name,observer,useCapture){if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))name='keydown';if(element==window)window.addEvent(name,observer);else if($(element))$(element).addEvent(name,observer)},stopObserving:function(element,name,observer,useCapture){if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))name='keydown';$(element).removeEvent(name,observer)},onDOMReady:function(f){Window.onDomReady(f)}});Object.extend(Element,{getDimensions:function(element){return $(element).getDimensions()},visible:function(element){return $(element).visible()},toggle:function(element){return $(element).toggle()},hide:function(element){return $(element).hide()},show:function(element){return $(element).show()},cleanWhitespace:function(element){return $(element).cleanWhitespace()},find:function(element,what){return $(element).find(what)},replace:function(element,html){$(element).replace(html)},empty:function(element){return $(element).empty()},hasClassName:function(element,className){return $(element).hasClassName(className)}});Ajax.Request=new Class({initialize:function(url,options){if(options.parameters)url+="?"+options.parameters;dbug.log('using legacy Ajax.Request object\n options: %1.o',options);if(options.onComplete){this.onCompleteFunction=options.onComplete;options.onComplete=this.onComplete.bind(this)}if(options.onFailure){this.onFailureFunction=options.onComplete;options.onFailure=this.onFailure.bind(this)}this.ajax=new ajax(url,options);this.transport=(ajax).transport},onComplete:function(){if(this.onCompleteFunction&&this.ajax.responseIsSuccess())this.onCompleteFunction(this.ajax.transport)},onFailure:function(){if(this.onFailureFunction&&this.ajax.responseIsFailure())this.onFailureFunction(this.ajax.transport)},request:function(url){this.ajax.request(url)},header:function(name){try{return this.ajax.transport.getResponseHeader(name)}catch(e){}},evalJSON:function(){try{return Json.evaluate(this.ajax.header('X-JSON'))}catch(e){}},evalResponse:function(){try{return Json.evaluate(this.ajax.transport.responseText)}catch(e){this.dispatchException(e)}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception)}});Ajax.Updater=Ajax.Request.extend({initialize:function(container,url,options){if(options.parameters)url+="?"+options.parameters;dbug.log('using legacy Ajax.Updater object\n options: %1.o',options);this.options=options;this.onComplete=options.onComplete||Class.empty;this.options.onComplete=(function(transport,object){this.updateContent();this.onComplete(transport,object)}).bind(this);this.containers={success:container.success?$(container.success):$(container),failure:container.failure?$(container.failure):(container.success?null:$(container))};this.options.fireNow=false;this.ajax=new ajax(url,options);this.transport=this.ajax.transport;this.ajax.request()},updateContent:function(){var receiver=this.ajax.responseIsSuccess()?this.containers.success:this.containers.failure;var response=this.transport.responseText;if(!this.options.evalScripts)response=response.stripScripts();if(receiver){$(receiver).setHTML(response)}}});$type.isNumber=function(val){if((typeof val!="undefined"&&typeof val=="number")||(typeof val!="boolean"&&(typeof val!="string"||val.length>0)&&isFinite(new Number(val))))return true;return false};$type.isSet=function(val){return(typeof val!="undefined"&&val!=null)};function $set(val,defaultVal){return $type.isSet(val)?val:defaultVal};$pick=$set;Array.extend({indexOf:function(item,from){from=from||0;if(from<0){from=this.length+from;if(from<0)from=0}while(from<this.length){if(this[from]===item)return from;from++}return-1}});Window.extend({isLoaded:false,getHost:function(url){url=$set(url,window.location.href);var host=url;if(url.indexOf('http://')>=0){url=url.substring(url.indexOf('http://')+7,url.length);if(url.indexOf(':'))url=url.substring(0,url.indexOf(":"));if(url.indexOf('/'))return url.substring(0,url.indexOf('/'));return url}return false},getQueryStringValue:function(key){var qs=window.location.search;if(qs=="")return null;if(qs.indexOf("?")==0)qs=qs.substring(1,qs.length);return qs.parseQuery()[key]},getPort:function(url){url=$set(url,window.location.href);var re=new RegExp(':([0-9]{4})');var m=re.exec(url);if(m==null)return false;else{var port=false;m.each(function(val){if($type.isNumber(val))port=val})}return port},disableIEBgCache:function(disable){try{document.execCommand('BackgroundImageCache',false,disable)}catch(e){}}});try{Event.onDOMReady(function(){Window.isLoaded=true})}catch(e){Event.observe(window,"load",function(){Window.isLoaded=true})}Window.disableIEBgCache(true);Window.popup=new Class({setOptions:function(options){this.options=Object.extend({width:500,height:300,x:50,y:50,toolbar:0,location:0,directories:0,status:0,scrollbars:'auto',resizeable:1,name:'popup'},options||{})},initialize:function(url,options){this.url=url||false;this.setOptions(options);if(this.url)this.openWin()},openWin:function(url){url=url||this.url;this.window=window.open(url,this.options.name,'toolbar='+this.options.toolbar+',location='+this.options.location+',directories='+this.options.directories+',status='+this.options.status+',scrollbars='+this.options.scrollbars+',resizable='+this.options.resizeable+',width='+this.options.width+',height='+this.options.height+',top='+this.options.y+',left='+this.options.x);this.focus();return this.window},focus:function(){this.window.focus()},close:function(){this.window.close()}});var legacyPopup=Window.popup.extend({setOptions:function(){this.parent();this.options=Object.extend({width:516,height:350},this.options)}});function openPop(url){return new legacyPopup(url)}var GetValue=Window.getQueryStringValue;String.extend({stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'')},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'')},evalScripts:function(){if(scripts=this.match(/<script[^>]*?>.*?<\/script>/g)){scripts.each(function(script){eval(script.replace(/^<script[^>]*?>/,'').replace(/<\/script>$/,''))})}},replaceAll:function(searchValue,replaceValue){var replaceRegex=new RegExp(searchValue,"g");var parsed=this.replace(replaceRegex,replaceValue);return parsed},urlEncode:function(){if(this.indexOf('%')>-1)return this;else return escape(this)},parseQuery:function(){var pairs=this.match(/^\??(.*)$/)[1].split('&');var params={};pairs.each(function(pair){pair=pair.split('=');params[pair[0]]=pair[1]});return params}});Element.extend({getDimensions:function(){return{width:this.getStyle('width',true),height:this.getStyle('height',true)}},visible:function(){return this.getStyle('display')!='none'},toggle:function(){return this[this.visible()?'hide':'show']()},hide:function(){this.originalDisplay=this.getStyle('display');this.setStyle('display','none');return this},show:function(display){this.setStyle('display',(display||this.originalDisplay||'block'));return this},cleanWhitespace:function(){$A(this.childNodes).each(function(node){if(node.nodeType==3&&!/\S/.test(node.nodeValue))node.parentNode.removeChild(node)});return this},find:function(what){var element=this[what];while(element.nodeType!=1)element=element[what];return element},replace:function(html){if(this.outerHTML){this.outerHTML=html.stripScripts()}else{var range=this.ownerDocument.createRange();range.selectNodeContents(this);this.parentNode.replaceChild(range.createContextualFragment(html.stripScripts()),this)}html.evalScripts.delay(10)},empty:function(){return!!this.innerHTML.match(/^\s*$/)},getOffsetHeight:function(){return this.offsetWidth},getOffsetWidth:function(){return this.offsetWidth}});Object.extend(Cookie,{set:function(key,value,duration,domain){var date=new Date();date.setTime(date.getTime()+((duration||365)*86400000));this.value=key+"="+value+"; expires="+date.toGMTString()+"; path=";this.value+=domain||"/";document.cookie=this.value}});var setCookie=Cookie.set;var getCookie=Cookie.get;var rbSetCookie=Cookie.set;function rbGetCookie(key){var val=Cookie.get(key);if($type(val))return unescape(val);else return false}Ajax.implement({initialize:function(url,options){this.setOptions(options);this.options.postBody=$set(this.options.postBody,'postBody is empty; this string added due to a FF bug; ignored');this.url=url;this.transport=this.getTransport();this.options.fireNow=$set(this.options.fireNow,true);this.tried=0;if(this.options.fireNow)this.autoRequest.delay(200,this)},autoRequest:function(){if(this.tried<10&&this.responseIsFailure()){this.tried++;(function(){try{this.request()}catch(e){dbug.log("error; auto fire trying again momentarily. error: %s",e);this.autoRequest()}}).delay(50,this)}else dbug.log('unable to fire ajax automatically')},responseIsSuccess:function(status){try{if(this.transport.readyState!=4||this.transport.status=="undefined"||(this.transport.status<200||this.transport.status>=300))return false;if((this.transport.responseText.indexOf("COMPONENT_RESPONSE_CODE")<0||this.transport.responseText.indexOf("COMPONENT_RESPONSE_CODE=200")>=0)&&this.transport.responseText.indexOf("<title>Page Not Found")<0){dbug.log('ajax request successful');return true}dbug.log('ajax request failed');return false}catch(e){return false}},responseIsFailure:function(){return!this.responseIsSuccess()},onStateChange:function(){if(this.transport.readyState==4&&this.responseIsSuccess()){if(this.options.update)$(this.options.update).setHTML(this.transport.responseText);this.options.onComplete.pass([this.transport.responseText,this.transport.responseXML],this).delay(20);if(this.options.evalScripts)this.evalScripts.delay(30,this);this.transport.onreadystatechange=Class.empty;this.callChain()}else if(this.transport.readyState==4&&this.responseIsFailure()){if($type(this.options.onFailure)=='function')this.options.onFailure.pass(this.transport,this).delay(20)}}});function fixPNG(myImage){try{var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body.filters)){myImage=$(myImage);var vis=myImage.visible();if(!vis)myImage.show();var width=$(myImage).offsetWidth;var height=$(myImage).offsetHeight;if(!vis)myImage.hide();var imgID=(myImage.id)?"id='"+myImage.id+"' ":"";var imgClass=(myImage.className)?"class='"+myImage.className+"' ":"";var imgTitle=(myImage.title)?"title='"+myImage.title+"' ":"title='"+myImage.alt+"' ";var imgStyle="display:inline-block;"+myImage.style.cssText;var strNewHTML="<span "+imgID+imgClass+imgTitle+" style=\""+"width:"+width+"px; height:"+height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+myImage.src+"\', sizingMethod='scale');\"></span>";myImage.outerHTML=strNewHTML}}catch(e){}};Event.onDOMReady(function(){$S('img.fixPNG').each(function(png){fixPNG(png)})});var iframeShim=new Class({initialize:function(options){this.options=options;el=options.element;var shim=new Element('iframe');this.id=options.name+"_shim";shim.id=this.id;try{if(!$(el).getStyle('z-Index'))$(el).setStyle('z-Index',0)}catch(e){$(el).setStyle('z-Index',0)}shim.setStyles({'position':'absolute','zIndex':$(el).getStyle('z-Index')-1,'border':'none','filter':'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'});shim.setAttribute('src','javascript:void(0);');shim.setAttribute('frameborder','0');shim.setAttribute('scrolling','no');shim.inject(el,'after');if(options.display)this.show();else this.hide();shim=null},position:function(shim){shim=shim||this.id;var el=this.options.element;var wasVis=$(el).visible();if(!wasVis)$(el).show();this.left=$(el).getLeft();this.top=$(el).getTop();this.width=$(el).offsetWidth;this.height=$(el).offsetHeight;if(!wasVis)$(el).hide();if($type(this.options.margin)){this.width=this.width-(this.options.margin*2);this.height=this.height-(this.options.margin*2);this.left=this.left+this.options.margin;this.top=this.top+this.options.margin}if($type(this.options.offset)){this.left=this.left-this.options.offset.left;this.top=this.top-this.options.offset.top}$(shim).setStyles({'left':this.left+'px','width':this.width+'px','height':this.height+'px','top':this.top+'px'})},hide:function(){$(this.id).hide()},show:function(){$(this.id).show();this.position()},remove:function(){$(this.id).remove()}});function imgMouseOverEvents(outString,overString,selector){$S(selector).each(function(image){image=$(image);if($type(image.src)){if(image.src.indexOf(outString)>0){image.addEvent('mouseover',function(){image.src=image.src.replace(outString,overString)}).addEvent('mouseout',function(){image.src=image.src.replace(overString,outString)})}}})};Event.onDOMReady(function(){imgMouseOverEvents('_off','_on','img.autoMouseOver')});Event.onDOMReady(function(){imgMouseOverEvents('_off','_on','input.autoMouseOver')});function tabMouseOvers(cssOn,cssOff,selector,subselector,applyToBoth){$S(selector).action({initialize:function(){this.applyToBoth=applyToBoth||false;if(!$test(subselector))this.addClassName(cssOff).removeClassName(cssOn);else{$A(this.getElementsBySelector(subselector)).each(function(el){el.addClassName(cssOff).removeClassName(cssOn)})}},onmouseover:function(){if(this.applyToBoth||!$test(subselector))this.addClassName(cssOn).removeClassName(cssOff);else{$A(this.getElementsBySelector(subselector)).each(function(el){el.addClassName(cssOn).removeClassName(cssOff)})}},onmouseout:function(){if(this.applyToBoth||!$test(subselector))this.addClassName(cssOff).removeClassName(cssOn);else{$A(this.getElementsBySelector(subselector)).each(function(el){el.addClassName(cssOff).removeClassName(cssOn)})}}})};var tabSwapper=new Class({initialize:function(options){this.options=Object.extend({name:null,initPanel:0,smooth:false,cookieName:null,cookieDays:999},options||{});this.sectionOpacities=[];if(!$type(this.options.clickSelector))this.options.clickSelector=this.options.tabSelector;this.setup();if(this.options.cookieName&&parseInt(this.recall()))this.swap(parseInt(this.recall()));else this.swap(this.options.initPanel)},setup:function(){var swapper=this;var opt=this.options;$S(opt.clickSelector).each(function(lnk,idx){lnk.addEvent('click',function(){swapper.swap(idx)})});if($type(opt.mouseoverClass)&&$type(opt.mouseoutClass))tabMouseOvers(opt.mouseoverClass,opt.mouseoutClass,opt.tabSelector);this.tabs=$S(opt.tabSelector);this.sections=$S(opt.sectionSelector)},swap:function(swapIdx){var opt=this.options;var swapper=this;this.tabs.each(function(tab,idx){if(swapIdx==idx)tab.addClassName(opt.selectedClass).removeClassName(opt.deselectedClass);else tab.addClassName(opt.deselectedClass).removeClassName(opt.selectedClass)});this.sections.each(function(sect,idx){if(swapIdx==idx)swapper.showSection(idx);else swapper.hideSection(idx)});if(opt.cookieName)this.save(swapIdx)},save:function(index){Cookie.set(this.options.cookieName,index,this.options.cookieDays)},recall:function(){return Cookie.get(this.options.cookieName)},hideSection:function(idx){var sect=this.sections[idx];if(sect.visible()){sect.hide()}sect=null},showSection:function(idx){var sect=this.sections[idx];var opacityFx=this.sectionOpacities[idx];if(!sect.visible()){if(this.options.smooth){if(!opacityFx)opacityFx=this.sections[idx].effect('opacity',{duration:500});opacityFx.set(0)}sect.show();if(this.options.smooth)opacityFx.custom(0,1)}sect=null;opacityFx=null}});var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));var is_nav6=(is_nav&&(is_major==5));var is_nav6up=(is_nav&&(is_major>=5));var is_gecko=(agt.indexOf('gecko')!=-1);var is_opera=(agt.indexOf("opera")!=-1);var is_fx=((agt.indexOf('mozilla/5')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1)&&(is_gecko)&&((navigator.vendor=="Firefox")||(agt.indexOf('firefox')!=-1)));var is_ffox=is_fx;var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var is_ie6=(is_ie&&(is_major==4)&&(agt.indexOf("msie 6.")!=-1));var is_ie7=(is_ie&&is_major==7);var is_ie7up=(is_ie&&is_minor>=7);var is_mac=(agt.indexOf("mac")!=-1);var is_safari=((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;var is_Flash=false;var is_FlashVersion=0;if((is_nav||is_opera||is_fx)||(is_mac&&is_ie5up)){var plugin=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin&&plugin.description){is_Flash=true;is_FlashVersion=parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))}}var rbCookies=[];var LocalVars={UserVars:new Class({initialize:function(specs){specs=specs||{};this.sentSpecs=specs;this.userName=(specs.userName&&specs.userName.trim()!='')?specs.userName.trim():false;this.userNameDisplay=(this.userName)?unescape(this.userName.replaceAll('\\\+',' ')):false;this.ursRegId=specs.ursRegId||false;this.loggedIn=parseInt(specs.loggedIn)||false;this.rememberMe=parseInt(specs.rememberMe)||false;this.getAllCookies()},getAllCookies:function(){this.cookies=[];if(document.cookie){var cks=document.cookie.split("; ");cks.each(function(ck){var cook=ck.split("=");rbCookies[cook[0]]=cook[1]})}rbCookies=this.cookies}}),PageVars:new Class({initialize:function(specs){specs=specs||{};this.sentSpecs=specs;this.pageType=($type.isNumber(specs.pageType))?new Number(specs.pageType):false;this.nodeId=($type.isNumber(specs.nodeId))?new Number(specs.nodeId):false;this.channelId=($type.isNumber(specs.channelId))?new Number(specs.channelId):false;this.siteId=($type.isNumber(specs.siteId))?new Number(specs.siteId):false;this.assetId=($type.isNumber(specs.assetId))?new Number(specs.assetId):false;this.editionId=($type.isNumber(specs.editionId))?new Number(specs.editionId):false;this.setOid()},setOid:function(){this.oid=($type.isNumber(this.pageType)&&$type.isNumber(this.nodeId)&&$type.isNumber(this.siteId)&&$type.isNumber(this.assetId))?this.pageType+"-"+this.nodeId+"_"+this.siteId+"-"+this.assetId:false}})};var UserVars={};var PageVars={};var LoginStatus=new Class({ssaIDs:[1,7,9,39,92],initialize:function(){this.retPath=escape(window.location.href);if(UserVars.loggedIn||UserVars.rememberMe){this.writeUserName();if(this.isSSA())this.genSSAProfileURL();$('uloginIn').show()}else{if(this.isSSA())this.primeApache();$('uloginOut').show();var loginShim=new iframeShim({element:'uloginForm',name:'uloginForm',display:false});try{Event.observe('uloginPass','keypress',function(e){if(e.keyCode==13)$('uloginForm').submit()})}catch(e){}}this.writePathArgs();this.assignToggle('rb_login_cancel',loginShim);this.assignToggle('openLogIn',loginShim)},isSSA:function(){return this.ssaIDs.test(PageVars.siteId)},writeUserName:function(){if(UserVars.userName){var profileLink=new Element('A');profileLink.appendText(UserVars.userNameDisplay).setProperties({id:'uniloginProfileName',href:$('uniloginProfile').href});$('welcomeString').appendText(', ').adopt(profileLink)}},genSSAProfileURL:function(){var profileURL=(UserVars.userName)?"http://my.cnet.com/community/"+UserVars.userName.replaceAll(' ','+')+"/?tag=unilog":"#";$('uniloginProfile').href=profileURL;try{$('uniloginProfileName').href=profileURL}catch(e){dbug.log(e)}},primeApache:function(){document.uloginForm.onsubmit=function(){new ajax(document.uloginForm.action,{postBody:$(document.uloginForm).toQueryString(),async:false})}},writePathArgs:function(){$S('#hd_unilogin a').each(function(anA){var sep=(anA.href.test(/\?/))?"&":"?";if(anA.href.test(/\/13\d{2}\-/))anA.href+=sep+"path="+this.retPath},this);try{var sep=($('uloginForm').action.test(/\?/))?"&":"?";$('uloginForm').action+=sep+"path="+this.retPath}catch(e){dbug.log("Attempting to add path to form action: %s",e)}},assignToggle:function(aLink,shim){if($(aLink)){$(aLink).href="javascript:void(0)";$(aLink).onclick=function(){if($('uloginForm').visible())document.uloginForm.reset();$('uloginForm').toggle();if($(shim.id).visible())shim.hide();else shim.show()}}}});function toggleLoginForm(){if($('uloginForm').visible())document.uloginForm.reset();$('uloginForm').toggle();if($('uloginForm_shim'))$('uloginForm_shim').toggle();return false};function rbSearch(options){try{this.options=Object.extend({host:Window.getHost(),oId:PageVars.oid,siteId:PageVars.siteId,userAction:37},options||{});$(this.options.formId).getElements('input').each(function(input){if(!$type(input.id))input.id=options.formId+'_'+input.name});$(this.options.formId).getElements('select').each(function(input){if(!$type(input.id))input.id=options.formId+'_'+input.name});this.setSearchAction=function(){this.searchType=$(this.options.searchDropDownId)[$(this.options.searchDropDownId).selectedIndex].value;if(this.searchType=='nw'||this.searchType=='http://cnet.search.com/search?chkpt=astg.cnet.fd.search.cnet')this.options.userAction=98;if(this.searchType=='wb'||this.searchType=='http://www.search.com/search?chkpt=astg.cnet.fd.search.web')this.options.userAction=97;if(this.options.siteId=='39'){this.options.searchURL='http://www.search.com/redirect';this.searchType+='kw='+escape($(this.options.formId).q.value)}if(this.options.siteId=='32'){this.options.searchURL='/3607-5_32-0.html';if(this.searchType=='3608')this.options.searchURL='/3608-5_32-0.html';if(this.searchType=='dl-20'||this.searchType=='dl-2012'||this.searchType=='nw'||this.searchType=='wb')this.options.searchURL='/3120-20_4-0.html'}if(this.options.siteId=='9'){if(this.searchType=='sh')this.options.searchUrl='/4144-5_9-0.html';if(this.searchType=='nw'||this.searchType=='wb')this.options.searchUrl='http://www.search.com/redirect'}return $(this.options.searchDropDownId).name+"="+this.searchType+"&"};this.getFormValues=function(){var qs='';$(this.options.formId).getElements("input").each(function(input){if(input.type=="text"||input.type=="hidden")qs+=input.name+"="+input.value+"&"});if(this.options.siteId=='9'){if(this.searchType=='nw')qs+="target=http://cnet.search.com/search?chkpt=astg.cnet.fd.search.cnet&";if(this.searchType=='wb')qs+="target=http://www.search.com/search?chkpt=astg.cnet.fd.search.web&"}return qs.substring(0,qs.length-1)};this.makeSearchURL=function(){this.setSearchAction();this.action=this.options.searchURL.indexOf("http:")<0?this.options.host+this.options.searchURL:this.options.searchURL;var seperator="?";if(this.action.indexOf("?")>0)seperator="&";this.destURL=this.action+seperator+escape(this.setSearchAction())+escape(this.getFormValues());this.redirURL='http://dw.com.com/redir?usraction='+this.options.userAction;if(this.options.oId)this.redirURL+='&oId='+this.options.oId;if($type.isNumber(this.options.siteId))this.redirURL+='&siteId='+this.options.siteId;this.redirURL+='&destUrl='+this.destURL;dbug.log('search url: '+this.redirURL);return this.redirURL};var rbs=this;this.execute=function(){if(window.location.href.indexOf('jsdebugsearch=true')<0)window.location.href=rbs.makeSearchURL();else rbs.makeSearchURL()};this.execute()}catch(e){dbug.log('rbsearch error: %s',e)}};function sendSearchRedirect2(host,action,formId,searchTypeId,oId,siteId){rbSearch({host:host,searchURL:action,formId:formId,searchDropDownId:searchTypeId,oid:oId,siteid:siteId})};dbug.loadtimeEnd('redball global framework');


/*	end packed code	*/

}
