var FLEX_player=new function(){this.player="andostream";this.width=600;this.height=404;this.getURL=function(){switch(this.player){case"andostream":return"/common/player/andostream.php";break;default:return false;break}};this.launch=function(c){if(c!=undefined){if(c.width!=undefined){this.width=parseInt(c.width)}if(c.height!=undefined){this.height=parseInt(c.height)}if(c.player!=undefined){this.player=c.player}}var b=this.getURL();if(b!==false&&this.width>0&&this.height>0){var a=window.open(b,"player_win","width="+this.width+",height="+this.height+",menubar=no,resizable=no,scrollbars=no,toolbar=no");return false}}};function Ajax(){this.req=null;this.url=null;this.method="GET";this.async=true;this.status=null;this.statusText="";this.postData=null;this.readyState=null;this.responseText=null;this.responseXML=null;this.handleResp=null;this.responseFormat="text",this.mimeType=null;this.init=function(){if(!this.req){try{this.req=new XMLHttpRequest()}catch(a){try{this.req=new ActiveXObject("MSXML2.XMLHTTP")}catch(a){try{this.req=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return false}}}}return this.req};this.doReq=function(){if(!this.init()){alert("Could not create XMLHttpRequest object.");return}this.req.open(this.method,this.url,this.async);var a=this;if(this.method=="POST"){this.req.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}this.req.onreadystatechange=function(){if(a.req.readyState==4){switch(a.responseFormat){case"text":resp=a.req.responseText;break;case"xml":resp=a.req.responseXML;break;case"object":resp=req;break}if(a.req.status>=200&&a.req.status<=299){a.handleResp(resp)}else{a.handleErr(resp)}}};this.req.send(this.postData)};this.doGet=function(b,a,c){this.url=b;this.handleResp=a;this.responseFormat=c||"text";this.method="GET";this.doReq()};this.doPost=function(b,a,c){this.url=b.substring(0,b.indexOf("?"));this.handleResp=a;this.responseFormat=c||"text";this.method="POST";this.postData=b.substring(b.indexOf("?")+1,b.length);this.doReq()};this.abort=function(){if(this.req){this.req.onreadystatechange=function(){};this.req.abort();this.req=null}};this.setHandlerBoth=function(a){this.handleResp=a;this.handleErr=a};this.setHandlerErr=function(a){this.handleErr=a};this.handleErr=function(){var a;try{a=window.open("","errorWin");a.document.body.innerHTML=this.responseText}catch(b){alert("An error occurred, but the error message cannot be displayed. This is probably because of your browser's pop-up blocker.\nPlease allow pop-ups from this web site if you want to see the full error messages.\n\nStatus Code: "+this.req.status+"\nStatus Description: "+this.req.statusText)}};this.setMimeType=function(a){this.mimeType=a}}var xhtmlTools={make:function(f,a,d){if(arguments.length==2&&(a instanceof Array||typeof a=="string")){d=a;a=null}var g=document.createElement(f);if(a){for(var b in a){switch(b){case"class":g.className=a[b];break;case"onclick":if(window.addEventListener){g.addEventListener("click",a[b],false)}else{g.attachEvent("onclick",a[b],false)}break;case"onchange":if(window.addEventListener){g.addEventListener("change",a[b],false)}else{g.attachEvent("onchange",a[b],false)}break;default:g.setAttribute(b,a[b]);break}}}if(d!=null){if(d instanceof Array){for(var c=0;c<d.length;c++){var h=d[c];if(typeof h=="string"){h=document.createTextNode(h)}g.appendChild(h)}}else{if(typeof d=="string"){g.appendChild(document.createTextNode(d))}else{g.appendChild(d)}}}return g},maker:function(a){return function(c,b){if(arguments.length==1){return xhtmlTools.make(a,c)}else{return xhtmlTools.make(a,c,b)}}}};function insertAtCursor(d,c){if(document.selection){d.focus();sel=document.selection.createRange();sel.text=c}else{if(d.selectionStart||d.selectionStart=="0"){var b=d.selectionStart;var a=d.selectionEnd;d.value=d.value.substring(0,b)+c+d.value.substring(a,d.value.length)}else{d.value+=c}}}var html_tags={div:xhtmlTools.maker("div"),textarea:xhtmlTools.maker("textarea"),p:xhtmlTools.maker("p"),span:xhtmlTools.maker("span"),p:xhtmlTools.maker("p"),form:xhtmlTools.maker("form"),input:xhtmlTools.maker("input"),a:xhtmlTools.maker("a"),ul:xhtmlTools.maker("ul"),select:xhtmlTools.maker("select"),option:xhtmlTools.maker("option"),img:xhtmlTools.maker("img"),li:xhtmlTools.maker("li"),table:xhtmlTools.maker("table"),thead:xhtmlTools.maker("thead"),tbody:xhtmlTools.maker("tbody"),tr:xhtmlTools.maker("tr"),th:xhtmlTools.maker("th"),td:xhtmlTools.maker("td"),br:xhtmlTools.maker("br"),h1:xhtmlTools.maker("h1"),h2:xhtmlTools.maker("h2"),h3:xhtmlTools.maker("h3"),h4:xhtmlTools.maker("h4")};var messagedisplayed=false;var util={schemes:{critical:{bgcolor:"#cc0000",fgcolor:"#FFF",icon:"/common/images/icons/48x48/plain/delete.gif"},warning:{bgcolor:"#FFFF99",fgcolor:"#000",icon:"/common/images/icons/48x48/plain/biginfo.gif"},success:{bgcolor:"#71ed6e",fgcolor:"#003300",icon:"/common/images/icons/48x48/plain/check.gif"},fatal:{bgcolor:"#000",fgcolor:"#FFF",icon:"/common/images/icons/48x48/plain/craig.gif"},funny:{bgcolor:"#98ccfc",fgcolor:"brown",icon:"/common/images/icons/48x48/plain/guy.gif"}},convert_smart_quotes:function(a){a=a.replace(/\u2018/g,"'");a=a.replace(/\u2019/g,"'");a=a.replace(/\u201c/g,'"');a=a.replace(/\u201d/g,'"');a=a.replace(/\u2013/g,"-");a=a.replace(/\u2014/g,"--");return a},getDomain:function(){var a=document.location;a=a.toString();return a.substr(0,a.indexOf("/admin/"))},getMousePosition:function(b){var a=0;var c=0;if(!b){var b=window.event}if(b.pageX||b.pageY){a=b.pageX;c=b.pageY}else{if(b.clientX||b.clientY){a=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;c=b.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{posx:a,posy:c}},scrollMessage:function(){var d=document.getElementById("messages");if(messagedisplayed==false){var c=document.getElementsByTagName("select");for(i=0;i<c.length;i++){if(util.findPosY(c[i])<100){c[i].style.visibility="hidden"}}messagedisplayed=true;var b=d.innerHTML;if(this.scheme=="funny"){b="Something Funny Happened!<br />"+b}d.innerHTML='<table border="0" cellpadding="5" cellspacing="0" width="100%" height="100"><tr><td valign="middle" style="width:60px"><a href="javascript:util.hideMessage()" title="Click to close"><img src="'+this.schemes[this.scheme].icon+'" border="0" alt="Click to Close"/></a></td><td valign="middle"><div onclick="util.hideMessage()" title="Click to close" style="margin-right:60px;text-align:center;">'+b+"</div></td></tr></table>"}var a=util.get_pageOffset();if(d.offsetTop<a.y-10){d.style.top=(d.offsetTop+10)+"px";setTimeout("util.scrollMessage()",20);return}else{window.onscroll=util.adjustMessage}},adjustMessage:function(){var a=util.get_pageOffset();var b=document.getElementById("messages");b.style.top=a.y+"px";window.onscroll=util.adjustMessage},hideMessage:function(){var b=document.getElementById("messages");if(b.offsetTop>=-1*(b.offsetHeight)){b.style.top=(b.offsetTop-10)+"px";setTimeout("util.hideMessage()",20);return}var a=document.getElementsByTagName("select");for(i=0;i<a.length;i++){if(util.findPosY(a[i])<=105){a[i].style.visibility="visible"}}window.onscroll=null;messagedisplayed=false},setMessage:function(d){var a=util.setMessage.arguments[1];if(a==""||a==undefined){a="warning"}this.scheme=a;if(!document.getElementById("messages")){var b=document.createElement("div");b.id="messages";b.style.visibility="visible";b.style.top="-100px";b.style.left="0px";b.style.width=(document.all?document.body.offsetWidth:document.documentElement.offsetWidth)+"px";b.style.MozOpacity=0.95;b.style.filter="alpha(opacity=95);";b.style.opacity=0.95;b.style.font="bold 15px 'Microsoft Sans Serif',Verdana,sans-serif";b.style.color=this.schemes[a].fgcolor;b.style.position="absolute";b.style.zIndex="5000000";b.style.textAlign="center";b.style.height="99px";b.style.backgroundColor=this.schemes[a].bgcolor;b.style.borderBottom="1px solid #C0C0C0";b.onclick=function(){util.hideMessage()};b.innerHTML=d;document.body.appendChild(b)}else{if(messagedisplayed==false){var c=document.getElementById("messages");c.innerHTML=d}}},get_pageOffset:function(){var a,b;if(window.pageYOffset){a=window.pageXOffset;b=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollLeft;b=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollLeft;b=document.body.scrollTop}}}return{x:a,y:b}},disableElements:function(b){for(i=0;i<b.length;i++){var c=document.getElementById(b[i]);if(c){if(!document.getElementById("disabler"+i)){var a=document.createElement("div");a.id="disabler"+i;document.body.appendChild(a)}else{var a=document.getElementById("disabler"+i)}a.style.position="absolute";a.style.top=util.findPosY(c)+"px";a.style.left=util.findPosX(c)+"px";a.style.width=c.offsetWidth+"px";a.style.height=c.offsetHeight+"px";a.style.zIndex=2000000;a.style.overflow="hidden";a.style.MozOpacity=0.75;a.title="This element is disabled";a.style.opacity=0.75;a.style.filter="alpha(opacity=75)";a.style.backgroundColor="#FFF"}}},findPosX:function(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b},findPosY:function(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a},popupWin:function(c,f,g){var b=util.popupWin.arguments[3];var e=util.popupWin.arguments[4];var d="no";if(!e){d="no"}else{d=e}if(b==null){b="cms_popup_win"}var a=window.open(c,b,"modal=yes,width="+g+",height="+(f)+",screenX="+(screen.width/2-g/2)+",left="+(screen.width/2-g/2)+",screenY="+(screen.height/2-(f/2+50))+",top="+(screen.height/2-(f/2+50))+",toolbar=no,status=yes,scrollbars=yes,resizable="+e)},fixSelBoxes:function(){var a=document.getElementsByTagName("select");for(i=0;i<a.length;i++){a[i].style.width="auto"}for(i=0;i<a.length;i++){a[i].style.width=(a[i].parentNode.offsetWidth)+"px"}},trim:function(a){return a.replace(/^\s+|\s+$/,"")}};var RDGonloader=new function(){this.functions=new Array();this.add=function(func){RDGonloader.functions.push(func)};this.init=function(){for(var i in RDGonloader.functions){eval(RDGonloader.functions[i])}}};media={writeFlash:function(d,a,c,b){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+a+'" height="'+c+'" id="mainMovie" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+d+'" /><param name="quality" value="high" /><param name="bgcolor" value="'+b+'" /><embed src="'+d+'" quality="high" bgcolor="'+b+'" width="'+a+'" height="'+c+'" name="mainMovie" swLiveConnect="true" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>')}};var formsUser=new function(){this.forms=[];this.register=function(a){this.forms[a]=new rdg_form;this.forms[a].form_id=a};this.addField=function(a,c,d,e,b){this.forms[a].addField(c,d,e,b)};this.submit=function(a){this.forms[a].submitForm()}};function rdg_form(){this.ajax=new Ajax();this.fields=[];this.form_id=null;this.errs=[];this.submitted=false;this.addField=function(b,c,d,a){this.fields.push({id:b,type:c,reqd:d,label:a})};this.submitForm=function(){if(!this.submitted){this.submitted=true;var a=false;var h=document.getElementById("form_"+this.form_id);var n=this.form_id;var m=false;var g="&form_id="+this.form_id;g+="&comments="+escape(h.elements.comments.value);g+="&email_address="+escape(h.elements.email_address.value);g+="&subject="+escape(h.elements.subject.value);for(d=0;d<this.fields.length;d++){switch(this.fields[d]["type"]){case"birthdate":case"date":if(this.fields[d]["reqd"]>0&&(h.elements["fields["+this.fields[d]["id"]+"][month]"].value==""||h.elements["fields["+this.fields[d]["id"]+"][day]"].value==""||h.elements["fields["+this.fields[d]["id"]+"][year]"].value=="")){this.errs.push(this.fields[d]["label"]+" is a required field")}g+="&fields["+this.fields[d]["id"]+"][month]="+h.elements["fields["+this.fields[d]["id"]+"][month]"].value;g+="&fields["+this.fields[d]["id"]+"][day]="+h.elements["fields["+this.fields[d]["id"]+"][day]"].value;g+="&fields["+this.fields[d]["id"]+"][year]="+h.elements["fields["+this.fields[d]["id"]+"][year]"].value;break;case"file":a=true;break;case"radio":var e=false;for(var b=0;b<h.elements["fields["+this.fields[d]["id"]+"]"].length;b++){if(h.elements["fields["+this.fields[d]["id"]+"]"][b].checked){e=h.elements["fields["+this.fields[d]["id"]+"]"][b].value}}if(this.fields[d]["reqd"]>0&&!e){this.errs.push(this.fields[d]["label"]+" is a required field")}g+="&fields["+this.fields[d]["id"]+"]="+e;break;case"checkbox":if(this.fields[d]["reqd"]>0&&!h.elements["fields["+this.fields[d]["id"]+"]"].checked){this.errs.push(this.fields[d]["label"]+" is a required field")}g+="&fields["+this.fields[d]["id"]+"]="+(h.elements["fields["+this.fields[d]["id"]+"]"].checked?1:0);break;case"email":case"textbox":case"textarea":default:if(this.fields[d]["reqd"]>0&&h.elements["fields["+this.fields[d]["id"]+"]"].value==""){this.errs.push(this.fields[d]["label"]+" is a required field")}g+="&fields["+this.fields[d]["id"]+"]="+escape(h.elements["fields["+this.fields[d]["id"]+"]"].value);break}}if(this.errs.length>0){var l="";for(var d=0;d<this.errs.length;d++){l+='<p class="error">'+this.errs[d]+"</p>"}var k=document.getElementById("form_"+this.form_id+"_errors");k.innerHTML=l;k.style.display="block";this.submitted=false;this.errs=[]}else{if(a){h.submit()}else{(function(c){c.post("/common/forms/ajax_handler.php",c("#form_"+n).serialize(),function(f){finishFormSubmit(f)},"xml")})(jQuery)}}}}}function finishFormSubmit(n){var f=n;var l=f.documentElement;var k=false;var m=l.getAttribute("form_id");for(var e=0;e<l.childNodes.length;e++){switch(l.childNodes[e].nodeName){case"errors":var b=l.childNodes[e].getAttribute("url");if(l.childNodes[e].childNodes.length>0){k=true;var a=false;var h="";for(var d=0;d<l.childNodes[e].childNodes.length;d++){if(l.childNodes[e].childNodes[d].nodeName=="error"){if(l.childNodes[e].childNodes[d].firstChild.nodeValue=="User is under age"){a=true}h+='\n<p class="error">'+l.childNodes[e].childNodes[d].firstChild.nodeValue+"</p>"}}if(a&&b!=""){document.location.href=b}else{var g=document.getElementById("form_"+m+"_errors");g.innerHTML=h;g.style.display="block"}}break;case"message":if(!k){var g=document.getElementById("form_"+m+"_container");g.innerHTML=l.childNodes[e].firstChild.nodeValue}break}}}function scroller(d,c,b,a){this.id=d;this.c=null;this.m=null;this.left=0;this.width=0;this.items=a;this.index=0;this.speed=b;this.tim=20;this.px=4;this.hspeeds=[[1,20],[1,16],[1,13],[2,20],[2,16],[2,13],[3,20],[3,16],[3,13],[4,20]];this.vspeeds=[[1,40],[1,34],[1,27],[2,40],[2,34],[2,27],[3,40],[3,34],[3,27],[4,40]];this.tmp_px=0;this.mode=c;this.move=function(){switch(this.mode){case"horizontal":this.left-=this.px;if(this.left<0-this.m.offsetWidth){this.index=(this.index+1)%this.items.length;this.start()}else{this.m.style.left=this.left+"px";var e=this;setTimeout(function(){e.move()},this.tim)}break;case"vertical":this.top-=this.px;if(this.top<0-this.m.offsetHeight){this.index=(this.index+1)%this.items.length;this.start()}else{this.m.style.top=this.top+"px";var e=this;setTimeout(function(){e.move()},this.tim)}break}};this.click=function(){document.location.href=this.items[this.index][1]};this.start=function(){var e=this;if(this.items[this.index][1]!=""){this.m.onclick=function(){e.click()}}else{this.m.onclick=function(){}}switch(this.mode){case"horizontal":this.m.style.left=this.c.offsetWidth+"px";this.left=this.c.offsetWidth;break;case"vertical":this.top=this.c.offsetHeight;this.m.style.top=this.top+"px";break}this.m.innerHTML=this.items[this.index][0];this.m.style.display="inline";this.move()};this.mouseover=function(){this.tmp_px=this.px;this.px=0;if(this.items[this.index][1]!=""){this.m.className="over"}};this.mouseout=function(){this.px=this.tmp_px;this.m.className="default"};this.load=function(e){this.items.push(e)};this.init=function(){if(this.items.length>0){var e=this;this.m=document.getElementById(this.id);this.c=document.getElementById(this.id).parentNode;this.speed--;switch(this.mode){case"horizontal":this.px=this.hspeeds[this.speed][0];this.tim=this.hspeeds[this.speed][1];break;case"vertical":this.px=this.vspeeds[this.speed][0];this.tim=this.vspeeds[this.speed][1];break}this.m.onmouseover=function(){e.mouseover()};this.m.onmouseout=function(){e.mouseout()};this.start()}}}var wm_polls=[];function poll_slot(b,a,c){this.ajax=new Ajax();this.slot_id=b;this.page_id=a;this.poll_id=c;this.questions=[];this.init()}poll_slot.prototype.init=function(){var a=this;(function(b){b.get("/common/ajax.php",{t:"poll",xaction:"poll",slot_id:a.slot_id,page_id:a.page_id,poll_id:a.poll_id},a.getPoll,"xml")})(jQuery)};poll_slot.prototype.getPoll=function(a){var g=a;var b=g.documentElement;var c=b.getAttribute("slot_id");var e="";x=b.firstChild;while(x){var d=x.getAttribute("q_id");var f=x.getAttribute("display_results");wm_polls[c].questions[d]=new poll_question(c,d,f);y=x.firstChild;while(y){switch(y.nodeName){case"html":e=e+y.firstChild.nodeValue;break;case"answer":wm_polls[c].questions[d].AddAnswer(new poll_answer(y.getAttribute("id"),y.getAttribute("votes")));break}y=y.nextSibling}x=x.nextSibling}document.getElementById("poll_"+c+"_container").innerHTML=e};function poll_answer(b,a){this.a_id=b;this.votes=a;this.pct=5}poll_answer.prototype.incrementPCT=function(c){if(c>0){document.getElementById("answer_"+this.a_id+"_bar").style.width=this.pct+"%";this.pct+=5;if(this.pct<(this.votes/c)*70){var b=this;setTimeout(function(){b.incrementPCT(c)},100)}else{var a=Math.floor((this.votes/c)*1000)/10;document.getElementById("answer_"+this.a_id+"_pct").innerHTML=a+"%"}}};function poll_question(a,b,c){this.ajax=new Ajax();this.slot_id=a;this.q_id=b;this.display_results=c;this.answers=[]}poll_question.prototype.AddAnswer=function(a){this.answers.push(a)};poll_question.prototype.CheckIn=function(){return"q_id = "+this.q_id};poll_question.prototype.blowup=function(a,d){var b=util.getMousePosition(d);var f=document.getElementById("Poll_"+this.q_id+"_blowup");f.innerHTML='<span><img src="/includes/poll/media/large.'+a+'" alt="large image" /></span>';f.style.left=(b.posx-20)+"px";f.style.top=(b.posy-20)+"px";f.style.display="block"};poll_question.prototype.hide=function(){var a=document.getElementById("Poll_"+this.q_id+"_blowup");a.style.display="none"};poll_question.prototype.Vote=function(b){var e=0;for(var c=0;c<b.answer.length;c++){if(b.answer[c].checked){e=b.answer[c].value}}if(e>0){document.getElementById("poll_answers_"+this.q_id).style.display="none";document.getElementById("poll_results_"+this.q_id).style.display="";if(this.display_results){var d=0;for(var c=0;c<this.answers.length;c++){if(this.answers[c].a_id==e){this.answers[c].votes++}d+=parseInt(this.answers[c].votes)}for(var c=0;c<this.answers.length;c++){this.answers[c].incrementPCT(d)}}var a=this;this.ajax.setMimetype="text/html";this.ajax.responseFormat="text";this.ajax.doGet("/common/poll/index.php?xaction=vote&slot_id="+this.slot_id+"&q_id="+this.q_id+"&a_id="+e,function(){a.FinishVote},"text")}};poll_question.prototype.FinishVote=function(a){alert(a)};function mt(b,d,c,a){location.href="mailto:"+b+"@"+d+"?subject="+c+"&body="+a}var regObj=new function(){this.ready=true;this.register=function(a){if(regObj.ready){regObj.ready=false;(function(b){b.post("/common/ajax.php",b("#registered_users-register_form").serialize(),regObj.finishAction,"json")})(jQuery)}};this.getPage=function(a){(function(b){b.post("/common/ajax.php",{t:"registered_users",xaction:"get page",page:a},regObj.finishPage)})(jQuery)};this.finishPage=function(a){document.getElementById("registered_users_container").innerHTML=a};this.finishAction=function(a){if(a.status=="error"){regObj.ready=true}document.getElementById("registered_users_container").innerHTML=a.message};this.login=function(){(function(a){a.post("/common/ajax.php",a("#registered_users-login_form").serialize(),regObj.finishLogin,"json")})(jQuery)};this.logout=function(){(function(a){a.post("/common/ajax.php",{t:"registered_users",xaction:"logout"},regObj.finishLogin,"json")})(jQuery)};this.finishLogin=function(a){switch(a.status){case"ok":location.reload(true);break;case"error":document.getElementById("registered_users_container").innerHTML=a.message;break;default:alert("what happen");break}};this.forgotPassword=function(a){(function(b){b.post("/common/ajax.php",b("#registered_users-forgot_password").serialize(),regObj.finishAction,"json")})(jQuery)}};function fillAvatar(){regObj.ready=true}function waitAvatar(){regObj.ready=false}var ratings=new function(){this.ajax=new Ajax();this.picks={};this.hov=function(a,c,d){for(var b=1;b<=5;b++){if(b>d){document.getElementById("ratings_"+a+"_"+c+"_"+b).className="ratings_normal"}else{document.getElementById("ratings_"+a+"_"+c+"_"+b).className="ratings_over"}}};this.start=function(a,b){document.getElementById("ratings_"+a+"_"+b+"_default").style.display="none"};this.end=function(a,c){var d=typeof(this.picks[a+"_"+c])!="undefined"?this.picks[a+"_"+c]:0;if(d==0){document.getElementById("ratings_"+a+"_"+c+"_default").style.display="block"}for(var b=1;b<=5;b++){if(b>d){document.getElementById("ratings_"+a+"_"+c+"_"+b).className="ratings_normal"}else{document.getElementById("ratings_"+a+"_"+c+"_"+b).className="ratings_over"}}};this.record=function(a,c,d){this.picks[a+"_"+c]=d;var b=new Ajax();b.setMimetype="text/html";b.responseFormat="text";b.doGet("/common/ajax.php?t=ratings&xaction=record&tool="+a+"&toolid="+c+"&value="+d,ratings.finishRecord,"text")};this.finishRecord=function(a){}};var comObj=new function(){this.ajax=new Ajax();this.tool=false;this.toolid=false;this.cmore=false;this.showHide=function(a,b,d){if(d=="show"){var e=document.getElementById("comments_show_"+a+"_"+b);e.style.display="none";comObj.changePage(a,b,1)}else{var e=document.getElementById("comments_"+a+"_"+b);e.style.display="none";var e=document.getElementById("comments_show_"+a+"_"+b);e.style.display="block"}return false};this.changePage=function(a,b,c){if(!comObj.tool&&!comObj.toolid){comObj.tool=a;comObj.toolid=b;comObj.ajax.setMimetype="text/html";comObj.ajax.responseFormat="text";comObj.ajax.method="POST";comObj.ajax.url="/common/comments/index.php";comObj.ajax.postData="xaction=get+comments&tool="+a+"&toolid="+b+"&page="+c;comObj.ajax.handleResp=comObj.finishChange;comObj.ajax.responseFormat="text";comObj.ajax.doReq()}return false};this.finishChange=function(a){if(comObj.tool&&comObj.toolid){var b=document.getElementById("comments_"+comObj.tool+"_"+comObj.toolid);b.innerHTML=a;b.style.display="block";comObj.tool=false;comObj.toolid=false}};this.submitComment=function(a,b){var d=document.getElementById("comments_"+a+"_"+b+"_textarea");if(!comObj.tool&&!comObj.toolid&&d.value.length>0){comObj.tool=a;comObj.toolid=b;comObj.ajax.setMimetype="text/html";comObj.ajax.responseFormat="text";comObj.ajax.method="POST";comObj.ajax.url="/common/ajax.php";comObj.ajax.postData="t=comments&xaction=submit+comment&tool="+a+"&toolid="+b+"&c_text="+escape(util.convert_smart_quotes(d.value));comObj.ajax.handleResp=comObj.finishComment;comObj.ajax.responseFormat="text";comObj.ajax.doReq()}};this.finishComment=function(a){var b=document.getElementById("comments_"+comObj.tool+"_"+comObj.toolid+"_form");b.innerHTML=a;comObj.tool=null;comObj.toolid=null};this.report=function(a){document.getElementById("comment_"+a).style.display="none";comObj.ajax.setMimetype="text/html";comObj.ajax.responseFormat="text";comObj.ajax.doGet("/common/comments/index.php?xaction=report&c_id="+a,comObj.finishAbuse,"text");return false};this.finishAbuse=function(a){};this.showMore=function(a){if(!comObj.cmore){comObj.cmore=a;comObj.ajax.setMimetype="text/html";comObj.ajax.responseFormat="text";comObj.ajax.doGet("/common/comments/index.php?xaction=show+more&c_id="+a,comObj.finishShowMore,"text")}return false};this.finishShowMore=function(a){if(comObj.cmore>0){var b=document.getElementById("comment_"+comObj.cmore);b.innerHTML=a;var b=document.getElementById("comment_more_"+comObj.cmore);b.style.display="none"}comObj.cmore=false}};window.onload=RDGonloader.init;var Gallery=new function(){this._gallery=null;this._album=null;this._photo=null;this._list=null;this._index=null;this._tim1=null;this._tim2=null;this._tim3=null;this._img_chng_callback=null;this._list_index=0;this._startpic=0;this._set=0;this._imgcache=[];this._num_per_page=30;this._num_pages=1;this.getAlbum=function(a){Gallery._album=a;var b=new Ajax();b.setMimetype="text/xml";b.responseFormat="xml";b.doGet("/common/ajax.php?t=gallery&xaction=get+album&gallery_id="+Gallery._gallery+"&album_id="+a,Gallery.finishAlbum,"xml")};this.get_ALP_Album=function(a){Gallery._album=a;(function(b){b.get("/common/ajax.php",{t:"gallery",xaction:"get album",gallery_id:Gallery._gallery,album_id:a},Gallery.finishAlbum,"xml")})(jQuery)};this.finishAlbum=function(a){var b=Gallery._root=a.documentElement;Gallery._list=b.getElementsByTagName("item");Gallery._index=0;Gallery.initAlbum()};this.initAlbum=function(){if(Gallery._root.getElementsByTagName("name")[0].firstChild!==null){document.getElementById("gallery_name").innerHTML=Gallery._root.getElementsByTagName("name")[0].firstChild.nodeValue}if(Gallery._root.getElementsByTagName("desc")[0].firstChild!==null){document.getElementById("gallery_desc").innerHTML=Gallery._root.getElementsByTagName("desc")[0].firstChild.nodeValue}if(Gallery._root.getElementsByTagName("item_count")[0].firstChild!==null){document.getElementById("gallery_count").innerHTML=Gallery._root.getElementsByTagName("item_count")[0].firstChild.nodeValue+" photos"}var j=document.getElementById("gallery_thumbs");var g=[];j.style.width=86*Gallery._list.length+"px";var h="";for(var e=0;e<Gallery._list.length;e++){var b=Gallery._list[e];var d=b.getElementsByTagName("file")[0].firstChild.nodeValue;var a="";if(b.getElementsByTagName("file")[0].attributes.length>0&&b.getElementsByTagName("file")[0].attributes.getNamedItem("mode").value=="url"){a=b.getElementsByTagName("thumb")[0].firstChild.nodeValue}else{a="/includes/gallery/"+Gallery._gallery+"/images/album_"+Gallery._album+"/sm."+d;d="/includes/gallery/"+Gallery._gallery+"/images/album_"+Gallery._album+"/lg."+d}h+='<li><img width="78" height="78" id="photo_'+e+'" src="'+a+'" title="'+((b.getElementsByTagName("name")[0].firstChild===null)?"":b.getElementsByTagName("name")[0].firstChild.nodeValue)+'" onclick="Gallery.display(event)" /></li>';var f=new Image();f.src=d;g.push(f)}j.innerHTML=h;if(Gallery._startpic>0){var e=0;var k=false;while(e<Gallery._list.length&&!k){if(Gallery._list[e].getAttribute("id")==Gallery._startpic){k=true}else{e++}}if(k){Gallery._index=e}}Gallery.initPhoto()};this.display=function(b){var a;b=b?b:window.event;if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a.nodeType==3){a=a.parentNode}Gallery._index=a.id.replace("photo_","");if(Gallery._index-3==Gallery._list_index&&Gallery._index<Gallery._list.length){Gallery._list_index++;Gallery.slideThumbs()}else{if(Gallery._index==Gallery._list_index&&Gallery._list_index>0){Gallery._list_index--;Gallery.slideThumbs()}}Gallery.initPhoto()};this.initPhoto=function(){clearTimeout(Gallery._tim3);Gallery._photo=Gallery._list[Gallery._index];if(Gallery._photo.getElementsByTagName("file")[0].attributes.length>0&&Gallery._photo.getElementsByTagName("file")[0].attributes.getNamedItem("mode").value=="url"){src=Gallery._photo.getElementsByTagName("file")[0].firstChild.nodeValue;height=347}else{src="/includes/gallery/"+Gallery._gallery+"/images/album_"+Gallery._album+"/lg."+Gallery._photo.getElementsByTagName("file")[0].firstChild.nodeValue;width=0;height=0}tracking_iframe=document.getElementById("gallery_tracking_iframe");tracking_iframe.src="/common/statistics/gallery_tracking.php?image_url="+src;document.getElementById("photo_image").src=src;if(height>0){document.getElementById("photo_image").height=height}name=(Gallery._photo.getElementsByTagName("name")[0].firstChild===null)?"":Gallery._photo.getElementsByTagName("name")[0].firstChild.nodeValue;document.getElementById("photo_name").innerHTML=name;desc=(Gallery._photo.getElementsByTagName("desc")[0].firstChild===null)?"":Gallery._photo.getElementsByTagName("desc")[0].firstChild.nodeValue;document.getElementById("photo_desc").innerHTML=desc;if(Gallery._imgcache[Gallery._photo.getAttribute("id")]==undefined){var a=new Ajax();a.setMimetype="text/xml";a.responseFormat="xml";a.doGet("/common/ajax.php?t=gallery&xaction=get+item+data&item_id="+Gallery._photo.getAttribute("id"),Gallery.finishItemData,"xml")}else{Gallery.finishItemData(Gallery._imgcache[Gallery._photo.getAttribute("id")])}if(this._img_chng_callback){this._img_chng_callback(Gallery._photo.getAttribute("id"))}};this.setImgChgCallback=function(a){this._img_chng_callback=a};this.finishItemData=function(a){var b=a.documentElement;if(b.getElementsByTagName("id")[0].firstChild.nodeValue==Gallery._photo.getAttribute("id")){document.getElementById("item_rating").innerHTML=b.getElementsByTagName("rating")[0].firstChild.nodeValue}Gallery._imgcache[b.getElementsByTagName("id")[0].firstChild.nodeValue]=a};this.scrollThumbs=function(c,a){document.body.focus();if(a){switch(c){case"left":Gallery._list_index-=4;break;case"right":Gallery._list_index+=4;break}Gallery._tim1=setTimeout(function(){Gallery.scrollThumbs(c,true)},350);Gallery._list_index=(Gallery._list_index+4)>Gallery._list.length?Gallery._list.length-4:Gallery._list_index;Gallery._list_index=Gallery._list_index<0?0:Gallery._list_index;Gallery.slideThumbs()}else{clearTimeout(Gallery._tim1)}};this.slideThumbs=function(){var f=document.getElementById("gallery_thumbs");if(!parseInt(f.style.left)){f.style.left="0px"}var e=parseInt(f.style.left);var b=Gallery._list_index*-86;var d=b-e;var a=Math.ceil(d/2);if(a!=0){f.style.left=(e+a)+"px";Gallery._tim2=setTimeout(Gallery.slideThumbs,100)}};this.init=function(c,b,d,a){if(c>0){Gallery._gallery=c}if(b>0){Gallery._album=b}if(d>0){Gallery._startpic=d}if(b>0&&c>0){Gallery.getAlbum(b)}else{if(a!=""){Gallery._album=a;Gallery.get_ALP_Album(a)}}};this.next=function(){Gallery._index++;Gallery._list_index=Gallery._index-1;if(Gallery._index==Gallery._list.length){Gallery._index=0;Gallery._list_index=0}Gallery._list_index=(Gallery._index+3>Gallery._list.length)?Gallery._list.length-3:Gallery._list_index;Gallery.slideThumbs();Gallery.initPhoto()};this.previous=function(){Gallery._index--;Gallery._list_index=Gallery._index-1;if(Gallery._index<0){Gallery._index=Gallery._list.length-1}Gallery._list_index=(Gallery._index==0)?0:Gallery._list_index;Gallery._list_index=(Gallery._index+3>Gallery._list.length)?Gallery._list.length-3:Gallery._list_index;Gallery.slideThumbs();Gallery.initPhoto()};this.toggleSet=function(d){var c;d=d?d:window.event;if(d.target){c=d.target}else{if(d.srcElement){c=d.srcElement}}if(c.nodeType==3){c=c.parentNode}var b=c.parentNode.parentNode;var a=b.parentNode;node=a.firstChild;while(node){if(node.nodeType==1){node.getElementsByTagName("ul")[0].className=(node.id==b.id)?"set_body_open":"set_body_closed"}node=node.nextSibling}};this.init_index=function(a,b){Gallery._gallery=a;Gallery._set=b;if(b>0){var c=new Ajax();c.setMimetype="text/xml";c.responseFormat="xml";c.doGet("/common/ajax.php?t=gallery&xaction=get+set&gallery_id="+Gallery._gallery+"&set_id="+b,Gallery.finishIndex,"xml")}else{var c=new Ajax();c.setMimetype="text/xml";c.responseFormat="xml";c.doGet("/common/ajax.php?t=gallery&xaction=get+albums&gallery_id="+Gallery._gallery,Gallery.finishIndex,"xml")}};this.printClick=function(){var a=window.open("/common/gallery/print.php?g="+Gallery._gallery+"&a="+Gallery._album+"&p="+Gallery._list[Gallery._index].getElementsByTagName("file")[0].firstChild.nodeValue,"print_win","");a.focus()}};
