var isDOM=(document.getElementById?true:false);var isIE4=((document.all&& !isDOM)?true:false);var isNS4=(document.layers?true:false);var curhis=false;var plughistory=false;function showflogins(){window.document.forms['flogin'].style.display='block';document.getElementById('authtext').style.display='none';};function historyChange(newLocation,newData){var callback=newData;if(typeof(callback)=='function')callback();};sloading=function(){var sXml="<xjxquery><q>";if(arguments.length>4){call="/"+arguments[1];for(var i=2;i<arguments.length;i++){if(1==i%2){name=arguments[i-1];val=arguments[i];call+="/"+arguments[i];sXml+=name+"="+encodeURIComponent(val);if(i!=(arguments.length-1))sXml+='&';}}sXml+="</q></xjxquery>";}else{sXml=arguments[3];call=arguments[2];}if(curhis==call)return false;else curhis=call;eval("var "+call.replace(/\//g,"_")+"=function(){showloading(true);xajax_"+arguments[0]+"('"+arguments[1]+"','"+sXml+"');};");if(plughistory==false)init();eval("dhtmlHistory.add(call,"+call.replace(/\//g,"_")+");");};function showBusyLayer(){var busyLayer=xajax.$("busy_layer");if(busyLayer!=null){busyLayer.style.visibility="visible";busyLayer.style.height="2500px";}};function hideBusyLayer(){var busyLayer=xajax.$("busy_layer");if(busyLayer!=null){busyLayer.style.visibility="hidden";busyLayer.style.height="0px";}};function showloading(status){try{if(this.centerdiv&&this.centerdiv.divobj){}else{this.centerdiv=new center_div();this.centerdiv.divname='loading';}if(status)showBusyLayer();else hideBusyLayer();if(status)xajax.$("loading").style.visibility="visible";else xajax.$("loading").style.visibility="hidden";}catch(e){}this.centerdiv.move_div();};function center_div(){this.divname='';this.divobj='';};center_div.prototype.clear_div=function(){try{if(!this.divobj){return;}else{this.divobj.style.display='none';}}catch(e){return;}};center_div.prototype.Ywindow=function(){var scrollY=0;if(document.documentElement&&document.documentElement.scrollTop){scrollY=document.documentElement.scrollTop;}else if(document.body&&document.body.scrollTop){scrollY=document.body.scrollTop;}else if(window.pageYOffset){scrollY=window.pageYOffset;}else if(window.scrollY){scrollY=window.scrollY;}return scrollY;};center_div.prototype.move_div=function(){try{this.divobj=document.getElementById(this.divname);}catch(e){return;}var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}this.divobj.style.position='absolute';this.divobj.style.display='block';this.divobj.style.zIndex=99;var divheight=parseInt(this.divobj.style.Height);var divwidth=parseInt(this.divobj.style.Width);divheight=divheight?divheight:50;divwidth=divwidth?divwidth:200;var scrolly=this.Ywindow();var setX=(my_width-divwidth)/2;var setY=(my_height-divheight)/2+scrolly;setX=(setX<0)?0:setX;setY=(setY<0)?0:setY;this.divobj.style.left=setX+"px";this.divobj.style.top=setY+"px";};function open_mail_win(){window.open('users/auth/pagemail.up.php','forum_answer','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=358,height=356');};function submitSignup(form){showloading(true);xajax_processForm(xajax.getFormValues(form),form);return false;};function slide_panel(){var widths=screen.width-220-65;var widthb=(screen.width-65);with(window.document.getElementById('bodylf').style)display=(display=='none')?'block':'none';with(window.document.getElementById('bodyrg').style)width=(width==(widths+'px'))?(widthb):(widths);};var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);};var oldonload=window.onload;if(typeof(NiftyLoad)!='function')NiftyLoad=function(){};if(typeof(oldonload)=='function')window.onload=function(){oldonload();NiftyLoad()};else window.onload=function(){NiftyLoad()};function Nifty(selector,options){if(niftyOk==false)return;var i,v=selector.split(","),h=0;if(options==null)options="";if(options.find("fixed-height"))h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)Rounded(v[i],options);if(options.find("height"))SameHeight(selector,h);};function Rounded(selector,options){var i,top="",bottom="",v=new Array();if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.find("tl")){top="both";if(!options.find("tr"))top="left";}else if(options.find("tr"))top="right";if(options.find("bl")){bottom="both";if(!options.find("br"))bottom="left";}else if(options.find("br"))bottom="right";}if(top==""&&bottom==""&& !options.find("none")){top="both";bottom="both";}v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!="")AddTop(v[i],top,options);if(bottom!="")AddBottom(v[i],bottom,options);}};function AddTop(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}else{bk=getParentBk(el);border=Mix(color,bk);}d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Top");if(options.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}else if(options.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}else d.style.marginBottom=(p-5)+"px";for(i=1;i<=lim;i++)d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop="0";el.insertBefore(d,el.firstChild);};function AddBottom(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}else{bk=getParentBk(el);border=Mix(color,bk);}d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Bottom");if(options.find("small")){d.style.marginTop=(p-2)+"px";btype+="s";lim=2;}else if(options.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}else d.style.marginTop=(p-5)+"px";for(i=lim;i>0;i--)d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);};function CreateStrip(index,side,color,border,btype){var x=CreateEl("b");x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}return(x);};function CreateEl(x){return(document.createElement(x));};function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)el.style.display="inline-block";};function SameHeight(selector,maxh){var i,v=selector.split(","),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;els[i].style.height="auto";}for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";nc=els[i].lastChild;if(nc.className=="niftycorners")els[i].insertBefore(t,nc);else els[i].appendChild(t);}}};function getElementsBySelector(selector){var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;if(selector.find("#")){if(selector.find(" ")){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}return(objlist);}else{s=selector.split("#");tag=s[0];selid=s[1];if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}}}if(selector.find(".")){s=selector.split(".");tag=s[0];selclass=s[1];if(selclass.find(" ")){s=selclass.split(" ");selclass=s[0];tag2=s[1];}}var v=document.getElementsByTagName(tag);if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}return(objlist);};function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);};function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))return("transparent");if(c.find("rgb"))c=rgb2hex(c);return(c);};function getPadding(x,side){var p=getStyleProp(x,"padding"+side);if(p==null|| !p.find("px"))return(0);return(parseInt(p));};function getStyleProp(x,prop){if(x.currentStyle)return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);};function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}return("#"+hex);};function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}return("#"+r[0]+r[1]+r[2]);};function initARC(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox){var agt=navigator.userAgent.toLowerCase();this.major=parseInt(navigator.appVersion);this.ie=((agt.indexOf("msie")!= -1)&&(agt.indexOf("opera")== -1));this.ie3=(this.ie&&(this.major<4));this.ie4=(this.ie&&(this.major==4)&&(agt.indexOf("msie 4")!= -1));this.iemac=(this.ie&&(agt.indexOf("mac")!= -1));if(!(this.iemac||this.ie3||this.ie4)){customiseInputs(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox);}};function SelectAllLabel(f,status){var formId=document.getElementById(f);if(typeof formId.getElementsByTagName=='undefined')return;var labels=formId.getElementsByTagName("label"),label,elem,i=j=0;while(label=labels[i++])if(label.htmlFor){var e=document.getElementById(label.htmlFor);if(e.type=="checkbox"){e.label.className=status?'checkboxOn':'checkboxOff';e.checked=status;}}};function addLabelProperties(f){if(typeof f.getElementsByTagName=='undefined')return;var labels=f.getElementsByTagName("label"),label,elem,i=j=0;while(label=labels[i++]){if(typeof label.htmlFor=='undefined')return;elem=document.getElementById(label.htmlFor);if(typeof elem=='undefined'){var inputs=label.getElementsByTagName("input");if(inputs.length==0){continue;}else{elem=inputs[0];}}else if(typeof elem.label!='undefined'){continue;}else if(typeof elem.length!='undefined'&&elem.length>1&&elem.nodeName!='SELECT'){for(j=0;j<elem.length;j++){elem.item(j).label=label;}}elem.label=label;}};function toggleLabelStyle(formId,label,onClass,offClass){if(!document.getElementById|| !label)return;var form=document.getElementById(formId);if(!form)return;if(label.htmlFor){var e=document.getElementById(label.htmlFor);if(e.type=="checkbox"){e.label.className=(e.label.className==onClass)?offClass:onClass;e.checked=(e.label.className==onClass);}else if(e.type=="radio"){var radioGroup=form.elements[e.name];if(!radioGroup)return;for(var i=0;i<radioGroup.length;i++){if(radioGroup[i].label){radioGroup[i].label.className=((radioGroup[i].checked=(radioGroup[i].id==e.id))&&radioGroup[i].label)?onClass:offClass;}}}}};function customiseInputs(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox){if(!document.getElementById)return;var prettyForm=document.getElementById(formId);if(!prettyForm)return;prettyForm.onreset=function(){customiseInputs(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox);};addLabelProperties(prettyForm);var inputs=prettyForm.getElementsByTagName('input');for(var i=0;i<inputs.length;i++){if((inputs[i].type=="radio")&&inputs[i].label&&onClassRadio&&offClassRadio){inputs[i].style.position="absolute";inputs[i].style.left="-1000px";inputs[i].label.className=offClassRadio;inputs[i].label.onclick=function(){toggleLabelStyle(formId,this,onClassRadio,offClassRadio);return false;};inputs[i].onclick=function(){toggleLabelStyle(formId,this.label,onClassRadio,offClassRadio);};if(inputs[i].defaultChecked||inputs[i].checked){toggleLabelStyle(formId,inputs[i].label,onClassRadio,offClassRadio);}}if((inputs[i].type=="checkbox")&&inputs[i].label&&onClassCheckbox&&offClassCheckbox){inputs[i].style.position="absolute";inputs[i].style.left="-1000px";inputs[i].label.className=offClassCheckbox;inputs[i].checked=false;inputs[i].label.onclick=function(){toggleLabelStyle(formId,this,onClassCheckbox,offClassCheckbox);return false;};inputs[i].onclick=function(){toggleLabelStyle(formId,this.label,onClassCheckbox,offClassCheckbox);};if(inputs[i].defaultChecked||inputs[i].checked){toggleLabelStyle(formId,inputs[i].label,onClassCheckbox,offClassCheckbox);}}if((inputs[i].type=="checkbox")||(inputs[i].type=="radio")&&inputs[i].label){if(!this.ie){}}}};window.dhtmlHistory={initialize:function(){if(this.isInternetExplorer()==false){return;}if(historyStorage.hasKey("DhtmlHistory_pageLoaded")==false){this.fireOnNewListener=false;this.firstLoad=true;historyStorage.put("DhtmlHistory_pageLoaded",true);}else{this.fireOnNewListener=true;this.firstLoad=false;}},addListener:function(callback){this.listener=callback;if(this.fireOnNewListener==true){this.fireHistoryEvent(this.currentLocation);this.fireOnNewListener=false;}},add:function(newLocation,historyData){var self=this;var addImpl=function(){if(self.currentWaitTime>0)self.currentWaitTime=self.currentWaitTime-self.WAIT_TIME;newLocation=self.removeHash(newLocation);var idCheck=document.getElementById(newLocation);if(idCheck!=undefined||idCheck!=null){var message="Exception: History locations can not have "+"the same value as _any_ id's "+"that might be in the document, "+"due to a bug in Internet "+"Explorer; please ask the "+"developer to choose a history "+"location that does not match "+"any HTML id's in this "+"document. The following ID "+"is already taken and can not "+"be a location: "+newLocation;throw message;}historyStorage.put(newLocation,historyData);self.ignoreLocationChange=true;this.ieAtomicLocationChange=true;self.currentLocation=newLocation;if(self.isInternetExplorer())self.iframe.src="blank.html?"+newLocation;window.location.hash=newLocation;this.ieAtomicLocationChange=false;historyData();};window.setTimeout(addImpl,this.currentWaitTime);this.currentWaitTime=this.currentWaitTime+this.WAIT_TIME;},isFirstLoad:function(){if(this.firstLoad==true){return true;}else{return false;}},isInternational:function(){return false;},getVersion:function(){return "0.05";},getCurrentLocation:function(){var currentLocation=this.removeHash(window.location.hash);return currentLocation;},currentLocation:null,listener:null,iframe:null,ignoreLocationChange:null,WAIT_TIME:200,currentWaitTime:0,fireOnNewListener:null,firstLoad:null,ieAtomicLocationChange:null,create:function(){var initialHash=this.getCurrentLocation();this.currentLocation=initialHash;if(this.isInternetExplorer()){try{var aux="<iframe style='border: 0px; width: 1px; "+"height: 1px; position: absolute; bottom: 0px; "+"right: 0px; visibility: visible;' "+"name='DhtmlHistoryFrame' id='DhtmlHistoryFrame' "+"src='blank.html?"+initialHash+"'>"+"</iframe>";var search=xajax.$('ddhf')!=undefined;if(search!=undefined||search!=null){var objElement=document.createElement('div');objElement.id='ddhf';objElement.disabled=true;objElement.innerHTML=aux;document.body.appendChild(objElement);var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('opera')==0)this.WAIT_TIME=200;else this.WAIT_TIME=400;}}catch(e){}}var self=this;window.onunload=function(){self.firstLoad=null;};if(this.isInternetExplorer()==false){if(historyStorage.hasKey("DhtmlHistory_pageLoaded")==false){this.ignoreLocationChange=true;this.firstLoad=true;historyStorage.put("DhtmlHistory_pageLoaded",true);}else{this.ignoreLocationChange=false;this.fireOnNewListener=true;}}else{this.ignoreLocationChange=true;}if(this.isInternetExplorer()){this.iframe=xajax.$("DhtmlHistoryFrame");}var self=this;var locationHandler=function(){self.checkLocation();};setInterval(locationHandler,100);},fireHistoryEvent:function(newHash){var historyData=historyStorage.get(newHash);this.listener.call(null,newHash,historyData);},checkLocation:function(){if(this.isInternetExplorer()==false&&this.ignoreLocationChange==true){this.ignoreLocationChange=false;return;}if(this.isInternetExplorer()==false&&this.ieAtomicLocationChange==true){return;}var hash=this.getCurrentLocation();if(hash==this.currentLocation)return;this.ieAtomicLocationChange=true;if(this.isInternetExplorer()&&this.getIFrameHash()!=hash){this.iframe.src="blank.html?"+hash;}else if(this.isInternetExplorer()){return;}this.currentLocation=hash;this.ieAtomicLocationChange=false;this.fireHistoryEvent(hash);},getIFrameHash:function(){var historyFrame=xajax.$("DhtmlHistoryFrame");var doc=historyFrame.contentWindow.document;var hash=new String(doc.location.search);if(hash.length==1&&hash.charAt(0)=="?")hash="";else if(hash.length>=2&&hash.charAt(0)=="?")hash=hash.substring(1);return hash;},removeHash:function(hashValue){if(hashValue==null||hashValue==undefined)return null;else if(hashValue=="")return "";else if(hashValue.length==1&&hashValue.charAt(0)=="#")return "";else if(hashValue.length>1&&hashValue.charAt(1)=="0")return "";else if(hashValue.length>1&&hashValue.charAt(0)=="#")return hashValue.substring(1);else return hashValue;},iframeLoaded:function(newLocation){if(this.ignoreLocationChange==true){this.ignoreLocationChange=false;return;}var hash=new String(newLocation.search);if(hash.length==1&&hash.charAt(0)=="?")hash="";else if(hash.length>=2&&hash.charAt(0)=="?")hash=hash.substring(1);if(this.pageLoadEvent!=true){window.location.hash=hash;}this.fireHistoryEvent(hash);},isInternetExplorer:function(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('opera')!= -1)return true;if(document.all&&userAgent.indexOf('msie')!= -1){return true;}else{return false;}}};window.historyStorage={debugging:false,storageHash:new Object(),hashLoaded:false,put:function(key,value){this.assertValidKey(key);if(this.hasKey(key)){this.remove(key);}this.storageHash[key]=value;this.saveHashTable();},get:function(key){this.assertValidKey(key);this.loadHashTable();var value=this.storageHash[key];if(value==undefined)return null;else return value;},remove:function(key){this.assertValidKey(key);this.loadHashTable();delete this.storageHash[key];this.saveHashTable();},reset:function(){this.storageField.value="";this.storageHash=new Object();},hasKey:function(key){this.assertValidKey(key);this.loadHashTable();if(typeof this.storageHash[key]=="undefined")return false;else return true;},isValidKey:function(key){return(typeof key=="string");},storageField:null,init:function(){var styleValue="position: absolute; top: -1000px; left: -1000px;";if(this.debugging==true){styleValue="width: 30em; height: 30em;";}try{this.storageField=xajax.$('historyStorageForm');if(this.storageField!=undefined||this.storageField!=null){var objElement=document.createElement('form');objElement.id='historyStorageForm';objElement.disabled=true;objElement.innerHTML="<textarea id='historyStorageField' "+"style='"+styleValue+"'"+"left: -1000px;' "+"name='historyStorageField'></textarea>";document.body.appendChild(objElement);this.storageField=document.body.appendChild(objElement);}}catch(e){}},assertValidKey:function(key){if(this.isValidKey(key)==false){throw "Please provide a valid key for "+"window.historyStorage, key= "+key;}},loadHashTable:function(){if(this.hashLoaded==false){try{var serializedHashTable=this.storageField.value;}catch(e){}if(serializedHashTable!=""&&serializedHashTable!=null){this.storageHash=eval('('+serializedHashTable+')');}this.hashLoaded=true;}},saveHashTable:function(){this.loadHashTable();var serializedHashTable=JSON.stringify(this.storageHash);try{this.storageField.value=serializedHashTable;}catch(e){}}};Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;switch(typeof arg){case 'object':if(arg){if(arg.______array=='______array'){for(i=0;i<arg.length;++i){v=this.stringify(arg[i]);if(s){s+=',';}s+=v;}return '['+s+']';}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=',';}s+=this.stringify(i)+':'+v;}}return '{'+s+'}';}}return 'null';case 'number':return isFinite(arg)?String(arg):'null';case 'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\';}s+=c;}else{switch(c){case '\b':s+='\\b';break;case '\f':s+='\\f';break;case '\n':s+='\\n';break;case '\r':s+='\\r';break;case '\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);}}}return s+'"';case 'boolean':return String(arg);default:return 'null';}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text};};function next(){ch=text.charAt(at);at+=1;return ch;};function white(){while(ch!=''&&ch<=' '){next();}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s;}else if(ch=='\\'){switch(next()){case 'b':s+='\b';break;case 'f':s+='\f';break;case 'n':s+='\n';break;case 'r':s+='\r';break;case 't':s+='\t';break;case 'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer;}u=u*16+t;}s+=String.fromCharCode(u);break;default:s+=ch;}}else{s+=ch;}}}error("Bad string");};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a;}while(ch){a.push(val());white();if(ch==']'){next();return a;}else if(ch!=','){break;}next();white();}}error("Bad array");};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o;}while(ch){k=str();white();if(ch!=':'){break;}next();o[k]=val();white();if(ch=='}'){next();return o;}else if(ch!=','){break;}next();white();}}error("Bad object");};function num(){var n='',v;if(ch=='-'){n='-';next();}while(ch>='0'&&ch<='9'){n+=ch;next();}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch;}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next();}while(ch>='0'&&ch<='9'){n+=ch;next();}}v= +n;if(!isFinite(v)){error("Bad number");}else{return v;}};function word(){switch(ch){case 't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true;}break;case 'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false;}break;case 'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null;}break;}error("Syntax error");};function val(){white();switch(ch){case '{':return obj();case '[':return arr();case '"':return str();case '-':return num();default:return ch>='0'&&ch<='9'?num():word();}};return val();}};function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){oldonload();func();}}};function init(){if(plughistory==false){window.historyStorage.init();window.dhtmlHistory.create();dhtmlHistory.initialize();plughistory=true;}};addLoadEvent(init);function fileQueued(file,queuelength){var listingfiles=document.getElementById("SWFUploadFileListingFiles");if(!listingfiles.getElementsByTagName("ul")[0]){var info=document.createElement("h4");info.appendChild(document.createTextNode("Очередь на загрузку"));listingfiles.appendChild(info);var ul=document.createElement("ul");listingfiles.appendChild(ul);}listingfiles=listingfiles.getElementsByTagName("ul")[0];var li=document.createElement("li");li.id=file.id;li.className="SWFUploadFileItem";li.innerHTML=file.name+" <span class='progressBar' id='"+file.id+"progress'></span><a id='"+file.id+"deletebtn' class='cancelbtn' href='javascript:xajax.swfu.cancelFile(\""+file.id+"\");'><!-- IE --></a>";listingfiles.appendChild(li);var queueinfo=document.getElementById("queueinfo");queueinfo.innerHTML="Объектов в очереди "+queuelength;document.getElementById(xajax.swfu.movieName+"UploadBtn").style.display="block";document.getElementById("cancelqueuebtn").style.display="block";};function uploadFileCancelled(file,queuelength){var li=document.getElementById(file.id);li.innerHTML=file.name+" - загруза отменена";li.className="SWFUploadFileItem uploadCancelled";var queueinfo=document.getElementById("queueinfo");queueinfo.innerHTML=queuelength+" files queued";};function uploadFileStart(file,position,queuelength){var div=document.getElementById("queueinfo");div.innerHTML="Uploading file "+position+" of "+queuelength;var li=document.getElementById(file.id);li.className+=" fileUploading";};function uploadProgress(file,bytesLoaded){var progress=document.getElementById(file.id+"progress");var percent=Math.ceil((bytesLoaded/file.size)*200);progress.style.background="#f0f0f0 url(/i/p/progressbar.png) no-repeat -"+(200-percent)+"px 0";};function uploadfileError(errcode,file,msg){if(errcode== -10)if(msg==401)ms="Вам необходимо авторизоваться";xajax.$('message').style.display='block';xajax.$('message').innerHTML='<div class="error">'+ms+' code('+errcode+'/'+msg+')</div>';};function uploadError(errno){};function uploadFileComplete(file){var li=document.getElementById(file.id);li.className="SWFUploadFileItem uploadCompleted";};function cancelQueue(){xajax.swfu.cancelQueue();document.getElementById(xajax.swfu.movieName+"UploadBtn").style.display="none";document.getElementById("cancelqueuebtn").style.display="none";};function uploadQueueComplete(file){var div=document.getElementById("queueinfo");div.innerHTML="Задание выполнено...";document.getElementById("cancelqueuebtn").style.display="none";document.getElementById(xajax.swfu.movieName+"UploadBtn").style.display="none";} 
