var _POPUP_FEATURES="toolbar=0, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=550, height=425";
var _CHAT_FEATURES="toolbar=0, location=0, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=678, height="+(screen.availHeight*0.8);
var _QUICK_FEATURES="toolbar=0, location=0, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=400, height="+(screen.availHeight*0.8);
var ndgnull;
var ndgEmptyFunc=function(){
};
function addClass(c,el){
if(typeof (el)==="string"){
el=document.getElementById(el);
}
if(!hasClass(c,el)){
el.className+=" "+c;
}
el=null;
}
function approveAndJump(_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){
_b=_b||"comments";
_c=_c||"frmComment";
ndg.setJumpId(_b,_c);
return approveItem(_3,_4,_5,_6,_7,_8,_9,function(_d,_e,_f,_10,_11){
var el=document.getElementById(_d).getElementsByTagName("a")[0];
if(!el){
return;
}
el.href=_a;
el=null;
});
}
function approveItem(obj,_14,_15,_16,_17,_18,_19,_1a){
if(ndg.dom){
if(!_19){
_19="images/icons/indicator_light.gif";
}
if(typeof (_18)==="string"){
var img=document.createElement("img");
img.src=media_path+_19;
img.alt="Busy...";
document.getElementById(_18).appendChild(img);
img=null;
}else{
if(_18){
_18.fetching=true;
_18.updateStatus();
}
}
var _1c=ndg.fetch(obj.href,{onComplete:approveSuccess(_14,_15,_16,_17,_18,_1a)});
_18=null;
return false;
}
return true;
}
function approveSuccess(_1d,_1e,_1f,_20,_21,_22){
function inner(){
var _23=eval("("+this.transport.getResponseHeader("X-JSON")+")");
var _24=document.getElementById(_1f),_25=null;
var _26=document.getElementById(_1e);
document.getElementById(_1d).innerHTML=this.transport.responseText;
_24.className=!ndg.empty(_23.msgType)&&_23.msgType==="error"?"errorBlock":"successBlock";
_24.innerHTML="<p>"+_23.msg+"</p>";
if(_26){
_26.style.display="none";
}
if(typeof (_20)=="string"){
document.getElementById(_20).focus();
}
if(typeof (_21)==="string"){
_25=document.getElementById(_21);
_25.removeChild(_25.childNodes[0]);
}else{
if(_21){
_21.fetching=false;
_21.updateStatus();
}
}
if(typeof (_22)=="function"){
_22(_1d,_1e,_1f,_20,_21);
}
}
return inner;
}
function checkAllByClassName(_27){
allNodes=document.getElementsByClassName(_27);
for(i=0;i<allNodes.length;i++){
allNodes[i].checked=true;
}
}
function checkDefaultValue(el,_29,_2a){
if(_2a=="focus"){
if(el.value==_29){
el.className="defaultOff";
el.value="";
}else{
el.select();
}
}else{
if(_2a=="blur"){
if(el.value==""){
el.className="defaultOn";
el.value=_29;
}
}
}
}
function CommentForm(url,_2c,_2d,_2e,_2f){
this.url=url;
this.form=document.getElementById(_2c);
this.msgId=_2d;
this.form.onsubmit=this.GetEvent("form_onsubmit",this);
this.waitingSrc=!_2e?"/images/icons/indicator_light.gif":_2e;
this.commentsId=!_2f?"":_2f;
this.commentIndex=0;
this.xhr=null;
}
CommentForm.prototype={isSupported:!!document.getElementById,lang:{errorMsgComment:"Please enter a comment.",errorMsgPortal:"Please check where this comment should display: cars, bikes, boats and/or planes.",waiting:"Posting your comment, please wait... {$image}"},AddPreview:function(_30,url,_32,_33){
this.form.elements[_30].onclick=this.GetEvent("preview_onclick",this);
this.previewInfo={url:url,previewId:_33,commentField:_32};
},AddSuccess:function(xhr){
var _35=getJson(xhr);
if(_35&&_35.status=="OK"){
ndg.showMessage("<p>"+_35.msg+"</p>",_35.status.toLowerCase(),this.msgId);
this.form.elements.comment.value="";
this.ShowComment(xhr.responseText);
}
},GetCommentBoxId:function(i){
return "ajaxComment"+i;
},GetCommentIndex:function(){
var i=this.commentIndex;
this.commentIndex++;
return i;
},GetEvent:function(_38,_39){
var fn;
switch(_38){
case "ajax_callback":
fn=function(xhr){
var _3c="";
if(ndg.ajaxType()=="mootools"){
xhr=this.transport;
}
_39.AddSuccess(xhr);
};
break;
case "form_onsubmit":
fn=function(){
_39.Send();
return false;
};
break;
case "preview_onclick":
fn=function(){
if(!_39.Validate()){
return;
}
preview.send(_39.previewInfo.url,_39.form.id,_39.previewInfo.previewId,_39.form.elements[_39.previewInfo.commentField].id,null,null,_39.waitingSrc);
};
break;
default:
fn=function(){
};
break;
}
return fn;
},IsChecked:function(_3d){
var _3e=false;
if(typeof (_3d.checked)=="boolean"){
_3e=_3d.checked;
}else{
if(typeof (_3d.length)=="number"){
var i=0;
var el;
while(el=_3d[i++]){
if(el.checked){
_3e=true;
break;
}
}
}
}
return _3e;
},Send:function(){
if(!this.isSupported||!this.Validate()){
return;
}
ndg.showMessage("<p>"+this.lang.waiting.replace("{$image}",showImage(this.waitingSrc,["alt",""])+"</p>"),"info",this.msgId);
this.xhr=ndg.fetch(this.url,{onComplete:this.GetEvent("ajax_callback",this),parameters:serializeForm(this.form)});
},ShowComment:function(_41){
var _42=$(this.commentsId);
var i=this.GetCommentIndex();
var _44="<div class=\"ajaxCommentBox\" id=\""+this.GetCommentBoxId(i)+"\"></div>";
var _45;
if(!_42){
return;
}
_44+=_42.innerHTML;
_42.innerHTML=_44;
_45=$(this.GetCommentBoxId(i));
_45.setOpacity(0);
_45.innerHTML=_41;
new Fx.Style(_45,"opacity").custom(0,1);
_42=null;
_45=null;
},Validate:function(){
var _46="";
if(this.form.elements.comment.value==""){
_46=this.lang.errorMsgComment;
ndg.setFocus(this.form.elements.comment);
}
if(_46!=""){
ndg.showMessage("<p>"+_46+"</p>","error",this.msgId);
return false;
}else{
ndg.showMessage("","normal",this.msgId);
document.getElementById(this.msgId).style.display="none";
return true;
}
}};
var ControlForm={isIE:window.ActiveXObject&&document.all&&document.selection?true:false,isSupported:document.createElement&&document.createTextNode&&document.appendChild?true:false,KEY_CODES:{ENTER:13},BindSubmit:function(_47,_48,_49,e){
if(!this.isSupported){
return;
}
if(!e){
var e=window.event;
}
if(e.keyCode==this.KEY_CODES.ENTER){
this.SetValue(_47,_48,_49);
}
_47=null;
},CreateHiddenField:function(_4b,_4c){
if(!this.isSupported||!!_4b.elements[_4c]){
return;
}
var _4d;
if(this.isIE){
_4d=document.createElement("<input name="+_4c+">");
}else{
_4d=document.createElement("input");
_4d.name=_4c;
}
_4d.type="hidden";
_4b.appendChild(_4d);
_4b=_4d=null;
},SetValue:function(_4e,_4f,_50){
if(!this.isSupported){
return;
}
if(!_4e.elements[_4f]){
this.CreateHiddenField(_4e,_4f);
}
_4e.elements[_4f].value=_50;
_4e=null;
},SetValueConfirm:function(msg,_52,_53,_54){
if(!this.isSupported){
return;
}
var r=confirm(msg);
if(r){
this.SetValue(_52,_53,_54);
}
return r;
}};
var Cookie={enabled:function(){
return navigator.cookieEnabled?true:false;
},remove:function(_56){
this.write(_56,"",-1);
},read:function(_57){
var _58=_57+"=",ca=document.cookie.split(";");
var c=null;
for(var i=0;i<ca.length;i++){
c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_58)==0){
return c.substring(_58.length,c.length);
}
}
return null;
},write:function(_5c,_5d,_5e){
if(_5e){
var _5f=new Date();
_5f.setTime(_5f.getTime()+(_5e*24*60*60*1000));
var _60="; expires="+_5f.toGMTString();
}else{
var _60="";
}
document.cookie=_5c+"="+_5d+_60+"; path=/";
}};
document.getElementsByClassName=function(c,t){
var _63=[],_64=[];
if(ndg.empty(t)){
t="*";
}
if(document.getElementsByTagName){
_64=document.getElementsByTagName(t);
for(var i=0,end=_64.length;i<end;i++){
if(_64[i].className==c){
_63[_63.length]=_64[i];
}
}
}
return _63;
};
function Events(){
this.fn=[];
this.fnIds=[];
this.n=0;
}
Events.prototype={add:function(fn,_68){
if(typeof (fn)==="function"&&this.fn.splice){
this.fn[this.n]=fn;
this.fnIds[this.n]=_68?_68:"fn_"+this.n;
this.n++;
return this.n-1;
}
return -1;
},execute:function(){
if(this.fn.length>0){
for(var i=0,end=this.fn.length;i<end;i++){
this.fn[i]();
}
}
},remove:function(_6b){
if(this.fn.splice){
var _6c=typeof (_6b)==="string"?get_index(_6b,this.fnIds):_6b;
if(_6c>-1){
this.fn.splice(_6c,1);
this.fnIds.splice(_6c,1);
}
}
}};
function get_index(_6d,_6e){
for(var i=0,end=_6e.length;i<end;i++){
if(_6e[i]==_6d){
return i;
}
}
return -1;
}
function getClasses(el){
if(typeof (el)==="string"){
el=document.getElementById(el);
}
var _72=el.className.split(" ");
el=null;
return _72;
}
function getIndex(_73,_74){
return get_index(_73,_74);
}
function getJson(xhr,_76){
if(!xhr){
return null;
}
var _77=null;
var _78="";
switch(typeof (xhr)){
case "object":
_78=(!_76)?xhr.getResponseHeader("X-JSON"):xhr.responseText;
break;
case "string":
_78=xhr;
break;
}
try{
_77=eval("("+_78+")");
}
catch(e){
}
return _77;
}
function getSelectedRadio(els){
for(var i=0,end=els.length;i<end;i++){
if(els[i].checked){
return els[i];
}
}
return null;
}
function getSelectedRadioId(_7c,_7d){
if(typeof (_7d)=="string"){
_7d=document.getElementById(_7d);
}
var _7e=getSelectedRadio(_7d.elements[_7c]);
return _7e.id?_7e.id:"";
}
function getSelectedRadioValue(_7f,_80){
if(typeof (_80)=="string"){
_80=document.getElementById(_80);
}
var _81=getSelectedRadio(_80.elements[_7f]);
return _81.value?_81.value:"";
}
function getValue(id){
var el;
var val=null;
var i=0;
var opt;
if(document.getElementById){
el=typeof (id)==="string"?document.getElementById(id):id;
if(el.nodeName=="SELECT"){
val=el.multiple?getMultiSelectValues(el):el.value;
}else{
if(el.length){
val=(el[0].type=="radio")?getRadioValue(el):getCheckboxValues(el);
}else{
val=el.value;
}
}
}
return val;
}
function getCheckboxValues(_87){
var i=0;
var end=_87.length;
var _8a=[];
while(i<end){
if(_87[i].checked){
_8a.push(_87[i].value);
}
i++;
}
return _8a;
}
function getMultiSelectValues(el){
var i=0;
var end=el.options.length;
var opt;
var _8f=[];
while(i<end){
opt=el.options[i];
if(opt.selected){
_8f.push(opt.value);
}
i++;
}
return _8f;
}
function getRadioValue(_90){
var i=0;
var end=_90.length;
while(i<end){
if(_90[i].checked){
return _90[i].value;
}
i++;
}
return "";
}
function hasClass(c,el){
return (el.className&&el.className.indexOf(c)>-1)?true:false;
}
function in_array(_95,_96){
for(var i=0,end=_96.length;i<end;i++){
if(_96[i]==_95){
return true;
}
}
return false;
}
function isUndefined(v){
var _9a;
return v===_9a;
}
function link_popup(src,_9c){
return raw_popup(src.getAttribute("href"),src.getAttribute("target")||"_blank",_9c);
}
function MultiFunctionForm(id){
this.id=id;
document.getElementById(id).onsubmit=this.getEvent();
}
MultiFunctionForm.prototype={getEvent:function(){
var _9e=this;
return function(){
_9e.manageForm(this);
};
},manageForm:function(_9f){
_9f.action=getValue(_9f.elements.form_action);
return true;
}};
var ndg={_ajaxType:"",dom:document.getElementById?true:false,msgFade:1,msgTimeout:3,ajaxType:function(){
if(this._ajaxType!=""){
return this._ajaxType;
}else{
if(Ajax.implement){
this._ajaxType="mootools";
}else{
if(Ajax.Request){
this._ajaxType="prototype";
}
}
return this._ajaxType;
}
},doJump:function(){
var _a0=Cookie.read("jumpId");
var _a1=Cookie.read("jumpFocusId");
if(_a0){
window.location="#"+_a0;
Cookie.remove("jumpId");
}
if(_a1){
if(!this.focusFirstElement(_a1)){
this.setFocus(_a1);
}
Cookie.remove("jumpFocusId");
}
},empty:function(x){
var r=false;
if(x==ndgnull||(x.length&&x.length<1)||x==ndgEmptyFunc||x===""||x===null){
r=true;
}else{
if(typeof (x)==="object"){
r=true;
for(var a in x){
r=false;
break;
}
}
}
return r;
},fetch:function(url,_a6){
fetchObj=null;
_a6.method=!_a6.method?"post":_a6.method;
_a6.parameters="sess_id="+fetch_id+"&ajax_hash="+fetch_hash+(!_a6.parameters?"":"&"+_a6.parameters);
if(this.ajaxType()=="mootools"){
if(_a6.method=="post"){
_a6.postBody=_a6.parameters;
}else{
url+=(url.indexOf("?")==-1?"?":"&")+_a6.parameters;
}
fetchObj=new Ajax(url,_a6).request();
}else{
if(this.ajaxType()=="prototype"){
fetchObj=new Ajax.Request(url,_a6);
}
}
return fetchObj;
},focusFirstElement:function(id){
if(this.dom){
var _a8=document.getElementById(id);
var _a9=null;
if(_a8&&_a8.nodeName=="FORM"){
for(var a=0,z=_a8.elements.length;a<z;a++){
_a9=_a8.elements[a];
if((_a9.nodeName==="INPUT"&&_a9.getAttribute("type")==="text")||_a9.nodeName==="TEXTAREA"){
_a9.focus();
_a9.select();
return true;
}
}
_a9=null;
}
}
return false;
},GetEmailCallback:function(_ac,_ad,_ae,_af){
function doEmailCallback(_b0,_b1){
var _b2=null;
if(_b1.statusType==="error"){
_b2=document.getElementById(_ae);
_b2.innerHTML=_b1.status;
document.getElementById(_ad).style.display="none";
}else{
_b2=document.getElementById(_ad);
_b2.innerHTML=_b1.status;
document.getElementById(_ae).style.display="none";
}
_b2.style.display="block";
_b2=null;
}
return doEmailCallback;
},getIdFromURL:function(url){
var id=null;
var _b5=url.indexOf("#");
if(_b5>-1){
id=url.substring(_b5+1,url.length);
}
return id;
},getMsgFade:function(_b6){
function doMsgFade(){
var _b7=null;
if(!ndg.empty(window.Fx)){
_b7=new Fx.Style(_b6,"opacity",{duration:ndg.msgFade}).custom(1,0);
}else{
if(!ndg.empty(window.Effect)){
_b7=new Effect.Opacity(_b6,{duration:ndg.msgFade,from:1,to:0});
}
}
}
return doMsgFade;
},printPreview:function(_b8){
if(this.dom&&window.print){
var _b9=document.getElementsByTagName("link");
var _ba=document.getElementsByTagName("style");
var _bb=null;
for(var i=0,end=_ba.length;i<end;i++){
_ba[i].disabled=true;
}
for(var i=0,end=_b9.length;i<end;i++){
_bb=_b9[i];
if(_bb.getAttribute("rel").indexOf("alt")>-1&&_bb.getAttribute("title")==="preview"){
_bb.disabled=true;
_bb.disabled=false;
}else{
if(_bb.getAttribute("media")!=="print"){
_bb.disabled=true;
}
}
}
}
if(_b8!==null){
return _b8;
}
},printPreviewUndo:function(_be){
if(ndg.dom&&window.print){
var _bf=document.getElementsByTagName("link");
var _c0=document.getElementsByTagName("style");
var _c1=null;
for(var i=0,end=_c0.length;i<end;i++){
_c0[i].disabled=false;
}
for(var i=0,end=_bf.length;i<end;i++){
_c1=_bf[i];
if(_c1.getAttribute("rel").indexOf("alt")>-1&&_c1.getAttribute("title")==="preview"){
_c1.disabled=true;
}else{
_c1.disabled=false;
}
}
_c1=null;
}
if(_be!==null){
return _be;
}
},printWindow:function(_c4){
if(window.print){
window.print();
}
return (_c4!==null?_c4:null);
},setFocus:function(el){
if(ndg.dom){
if(typeof (el)==="string"){
el=document.getElementById(el);
}
if(el&&el.focus){
el.focus();
el=null;
return true;
}else{
return false;
}
}
},setJumpId:function(_c6,_c7){
Cookie.write("jumpId",_c6);
if(_c7){
Cookie.write("jumpFocusId",_c7);
}else{
Cookie.remove("jumpFocusId");
}
},showMessage:function(_c8,_c9,_ca,_cb,_cc){
if(this.dom){
var _cd=document.getElementById(_ca);
var _ce=null;
var _cf="";
if(_cd){
switch(_c9){
case "ok":
_cf="successBlock";
break;
case "error":
_cf="errorBlock";
break;
case "info":
_cf="info";
break;
default:
_cf="";
break;
}
_cd.className=_cf;
_cd.innerHTML=_c8;
if(window.Fx){
$(_cd).setOpacity(1);
}else{
if(window.Effect){
Element.setOpacity(_cd,1);
}
}
if(!_cb){
_cd.style.display="block";
}
if(_cc){
setTimeout(this.getMsgFade(_ca),this.msgTimeout*1000);
}
}
}
},validateEmail:function(_d0,_d1,_d2,_d3){
var _d4=ndg.fetch(page_path+"utilities/valid_email",{parameters:"email="+_d0,onSuccess:this.GetEmailCallback(_d0,_d1,_d2,_d3)});
}};
var ndgToggle={hClassOff:"toggleHeadOff",hClassOn:"toggleHeadOn",activeSrc:media_path+"/images/button_arrow_down.gif",inactiveSrc:media_path+"/images/button_arrow_right.gif",doToggle:function(_d5,_d6,_d7){
if(document.getElementById){
var _d8=document.getElementById(_d5);
var _d9=null;
if(_d8.className==this.hClassOn){
_d8.className=this.hClassOff;
if(_d7){
document.getElementById(_d7).src=this.inactiveSrc;
}
_d9=new Fx.Height(_d6,{duration:500,transition:Fx.Transitions.sineInOut}).toggle();
}else{
_d8.className=this.hClassOn;
if(_d7){
document.getElementById(_d7).src=this.activeSrc;
}
_d9=new Fx.Height(_d6,{duration:500,transition:Fx.Transitions.sineInOut}).toggle();
}
return false;
}
return true;
},getIds:function(_da,num){
var _dc=[];
for(var i=0;i<num;i++){
_dc[i]=_da+"_"+i;
}
return _dc;
},initialize:function(_de,_df){
if(document.getElementById){
var _e0=null;
var _e1=null;
var id=ndg.getIdFromURL(new String(window.location));
var _e3=getIndex(id,_de)>-1;
for(var i=0,end=_de.length;i<end;i++){
_e0=document.getElementById(_de[i]);
_e1=document.getElementById(_df[i]);
if((_e3&&_de[i]!=id)||(!_e3&&!!_e0&&_e0.className==this.hClassOff)){
_e1.style.height="0";
_e1.style.overflow="hidden";
}
}
}
}};
var PrecacheImages={cacheId:"_IMAGE_CACHE",cacheNode:null,imgs:[],supported:null,add:function(src){
var img=null;
if(!in_array(src,this.imgs)&&this.isSupported()){
if(!this.cacheNode){
this.cacheNode=document.createElement("div");
this.cacheNode.id=this.cacheId;
this.cacheNode.style.display="none";
document.getElementsByTagName("body")[0].appendChild(this.cacheNode);
}
img=document.createElement("img");
img.src=src;
this.imgs[this.imgs.length]=src;
this.cacheNode.appendChild(img);
}
},isSupported:function(){
if(this.supported===null){
this.supported=document.getElementsByTagName&&document.getElementById&&document.createElement&&document.appendChild?true:false;
}
return this.supported;
}};
var preview={waitText:"Please wait while we create the preview... ",waitImgSrc:"images/icons/indicator_light.gif",getFocusFn:function(_e8){
return function(){
document.getElementById(_e8).focus();
};
},onComplete:function(_e9){
return function(_ea){
var _eb=$(_e9);
var _ec=null;
if(ndg.ajaxType()=="mootools"){
_ea=this.transport;
}
_eb.setOpacity(0);
_eb.innerHTML=_ea.responseText;
_eb.style.height="";
if(typeof (Fx)=="object"&&Fx.Style){
_ec=new Fx.Style(_eb,"opacity",{onComplete:preview.getFocusFn(_e9+"_anchor")}).custom(0,100);
}else{
if(typeof (Effect)=="object"&&Effect.Opacity){
_ec=new Effect.Opacity(_eb,{from:0,to:1,afterFinish:preview.getFocusFn(_e9+"_anchor")});
}
}
};
},send:function(_ed,_ee,_ef,_f0,_f1,_f2,_f3,_f4){
if(!_f5){
var _f5=false;
}
if(ndg.dom&&!_f5){
if(_f3){
this.waitImgSrc=_f3;
}
var _f6=document.getElementById(_ef);
var _f7=document.getElementById(_ee);
var _f8="";
if(!_f1){
_f1="";
}
if(!_f0){
_f0="";
}
_f6.innerHTML=this.showWaiting();
_f6.innerHTML=this.showWaiting();
_f6.style.height=_f7.scrollHeight+"px";
_f7.style.display="none";
_f6.style.display="block";
if(_f4){
window.location="#"+_ef;
}
if(_f2){
_f8+="/"+_f2.src.replace(media_path,"");
}
params=serializeForm(_f7)+"&action="+_f1+"&focus_id="+_f0+"&form_id="+_ee+"&photo_path="+_f8+"&preview_id="+_ef;
ndg.fetch(_ed,{onComplete:this.onComplete(_ef),parameters:params});
}
},showWaiting:function(){
return "<p class=\"waiting\">"+this.waitText+showImage(this.waitImgSrc,["alt","waiting..."])+"</p>";
},submitForm:function(_f9,_fa){
if(ndg.dom){
var _fb=document.getElementById(_f9);
document.getElementById(_fa).style.display="none";
_fb.style.display="";
if(typeof (_fb.onsubmit)!="function"||_fb.onsubmit()){
_fb.submit();
}
}
},switchToForm:function(_fc,_fd,_fe){
document.getElementById(_fd).style.display="none";
document.getElementById(_fc).style.display="block";
if(_fe){
document.getElementById(_fe).focus();
}else{
document.getElementById(_fc+"_anchor").focus();
}
}};
function raw_popup(url,_100,_101){
if(isUndefined(_101)){
_101=_POPUP_FEATURES;
}
if(isUndefined(_100)){
_100="_blank";
}
var _102=window.open(url,_100,_101);
_102.focus();
return _102;
}
function removeClass(c,el){
var _105=getClasses(el),cPos=getIndex(c,_105);
var _107="";
if(cPos>-1){
_107=_105.pop(cPos);
}
el.className=_105.join(" ");
el=null;
}
function replaceClass(el,_109,_10a){
el.className=el.className.replace(_109,_10a);
el=null;
}
function srchBox(obj,_10c){
if(obj.value===_10c){
obj.value="";
}
}
function serializeForm(_10d){
if(ndg.dom){
var els=typeof (_10d)==="string"?document.getElementById(_10d).elements:_10d.elements;
var r=[],_110=[];
for(var i=0,end=els.length;i<end;i++){
if(els[i].nodeName==="INPUT"){
if(els[i].type==="radio"||els[i].type==="checkbox"){
if(els[i].checked){
r[r.length]=els[i].name+"="+encodeURIComponent(getValue(els[i]));
}
}else{
r[r.length]=els[i].name+"="+encodeURIComponent(getValue(els[i]));
}
}else{
if(els[i].nodeName==="SELECT"){
if(els[i].multiple){
_110=getValue(els[i]);
for(var sel=0,_114=_110.length;sel<_114;sel++){
r[r.length]=els[i].name+"="+encodeURIComponent(_110[sel]);
}
}else{
r[r.length]=els[i].name+"="+encodeURIComponent(getValue(els[i]));
}
}else{
r[r.length]=els[i].name+"="+encodeURIComponent(getValue(els[i]));
}
}
}
return r.join("&");
}
return "";
}
function showBusyIndicator(_115,_116){
if(ndg.dom){
if(typeof (_115)==="string"){
_115=document.getElementById(_115);
}
if(typeof (_116)==="string"){
_116=document.getElementById(_116);
}
_115.style.display="none";
_116.style.display="block";
_115=null;
_116=null;
}
}
function showImage(src,_118){
var img="<img src=\""+media_path+src+"\"";
var i=0;
var end=_118.length;
while(i<end){
img+=" "+_118[i]+"=\""+_118[i+1]+"\"";
i+=2;
}
img+=">";
return img;
}
function toggleAllByClassName(_11c){
allNodes=document.getElementsByClassName(_11c);
for(i=0;i<allNodes.length;i++){
allNodes[i].checked=!allNodes[i].checked;
}
}
function toggleCheckboxes(){
var i=0;
var form;
var name="";
var _120=false;
var end=0;
if(arguments.length==1){
form=arguments[0].form;
name=arguments[0].name;
_120=arguments[0].checked;
}else{
form=arguments[0];
name=arguments[1];
_120=arguments[2];
}
end=form.elements[name].length;
for(i;i<end;i++){
form.elements[name][i].checked=_120;
}
}
function TrophyWidget(url,_123,_124,_125,_126,_127){
if(!this.isSupported){
return;
}
this.url=url;
this.widgetId=_123;
this.countId=_124;
this.linkId=_125;
this.connectionOpened=false;
this.successMsg=_126;
this.waitingMsg=!_127?"please wait... <img src=\""+media_path+"/images/icons/indicator_light.v"+version_image+".gif\" alt=\"\" style=\"vertical-align: middle\">":_127;
this.AttachClickFn();
this.enabled=true;
}
TrophyWidget.prototype={enabled:false,isSupported:!!document.getElementById,AttachClickFn:function(){
var _128=document.getElementById(this.linkId);
var a;
if(_128){
a=_128.getElementsByTagName("a");
if(a&&a[0]){
a[0].onclick=this.GetClickFn(this);
}
}
a=_128=null;
},GetClickFn:function(_12a){
return function(){
_12a.GiveTrophy();
return !_12a.enabled;
};
},GetOnCompleteFn:function(_12b){
return function(resp){
_12b.OnComplete(resp);
_12b=null;
};
},GiveTrophy:function(){
if(this.connectionOpened||!this.enabled){
return;
}
this.httpObj=ndg.fetch(this.url,{onComplete:this.GetOnCompleteFn(this)});
this.ShowMessage(this.waitingMsg);
this.connectionOpened=true;
},OnComplete:function(xhr){
var resp=null;
switch(ndg.ajaxType()){
case "mootools":
resp=eval("("+xhr+")");
break;
case "prototype":
resp=eval("("+xhr.responseText+")");
break;
}
if(resp&&resp.status=="finished"){
this.ShowMessage(this.successMsg);
this.ShowCount(resp.trophies);
}
},ShowCount:function(_12f){
document.getElementById(this.countId).innerHTML=_12f;
},ShowMessage:function(msg){
document.getElementById(this.linkId).innerHTML=msg;
}};
function uncheckAllByClassName(_131){
allNodes=document.getElementsByClassName(_131);
for(i=0;i<allNodes.length;i++){
allNodes[i].checked=false;
}
}
function updateViewAll(el,url){
if(!document.getElementById||!document.getElementsByTagName){
return;
}
el=(typeof (el)=="string")?document.getElementById(el):el;
el.getElementsByTagName("a")[0].href=url;
el=null;
}
var Uploader={isSupported:!!document.getElementById,activate:function(_134,_135){
if(!this.isSupported){
return;
}
document.getElementById(_134).style.display="none";
document.getElementById(_135).style.display="block";
},spawn:function(_136,_137,_138,_139,_13a){
if(this.isSupported){
var _13b="<iframe class=\"uploader\" src=\""+_138+"\" width=\""+(_139?_139:300)+"\" height=\""+(_13a?_13a:200)+"\" id=\""+_137+"_iframe\" name=\""+_137+"_iframe\" frameborder=\"0\"></iframe>";
document.getElementById(_136).style.display="none";
document.getElementById(_137).innerHTML=_13b;
}
}};
var onloads=new Events();
var domload=new Events();
onloads.add(function(){
ndg.doJump();
});
domload.add(function(){
if(!ndg.dom){
return;
}
var srch=document.getElementById("searchkeys");
var _13d=document.getElementById("frmQuickLogin");
if(srch){
srch.onfocus=function(){
checkDefaultValue(this,"search...","focus");
};
srch.onblur=function(){
checkDefaultValue(this,"search...","blur");
};
}
if(_13d){
_13d.elements.email.onfocus=function(){
checkDefaultValue(this,"username","focus");
};
_13d.elements.email.onblur=function(){
checkDefaultValue(this,"username","blur");
};
}
srch=null;
_13d=null;
});

