function showPremiumOverlay(username){var ref_index=document.location.href.indexOf(document.location.host)+document.location.host.length;var ref=document.location.href.substr(ref_index);if(!username)username=0;var params='show_overlay=t&username='+username+'&ref='+escape(ref);showOverlay('/ajax/premium_overlay.php',params)}
function goToAnchor(anchor)
{window.location.hash='#'+anchor;}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires='; expires='+date.toGMTString();}
else expires='';document.cookie=name+'='+value+expires+'; path=/';}
function readCookie(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,'',-1);}
function bookmark(url,description)
{other="Please hit CTRL+D (simultaneously) to bookmark this site.";if(navigator.appName=='Microsoft Internet Explorer')
{window.external.AddFavorite(url,description);}
else
{alert(other);}}
function selectNavigate(box)
{destination=box.options[box.selectedIndex].value;if(destination)location.href=destination;}
function moodSelected(mood)
{document.getElementById('mood_level_prompt').innerHTML="How <b>"+mood+"</b>?";document.getElementById('mood_level_row').style.visibility="visible";}
function toggleThis(nr){if(!beingDrawn(nr)){if(document.getElementById(nr).style.display=='none'){markAsBeingDrawn(nr);new Effect2.BlindDown(nr,{duration:0.8,afterFinish:function(){unmarkAsBeingDrawn(nr);}});}
else{markAsBeingDrawn(nr);new Effect2.BlindUp(nr,{duration:0.8,afterFinish:function(){unmarkAsBeingDrawn(nr);}});}}}
function checkAll(form,field,value){for(var i=0;i<document.forms[form].elements[field].length;i++)
{if(value==1)
document.forms[form].elements[field][i].checked=true;else
document.forms[form].elements[field][i].checked=false;}
if(value==1)
return"Select None";else
return"Select All";}
function sorh(name)
{if(document.getElementById(name).style.display=="none")
document.getElementById(name).style.display="block";else document.getElementById(name).style.display="none";}
function sorh_inline(name,s)
{if(document.getElementById(name).style.display=="none")
document.getElementById(name).style.display="inline";else document.getElementById(name).style.display="none";}
function sorh_switch(show,h,s)
{if(document.getElementById(show).style.display=="none")
document.getElementById(show).style.display=s;else document.getElementById(show).style.display="none";document.getElementById(h).style.display="none";}
function openHelpWindow(val1,val2,val3,height)
{if(!height)
height=275;help_url="/help.php?hid="+val1+"&add1="+val2+"&add2="+val3;window.open(help_url,'help','width=300,height='+height+',top=200,left=200,resizable=1,scrollbars=1;');}
function openFlagWindow(type,id)
{flag_url="http://www.experienceproject.com/flag.php?t="+type+"&id="+id;options = "toolbar=0,scrollbars=0,resizable=1,top=100,left=100,width=800,height=600";mw=window.open(flag_url,'flag',options);mw.focus();}
function openAuxWindow(w_url,w_name)
{options = "toolbar=0,scrollbars=0,resizable=1,top=100,left=100,width=800,height=400";mw=window.open(w_url,w_name,options);mw.focus();}
function read_update(obj,arr,display_option)
{document.getElementById("authorDiv").style.display="none";document.getElementById("subtopicDiv").style.display="none";document.getElementById("searchDiv").style.display="none";if(obj.options[obj.selectedIndex].value=="Topic")
{document.getElementById("subtopicDiv").style.display=display_option;}
else if(obj.options[obj.selectedIndex].value=="Author")
{document.getElementById("authorDiv").style.display=display_option;}
else if(obj.options[obj.selectedIndex].value=="Popularity")
{document.getElementById("subtopicDiv").style.display=display_option;}
else if(obj.options[obj.selectedIndex].value=="Rating")
{document.getElementById("subtopicDiv").style.display=display_option;}
else if(obj.options[obj.selectedIndex].value=="Search")
{document.getElementById("searchDiv").style.display=display_option;}
update_dd(obj,arr);}
function update_dd(e,dd)
{for(j=1;j<dd.length;j++)
{dd[j][0]=true;}
for(j=1;j<dd[0].length;j++)
{for(i=1;i<dd.length;i++)
{current=dd[i][j].split("|");value=current[0];choice=current[0];if(current.length==2)choice=current[1];if(value!=document[dd[0][0]][dd[0][j]][document[dd[0][0]][dd[0][j]].selectedIndex].value)dd[i][0]=false;}
if(e==document[dd[0][0]][dd[0][j]])
{dropdown(j+1,dd);for(k=j+2;k<dd[0].length;k++)
{document[dd[0][0]][dd[0][k]].length=0;}
break;}}
if(document[dd[0][0]][dd[0][j+1]].length==1)
{document[dd[0][0]][dd[0][j+1]].disabled=true;}
else
{document[dd[0][0]][dd[0][j+1]].disabled=false;}}
function update_def(e,dd,def)
{for(j=1;j<dd.length;j++)
{dd[j][0]=true;}
for(j=1;j<dd[0].length;j++)
{for(i=1;i<dd.length;i++)
{current=dd[i][j].split("|");value=current[0];choice=current[0];if(current.length==2)choice=current[1];if(value!=document[dd[0][0]][dd[0][j]][document[dd[0][0]][dd[0][j]].selectedIndex].value)dd[i][0]=false;}
if(e==document[dd[0][0]][dd[0][j]])
{dropdown_def(j+1,dd,def);for(k=j+2;k<dd[0].length;k++)
{document[dd[0][0]][dd[0][k]].length=0;}
break;}}
if(document[dd[0][0]][dd[0][j+1]].length==1)
{document[dd[0][0]][dd[0][j+1]].disabled=true;}
else
{document[dd[0][0]][dd[0][j+1]].disabled=false;}}
function show_row($item)
{$arrow_str=$item+"_row_arrow_div";$div_left_str=$item+"_column_left_div";$div_right_str=$item+"_column_right_div";if(document.getElementById($div_left_str))
document.getElementById($div_left_str).style.display="block";if(document.getElementById($div_right_str))
document.getElementById($div_right_str).style.display="block";if(document.getElementById($arrow_str))
document.getElementById($arrow_str).style.display="block";}
function textLimiter(text,count)
{if(text.value.length>1000)
{text.value=text.value.substring(0,1000);}
else
{count.innerHTML=text.value.length;}}
function highlight_row($target,$prev)
{if($target)
{$left_col=$target+"_column_left";$right_col=$target+"_column_right";document.getElementById($left_col).style.border='thin solid green';document.getElementById($left_col).style.borderRight='0';document.getElementById($right_col).style.border='thin solid green';document.getElementById($right_col).style.borderLeft='0';}
if($prev)
{$left_col_prev=$prev+"_column_left";$right_col_prev=$prev+"_column_right";document.getElementById($left_col_prev).style.border='0';document.getElementById($right_col_prev).style.border='0';}}
function dropdown(item,dd)
{var pre1="";var j=1;document[dd[0][0]][dd[0][item]].options.length=0;document[dd[0][0]][dd[0][item]].options[0]=new Option('Select '+dd[0][item],'');for(i=1;i<dd.length;i++)
{if(dd[i][0]||item==1)
{current=dd[i][item].split("|");value=current[0];choice=current[0];if(current.length==2)choice=current[1];if(value!=pre1)
{var op=new Option(choice,value);document[dd[0][0]][dd[0][item]].options[j]=op;j++;pre1=value;}}}}
function dropdown_def(item,dd,def)
{var pre1="";var j=1;document[dd[0][0]][dd[0][item]].options.length=0;document[dd[0][0]][dd[0][item]].options[0]=new Option('Select '+dd[0][item],'');for(i=1;i<dd.length;i++)
{if(dd[i][0]||item==1)
{current=dd[i][item].split("|");value=current[0];choice=current[0];if(current.length==2)choice=current[1];if(value!=pre1)
{if(choice==def)
var op=new Option(choice,value,true);else
var op=new Option(choice,value);document[dd[0][0]][dd[0][item]].options[j]=op;j++;pre1=value;}}}}
function findOptionByValue($objSelect,$strValue)
{return findOption($objSelect,$strValue,'value');};function findOptionByText($objSelect,$strText)
{return findOption($objSelect,$strText,'text');};function findOption($objSelect,$strNeedle,$strSearch)
{var $_found=new Boolean(false);if($objSelect=='')
$objSelect=null;else if((typeof($objSelect))=='string')
$objSelect=document.getElementById($objSelect);if(($objSelect)&&($strNeedle)&&(($strSearch=='text')||($strSearch=='value')))
{for(var $i=0;$i<$objSelect.options.length;$i++)
{if($strSearch=='value')
$objHayStack=$objSelect[$i].value;else if($strSearch=='text')
$objHayStack=$objSelect[$i].text;if($objHayStack==$strNeedle)
{$_found=parseInt($i);break;}}}
return $_found;};Array.prototype.unique=function(b){var a=[],i,l=this.length;for(i=0;i<l;i++){if(a.indexOf(this[i],0,b)<0){a.push(this[i]);}}
return a;};Array.prototype.indexOf=function(v,b,s){for(var i=+b||0,l=this.length;i<l;i++){if(this[i]===v||s&&this[i]==v){return i;}}
return-1;};function copyTextArea(t){var ve=eval("document."+t)
ve.focus()
ve.select()
r=ve.createTextRange()
r.execCommand("Copy")}
function leftTrim(sString)
{while(sString.substring(0,1)==' ')
{sString=sString.substring(1,sString.length);}
return sString;}
function rightTrim(sString)
{while(sString.substring(sString.length-1,sString.length)==' ')
{sString=sString.substring(0,sString.length-1);}
return sString;}
function trimAll(sString)
{while(sString.substring(0,1)==' ')
{sString=sString.substring(1,sString.length);}
while(sString.substring(sString.length-1,sString.length)==' ')
{sString=sString.substring(0,sString.length-1);}
return sString;}
var cssdropdown={disappeardelay:250,disablemenuclick:true,enableswipe:1,enableiframeshim:1,dropmenuobj:null,ie:document.all,firefox:document.getElementById&&!document.all,swipetimer:undefined,bottomclip:0,getposOffset:function(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;},swipeeffect:function(){if(this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){this.bottomclip+=10+(this.bottomclip/10)
this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"}
else
return
this.swipetimer=setTimeout("cssdropdown.swipeeffect()",10)},showhide:function(obj,e){if(this.ie||this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if(e.type=="click"&&obj.visibility==hidden||e.type=="mouseover"){if(this.enableswipe==1){if(typeof this.swipetimer!="undefined")
clearTimeout(this.swipetimer)
obj.clip="rect(0 auto 0 0)"
this.bottomclip=0
this.swipeeffect()}
obj.visibility="visible"}
else if(e.type=="click")
obj.visibility="hidden"},iecompattest:function(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body},clearbrowseredge:function(obj,whichedge){var edgeoffset=0
if(whichedge=="rightedge"){var windowedge=this.ie&&!window.opera?this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if(windowedge-this.dropmenuobj.x<this.dropmenuobj.contentmeasure)
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth}
else{var topedge=this.ie&&!window.opera?this.iecompattest().scrollTop:window.pageYOffset
var windowedge=this.ie&&!window.opera?this.iecompattest().scrollTop+this.iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if(windowedge-this.dropmenuobj.y<this.dropmenuobj.contentmeasure){edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure)
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge}}
return edgeoffset},dropit:function(obj,e,dropmenuID){if(this.dropmenuobj!=null)
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if(this.ie||this.firefox){obj.onmouseout=function(){cssdropdown.delayhidemenu()}
obj.onclick=function(){return!cssdropdown.disablemenuclick}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style,e)
this.dropmenuobj.x=this.getposOffset(obj,"left")
this.dropmenuobj.y=this.getposOffset(obj,"top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj,"rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj,"bottomedge")+obj.offsetHeight+1+"px"
this.positionshim()}},positionshim:function(){if(this.enableiframeshim&&typeof this.shimobject!="undefined"){if(this.dropmenuobj.style.visibility=="visible"){this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"
this.shimobject.style.left=this.dropmenuobj.style.left
this.shimobject.style.top=this.dropmenuobj.style.top}
this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")?"block":"none"}},hideshim:function(){if(this.enableiframeshim&&typeof this.shimobject!="undefined")
this.shimobject.style.display='none'},contains_firefox:function(a,b){while(b.parentNode)
if((b=b.parentNode)==a)
return true;return false;},dynamichide:function(e){var evtobj=window.event?window.event:e
if(this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if(this.firefox&&e.currentTarget!=evtobj.relatedTarget&&!this.contains_firefox(evtobj.currentTarget,evtobj.relatedTarget))
this.delayhidemenu()},delayhidemenu:function(){this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'; cssdropdown.hideshim()",this.disappeardelay)},clearhidemenu:function(){if(this.delayhide!="undefined")
clearTimeout(this.delayhide)},startchrome:function(){for(var ids=0;ids<arguments.length;ids++){var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for(var i=0;i<menuitems.length;i++){if(menuitems[i].getAttribute("rel")){var relvalue=menuitems[i].getAttribute("rel")
menuitems[i].onmouseover=function(e){var event=typeof e!="undefined"?e:window.event
cssdropdown.dropit(this,event,this.getAttribute("rel"))}}}}
if(window.createPopup&&!window.XmlHttpRequest){document.write('<IFRAME id="iframeshim"  src="" style="display: none; left: 0; top: 0; z-index: 90; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)" frameBorder="0" scrolling="no"></IFRAME>')
this.shimobject=document.getElementById("iframeshim")}}}
function hilite_minipromo_tab(tab_id,hilite)
{if(hilite=='t'){document.getElementById(tab_id).style.borderBottom='1px solid #FFF';document.getElementById(tab_id).style.backgroundColor='#FFF';document.getElementById(tab_id).style.fontWeight='bold';}
else{document.getElementById(tab_id).style.borderBottom='1px solid #5F8BA1';document.getElementById(tab_id).style.backgroundColor='#DDD';document.getElementById(tab_id).style.fontWeight='normal';}}
function show_minipromo_questions(type){var params='question_type='+type;new Ajax.Updater('minipromo_questions','question-answer.php',{parameters:params})
var tabs=Array('recent','group','circle');for(var i=0;i<3;i++){var tab_id='minipromo_'+tabs[i];if(tabs[i]==type){hilite_minipromo_tab(tab_id,'t');}
else{hilite_minipromo_tab(tab_id,'f');}}}
function show_minipromo_stories(type,layout,view,logged_in,eid,adult_ok)
{switch(type){case'r':case'rc':case'rcf':case'p':case'h':case'f':var tabs=Array('r','h','p','rc','rcf','f');break;case'g':case'a':var tabs=Array('g','a');break;}
var i=0;var tab_id;var div_id;var target_tab_id;if(type=='rcf')
target_tab_id='minipromo_rc';else if(type=='h')
target_tab_id='minipromo_p';else
target_tab_id='minipromo_'+type;var target_div_id='minipromo_stories_'+type;if($(target_div_id).innerHTML==''){document.getElementById(target_div_id).innerHTML='<div class="minipromo_loading"><img src="/images/loading.gif" alt="Loading..." align=absmiddle /> <b>Loading Suggestions...<\/b><br>Please wait while we process this request. <\/div>';var url='/ajax_click/show_minipromo_stories.php';var params='type='+type+'&adult_ok='+adult_ok+'&eid='+eid+'&layout='+layout+'&view='+view+'&logged_in='+logged_in;var myAjax=new Ajax.Updater({success:target_div_id},url,{parameters:params});}
for(i=0;i<tabs.length;i++){tab_id='minipromo_'+tabs[i];div_id='minipromo_stories_'+tabs[i];if(document.getElementById(tab_id)!=null){if(tab_id==target_tab_id)
hilite_minipromo_tab(tab_id,'t');else
hilite_minipromo_tab(tab_id,'f');}
if(document.getElementById(div_id)!=null){if(div_id==target_div_id)
document.getElementById(div_id).style.display='block';else
document.getElementById(div_id).style.display='none';}}}
function handle_inappropriate_group_logo(gid,logo,thumbnail,stamp,mid,action)
{var target_div_id='igl_status';if($(target_div_id).innerHTML==''){document.getElementById('igl_status').innerHTML='<div class="igl_loading"><img src="/images/loading.gif" alt="Loading..." align=absmiddle /> <b>Handling Request...<\/b><br>Please wait while we process this request. </div>';var url='/ajax/handle_inappropriate_group_logo.php';var params='logo='+logo+'&gid='+gid+'&thumbnail='+thumbnail+'&stamp='+stamp+'&mid='+mid+'&action='+action;var myAjax=new Ajax.Updater({success:target_div_id},url,{parameters:params});}
$('inappropriate_gr_logo').style.display='none';$('inappropriate_gr_logo_switch').style.display='none';if(action=='reset')
$('group_profile_logo').style.display='none';}
function changeSubCategory(category,sorted){var params='cat='+category+'&sorted='+sorted;new Ajax.Updater('subcat','/ajax/categories.php',{parameters:params})}
function checkSelectedGroup(form_name,select_name,truncate,submit_form){if($(select_name).value==-1){window.open('/ajax/group_selector.php?form_name='+form_name+'&select_name='+select_name+'&truncate='+truncate+'&submit_form='+submit_form,select_name,'height=500,width=620,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes');}}
var CP=[[9433600000,10000],[1219045396919,905000],[4957328000000,257500000],[44893611600000,Number.MAX_VALUE]];var ExpCount;function updateExpCount(){if(!ExpCount){ExpCount=$("ExpCount");updateExpCount();}
var now=(new Date()).getTime();var i;for(i=0;i<CP.length;i++){if(now<CP[i][0]){break;}}
if(i==0){setTimeout(updateExpCount,1000);}else if(i==CP.length){ExpCount.innerHTML=CP[i-1][1];}else{var ts=CP[i-1][0];var bs=CP[i-1][1];ExpCount.innerHTML=addCommas(Math.round(((((now-ts)/(CP[i][0]-ts))*(CP[i][1]-bs))+bs)));var nr=Math.floor(Math.random()*3);setTimeout(updateExpCount,nr*1000);}}
function addCommas(nStr)
{nStr+='';x=nStr.split('.');x1=x[0];x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+','+'$2');}
return x1+x2;}
function charsLeft(str,maxlen,counter_id,description_id) {var count = maxlen - str.length;if (count < 0) count = 0;$(counter_id).innerHTML = count;if (count == 0) $(description_id).value = str.substring(0, maxlen-1);}
function doContentRecVote(id,vote,content_type){var url='/ajax/content_vote.php';var pars='id='+id+'&t='+content_type+'&v='+vote;var myAjax=new Ajax.Updater({success: 'totalvotes_'+content_type+'_'+id},url,{method: 'get',parameters: pars});}function completeContentVote(id,vote,content_type){if(vote==1){$('voteup_'+content_type+'_'+id).innerHTML="<span id='voted_"+content_type+"_"+id+"'><img src='/images/emoticon_smile.png' border='0' align='absmiddle' alt='You liked this comment!'>You liked this![<a href='javascript:void(0)' onclick='doContentRecVote("+id+",0,\""+content_type+"\");changeContentVote("+id+",0,\""+content_type+"\");'>change</a>]</span>";$('votedown_'+content_type+'_'+id).innerHTML="";}else{$('votedown_'+content_type+'_'+id).innerHTML="<span id='voted_"+content_type+"_"+id+"'><img src='/images/emoticon_unhappy.png' border='0' align='absmiddle' alt='You did not like this comment.'>You did not like this.[<a href='javascript:void(0)' onclick='doContentRecVote("+id+",1,\""+content_type+"\");changeContentVote("+id+",1,\""+content_type+"\");'>change</a>]</span>";$('voteup_'+content_type+'_'+id).innerHTML="";}}function changeContentVote(id,vote,content_type){if(vote==1){changevote=0;votestatus='recommended';}else{changevote=1;votestatus='not recommended';}$('voted_'+content_type+'_'+id).innerHTML="Your vote was changed(to <b>"+votestatus+"</b>).[<a href='javascript:void(0)' onclick='doContentRecVote("+id+","+changevote+",\""+content_type+"\");changeContentVote("+id+","+changevote+",\""+content_type+"\");'>change</a>]";}
//function showOverlay(popup_file_url,params){new Ajax.Updater( 'popup', popup_file_url, { parameters:params, evalScripts:true, onComplete:function(){centerOverlayElement('popup');}});}
function showOverlay(val1,val2,val3,val4,val5,height,width,element){var ref_index = document.location.href.indexOf(document.location.host) + document.location.host.length;var ref = document.location.href.substr(ref_index);var params='id='+val1+'&val2='+val2+'&val3='+val3+'&val4='+val4+'&val5='+val5+'&height='+height+'&width='+width+'&ref='+escape(ref);if (!element) { element='popup'; } new Ajax.Updater( element, '/ajax/overlay.php', { parameters:params, evalScripts:true, onComplete:function(){centerOverlayElement(element);}});}
function centerOverlayElement(element){var main_module_width=1000;var ro_top_offset;var center_offset;if($(element)!=null){if(typeof window.innerHeight!='undefined'){ro_top_offset=Math.round(document.viewport.getScrollOffsets().top);center_offset=Math.round(document.viewport.getScrollOffsets().left+(window.innerWidth-$(element).getWidth())/2);}
else{if(typeof document.documentElement.clientHeight!='undefined'&&document.documentElement.clientHeight>0)
ro_top_offset=Math.round(document.documentElement.scrollTop);else
ro_top_offset=Math.round(document.body.scrollTop);center_offset=Math.round(document.body.scrollLeft+(($$('body')[0].clientWidth-$(element).getWidth()))/2);}
new Effect.Move(element,{x:center_offset,y:ro_top_offset,mode:'absolute'});}}
var cfs=14;function changeFontSize(div_el,inc){if(inc){cfs=cfs+1;}else{cfs=cfs-2;} $(div_el).style.fontSize=cfs+'px';}
function recordCommentVote(type,comment_id,vote){new Ajax.Request('/ajax/content_vote.php',{parameters:{t:type,id:comment_id,v:vote,style:'new'},onSuccess:function(response){if(vote==1){$('c_'+comment_id).innerHTML='You liked this!';}else if(vote==0){$('c_'+comment_id).innerHTML='You did not like this.';} $('c_'+comment_id).innerHTML+=' Rated '+response.responseText+'';}});}
function addToCircle(target_mid,update_element,undo){var undo=(undo==null)?false:undo;var params='target_mid='+target_mid+'&undo='+undo;$(update_element).update('Adding <img src=\"/images/loading.gif\" align=\"absmiddle\" border=\"0\"/>');new Ajax.Updater(update_element,'/ajax/add_friend.php',{parameters:params})}
function recordFavorite(id,type,update_element){var params='id='+id+'&type='+type;$(update_element).update('Saving <img src=\"/images/loading.gif\" align=\"absmiddle\" border=\"0\"/>');new Ajax.Updater(update_element,'/ajax/add_to_library.php',{parameters:params})}
function recordVote(type,id,vote,update_element){if($('rate_content_tool_sidebar')!=undefined){$('rate_content_tool_sidebar').update('Rating <img src=\"/images/loading.gif\" align=\"absmiddle\" border=\"0\"/>');}
var params='t='+type+'&id='+id+'&v='+vote+'&style=new';new Ajax.Updater(update_element,'/ajax/content_vote.php',{parameters:params,evalScripts:true})}
function sidebarTabPagination(module_name,tab_name,param_string){$('wraparound_div').update('<div style=\"padding:10px;\">Loading... <img src=\"/images/loading.gif\" align=\"absmiddle\" border=\"0\"/></div>');var params='module_name='+module_name+'&tab_name='+tab_name+'&param_string='+escape(param_string);new Ajax.Updater('wraparound_div','/ajax/sidebar_tab_handler.php',{parameters:params})}
function sortComments(selected,url,url_modifier){url+=(url.indexOf('?')==-1)?'?':'&';url+='comment-sort='+selected;if(url_modifier)url+=url_modifier;document.location.href=url;}
function showRegistrationOverlay(page_views){var ref_index=document.location.href.indexOf(document.location.host)+document.location.host.length;var ref=document.location.href.substr(ref_index);if(!page_views)page_views=0;var jsref=document.createElement('script')
jsref.setAttribute("type","text/javascript")
jsref.setAttribute("src","http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US");if(typeof jsref!="undefined")
document.getElementsByTagName("body")[0].appendChild(jsref);var params='show_overlay=t&page_views='+page_views+'&ref='+escape(ref);new Ajax.Updater('popup','/ajax/registration_overlay.php',{parameters:params,evalScripts:true,onComplete:function(){centerOverlayElement('popup');}});}