var $IE=document.all||false;var $NN6=document.getElementById&&!document.all;var $cookieEnabled=navigator.cookieEnabled;if("undefined"==typeof console){console={log:function(a){}}}if(window.XMLHttpRequest){if(window.ActiveXObject){$Browser="IE7"}else{$Browser="FIREFOX"}}else{$Browser="IE6"}var $TOPELEMENT=$NN6?"HTML":"BODY";var EventUtil=new Object;EventUtil.addEventHandler=function(b,c,a){ev=$NN6?"e":"window.event";regexp=new RegExp("(\\(.*)(event)","gm");a=a.replace(regexp,"$1"+ev);if(b.addEventListener){b.addEventListener(c,new Function("e",a),false)}else{if(b.attachEvent){b.attachEvent("on"+c,new Function(a))}else{b["on"+c]=$NN6?new Function("e",a):new Function(a)}}};EventUtil.removeEventHandler=function(b,c,a){if(b.removeEventListener){b.removeEventListener(c,a,false)}else{if(b.detachEvent){b.detachEvent("on"+c,a)}else{b["on"+c]=null}}};String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s*/g,"")};String.prototype.chop=function(a){return(this.length":"%3E","?":"%3F","/":"|","+":"%2B",'"':"%22","`":"%60",";":"%3B","@":"%40","=":"%3D","$":"%24",",":"%2C","#":"%23"," ":"+",_:"%5f"};var a=this.replace(/\r\n/g,"\n").trim();var d="";for(var e=0;e
";for(var b=2;b"}var f=arguments[b].label;var d=arguments[b].func;var c=arguments[b].type;e+='"}Win.createPopup(e,true,false,400)},apply:function(type,func){type=(type||"").toLowerCase();if("cancel"===type){this.destory()}else{if("continue"){var callback=this.callback;var owner=this.owner;var args=[];for(var i=0;icnt?cnt:offset;for(var idx=offset;idxfield_j){this.swap(i,j)}}}}};
var iLoud=new function(baseURL,module,action,browser){this.elemnts=[];this.loaded=false;this.floater=null;this.onload=function(){this.loaded=true;if($IE&&$int($GLOBALS.version)<7){iLoud.SelectItems.init()}this.floater=$("oDiv")};this.alter=function(element,id){id=id||$getAt(element,"alter");$hide(element);$(id).style.display=""};this.reCall={delay:50,list:new List(),timerId:false,pos:0,init:function(){this.timerId=window.setInterval(function(){iLoud.reCall.check()},this.delay)},add:function(func,delay){var item={id:iLoud.uniqId(),func:func,delay:delay};this.list.addItem(item);if(!this.timerId){onLoad.add(function(){iLoud.reCall.init()})}return item.id},remove:function(func){var total=this.list.count();var list=this.list.getList();for(var i=0;i=0?select.options[select.selectedIndex].text:"";$show(input);$hide(select)}}};this.init=function(baseURL,module,action,browser,perms,perfs){this.baseURL=baseURL;this.imageDir=this.baseURL+"/img/";this.module=module;this.action=action;this.browser=browser;this.perms=perms;this.perfs=perfs};this.Rate={position:{small:{top:-59,left:-128,maxRate:5,heightStar:6,widthStar:7},medium:{top:-112,left:-146,maxRate:5,heightStar:11,widthStar:11},"medium-over":{top:-101,left:-146,maxRate:5,heightStar:11,widthStar:11}},create:function(container,rate,type,className){className=className?className:"rate-small mainPNG";var pro=this.getProperties(rate,type);return $newEl("div",container,{"class":className,title:pro.title,style:"background-position:"+pro.left+"px "+pro.top+"px;"})},set:function(element,rate,type){var pro=this.getProperties(rate,type);$setAt(element,{style:"background-position:"+pro.left+"px "+pro.top+"px;",title:pro.title})},over:function(element,pos,type){type=type+"-over";var widthStar=this.position[type].widthStar;var rate=Math.ceil(pos/widthStar);rate=rate?rate:1;var pro=this.getProperties(rate,type);$setAt(element,{style:"background-position:"+pro.left+"px "+pro.top+"px;",title:""})},get:function(element,pos,type){var widthStar=this.position[type].widthStar;var rate=Math.ceil(pos/widthStar);return rate},getProperties:function(rate,type){rate=rate||0;var pos={left:-128,top:-59,title:""};type=type||"small";if("undefined"!=this.position[type]&&rate>=0&&rate<=this.position[type].maxRate){var maxRate=this.position[type].maxRate;var heightStar=this.position[type].heightStar;var widthStar=this.position[type].widthStar;var baseTop=this.position[type]["top"];var baseLeft=this.position[type]["left"];if(rate!=(topRate=Math.ceil(rate))){var top=baseTop-heightStar;var left=baseLeft+topRate*widthStar}else{var top=baseTop;var left=baseLeft+rate*widthStar}pos={left:left,top:top,title:Math.round(rate*100)/100+"/"+maxRate}}return pos}};this.Hint={show:function(element){$setAt(iLoud.floater,{data:""});var div=$newEl("div",iLoud.floater,{"class":"hint",data:$getAt(element,"hint")});var pos=iLoud.getPosition(element);iLoud.floater.style.left=pos.x+element.offsetWidth+"px";iLoud.floater.style.top=pos.y+"px";iLoud.show(iLoud.floater)},hide:function(){$hide(iLoud.floater)}};this.TextScroll={timerId:false,callId:false,element:null,delay:($IE&&$int($GLOBALS.version)>=7)?20:25,setWidth:function(element){if($IE){$setAt(element,{"real-width":element.offsetWidth})}else{var span=$newEl("span",false,{data:$getAt(element,"data"),style:"visibility1:hidden; font-size:11px"});$setAt(element,{"real-width":span.offsetWidth});$removeEl(span)}},scroll:function(element,reverse){var marginLeft=$int(element.style.marginLeft);var offsetWidth=$int($getAt(element,"real-width"));var maxWidth=offsetWidth-element.parentNode.offsetWidth;var step=1;this.element=element;element.style.cursor="pointer";if(!reverse){if(Math.abs(marginLeft)<=maxWidth){element.style.marginLeft=marginLeft-step+"px";this.callId=window.setTimeout(function(){iLoud.TextScroll.scroll(element)},this.delay)}else{this.callId=window.setTimeout(function(){iLoud.TextScroll.scroll(element,true)},1000)}}else{if(marginLeft<0){element.style.marginLeft=marginLeft+step+"px";this.callId=window.setTimeout(function(){iLoud.TextScroll.scroll(element,true)},this.delay)}else{if(!$isTrue(element,"stop-scroll")){this.callId=window.setTimeout(function(){iLoud.TextScroll.scroll(element)},1000)}else{this.element=null}}}},reset:function(){if(this.callId){this.element.style.marginLeft="0px";this.element=null;window.clearTimeout(this.callId);this.callId=false}},stop:function(element){$setAt(element,{"stop-scroll":true});if(this.timerId){window.clearTimeout(this.timerId);this.timerId=false}},start:function(element){if(element!=this.element){if(!$getAt(element,"real-width")){this.setWidth(element)}if($int($getAt(element,"real-width"))>(element.parentNode.offsetWidth+4)){$setAt(element,{"stop-scroll":false});element.onmouseout=function(){iLoud.TextScroll.stop(element)};if(this.element){this.reset()}this.timerId=window.setTimeout(function(){iLoud.TextScroll.scroll(element)},1000)}}}};this.Image={swap:function(img,type){if(!$isTrue(img,"banImgSwap")){var swaped=$isTrue(img,"imgSwaped");var src=img.src;switch(type){case"click":if(swaped){iLoud.Image.swap(img)}img.src=$getAt(img,"ocsrc");$setAt(img,{ocsrc:src});if(!$isTrue(img,"canImgSwap")){}break;default:if("mouseover"==type||swaped){img.src=$getAt(img,"osrc");$setAt(img,{osrc:src});$setAt(img,{imgSwaped:!swaped})}break}}},ban:function(img){$setAt(img,{banImgSwap:true})},free:function(img){$setAt(img,{banImgSwap:false})}};this.Class={P_hilite:{color:"#FF6600"},swap:function(element,type){if(!$isTrue(element,"banClassSwap")){var swaped=$isTrue(element,"classSwaped");var className=element.className;switch(type){case"click":if(swaped){iLoud.Class.swap(element)}var className=element.className;element.className=$getAt(element,"osclass");$setAt(element,{osclass:className});this.ban(element);break;default:if("mouseover"==type||swaped){element.className=$getAt(element,"oclass");$setAt(element,{oclass:className});$setAt(element,{classSwaped:!swaped})}break}}else{if("click"==type&&$isTrue(element,"unselect")){var className=element.className;this.free(element);element.className=$getAt(element,"osclass");$setAt(element,{osclass:className})}}},hilite:function(element){if($isTrue(element,"classSwaped")){iLoud.Class.swap(element)}element.style.color=this.P_hilite.color;this.ban(element)},_hilite:function(element){element.style.color="";this.free(element)},ban:function(element){$setAt(element,{banClassSwap:true})},free:function(element){$setAt(element,{banClassSwap:false})}};this.ImageButton={parent:null,isShow:function(){return this.parent},show:function(event,element){this.parent=element;iLoud.show(this.parent.getElementsByTagName("span")[1])},hide:function(event,element){if(this.isShow()&&!iLoud.isChild(this.parent,event)){iLoud.hide(this.parent.getElementsByTagName("span")[1]);this.parent=null}}};this.vlist={};this.BoxExpand={first:true,element:null,timer:null,varname:"box_expand",step:25,run:function(element){this.element=this.init(element);if(this.element){this.expand(this.element)}},expand:function(element){element.style.cssText="overflow: hidden; display: block; height: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;";var max=iLoud.getOffsetHeight(element);this.changeHeight(element,max,this.step,0);Cookie.set(this.varname,element.id)},collapse:function(element){var max=$int(iLoud.getOffsetHeight(element));element.style.cssText="overflow: hidden; display: block; height:"+max+"px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;";this.changeHeight(element,0,-this.step,max);Cookie.unset(this.varname)},changeHeight:function(element,max,step,height){var stop=false;height+=step;height=height<0?0:(max>0&&height>max?max:height);if(height>0){if(max>0&&max<=height){element.style.cssText='display:"block"';stop=true}else{setTimeout(function(){iLoud.BoxExpand.changeHeight(element,max,step,height)},10)}}if(!stop){element.style.height=height+"px"}},init:function(element){if(this.first&&(id=Cookie.get(this.varname))){this.element=$getEl(id)}if(this.element){this.collapse(this.element)}var target=$getEl($getAt(element,"expandable"));this.first=false;return target==this.element?null:target}};this.FlowButton={owner:null,icon:"oImg",popupOpen:false,isOpen:function(){return this.owner},isPopupOpen:function(){return this.popupOpen},show:function(event,element){if(!$isTrue(element,"banFlowButton")){try{this.hidePopup(event,element);this.owner=element;var className=$getAt(this.owner,"flowButton");this.icon="object"==typeof this.icon?this.icon:$getEl(this.icon);this.icon.className=className;$show(this.icon);this.owner.parentNode.appendChild(this.icon)}catch(e){}}},hide:function(event){if(this.isOpen()&&!this.isPopupOpen()&&!iLoud.isInArea(this.owner.parentNode,event)){iLoud.hide(this.icon);this.owner=null}},showPopup:function(event){iLoud.Popup.show(event,this.icon,this.owner);this.popupOpen=true},hidePopup:function(event,element){if(this.isOpen()&&element!=this.owner){if(this.isPopupOpen()){iLoud.Popup.hide(event);this.popupOpen=false}this.hide(event)}}};this.BugButton={owner:null,icon:null,on:false,show:function(element,section){if(this.on){try{var section=section;if(!this.icon){this.icon=$getEl("bug.icon")}this.owner=element;var pos=iLoud.getPosition(this.owner);this.icon.style.left=pos.x+"px";this.icon.style.top=pos.y+"px";this.icon.onclick=function(){ajaxRequest.send("bugs/list/","get",{section:section,target_module:$GLOBALS.module,target_action:$GLOBALS.action,target_url:$GLOBALS.currentURL.urlencode()},false,"LAYER",{width:650});return false};$show(this.icon)}catch(e){}}},hide:function(event){if(this.owner&&!iLoud.isInArea(this.owner,event)){$hide(this.icon);this.owner=null}},swap:function(element){$setAt(element,{data:this.on?"Show Bug":"Hide Bug"});this.on=!this.on}};this.Bug={state:false,swap:function(){this.state=!this.state;if(this.state){this.show()}else{this.hide()}},hide:function(){var icons=document.getElementsByClass("bugs");if(icons.length>0){for(var i=0;i0){for(var i in json.data){if("function"!=typeof json.data[i]){var bug_section=json.data[i].section;for(var j=0;jIf nothing happens after a few seconds Click Here')};this.logout=function(){if(iLoud.loaded){ajaxRequest.send("users/logout","post",{},function(){iLoud.manualRedirect()},"LAYER")}return false};this.getVar=function(name){return"undefined"!=typeof this[name]?this[name]:("undefined"!=typeof this.perms[name]?"y"===this.perms[name]:("undefined"!=typeof this.perfs[name]?this.perfs[name]:("undefined"!=typeof this.rateInfo[name]?this.rateInfo[name]:null)))};this.show=function(element,show){element="object"==typeof element?element:$getEl(element);if(element){var elementStyle=element.style;if(elementStyle.visibility){elementStyle.visibility="visible"}else{show=show||"inline";elementStyle.display=show}}};this.hide=function(element){var element="object"==typeof element?element:$getEl(element);if(element){var elementStyle=element.style;if(elementStyle.visibility){elementStyle.visibility="hidden"}else{elementStyle.display="none"}}};this.isVisible=function(element){var element="object"==typeof element?element:$getEl(element);if(element){var elementStyle=element.style;return("hidden"===elementStyle.visibility||"none"===elementStyle.display)?false:true}};this.SWvisible=function(element,event,show){event=event||false;if(!event){this.isVisible(element)?this.hide(element):this.show(element,show)}else{"mouseout"==event.type?this.hide(element):this.show(element,show)}};this.SWshow=function(element){this.SWvisible(element,false,"block")};this.getPosition=function(oNode){try{var oCurrentNode=oNode;var iLeft=0;var iTop=0;while(oCurrentNode&&oCurrentNode.tagName!="HTML"&&oCurrentNode.tagName!="BODY"){if(oCurrentNode.offsetLeft){iLeft+=oCurrentNode.offsetLeft}if(oCurrentNode.offsetTop){iTop+=oCurrentNode.offsetTop}oCurrentNode=oCurrentNode.offsetParent}iLeft+=document.body.scrollLeft;iTop+=document.body.scrollTop;return{x:iLeft,y:iTop}}catch(e){return{x:0,y:0}}};this.getOffsetHeight=function(parent){var children=$NN6?parent.childNodes:parent.children;var offsetHeight=0;for(var i=0;i=x1&&curPos.x<=x2&&curPos.y>=y1&&curPos.y<=y2)?true:false}catch(e){}};this.isChild=function(parent,event){try{parent="object"==typeof parent?parent:$(parent);var element=event.target||event.srcElement||event;while(element.tagName!="HTML"&&element.tagName!="BODY"&&element!=parent&&element.parentNode){element=element.parentNode}return(element==parent)}catch(e){}};this.addShadow=function(element){$newEl("div",element.parentNode,{style:"font-family: Arial,Helvetica,sans-serif; font-weight: bold; font-size: 16px; color: rgb(255, 255, 255); margin-top: -21px; margin-left: 2px;",label:$getAt(element,"data")});element.style.color="#000"};this.getCenterPos=function(width,height){width=width||0;height=height||0;var screen_width=window.screen.width;var screen_height=window.screen.height;var left=(screen_width-width)/2;var top=(screen_height-height)/4;return{left:left,top:top}};this.getFirstElement=function(element,focusElements){focusElements=focusElements||["text","select-one","selecet-multi","radio","checkbox"];var ret=false;var child=null;var children=$NN6?element.childNodes:element.children;for(var i=0;i0){if(false!==(ret=this.getFirstElement(child))){return ret}}}return false};this.json_decode=function(json){try{if(json.is_empty()){return""}return eval("("+json+")")}catch(e){}};this.json_encode=function(){var self=arguments.length?arguments[0]:this,result,tmp;if(self===null){result="null"}else{if(self!==undefined&&(tmp=$[typeof self](self))){switch(tmp){case Array:result=[];for(var i=0,j=0,k=self.length;j=start&&i100)?100:(opacity<1)?0:opacity;opacityAsDecimal=opacity/100;element.style.opacity=(opacityAsDecimal);element.style.filter="alpha(opacity="+opacity+")"};this.fade=function(element,reverse){reverse=reverse||1;this.opacity=this.opacity+reverse*1||0;this.setOpacity(element,this.opacity);if(0===this.opacity){reverse=1;this.opacity++}else{if(70===this.opacity){reverse=-1;this.opacity--}}setTimeout(function(){iLoud.fade(element,reverse)},150)}};
var URL2={target:null,params:[],qString:"",addParams:function(a,b){this.target=a;this.params=JSON.decode(b)},go:function(c,d){try{var a=this.getQString();this.clear(d,a);this.add(c);var b=this.toString();if(!this.qString.is_empty()){if("/"!=b.substring(b.length-1)){b+="/"}b+="?"+this.qString}window.location=b}catch(f){console.log(f)}},getQString:function(){var f=[];var c=window.location.toString().replace(/#.*/,"");if(-1!=c.indexOf("?")){this.qString=c.substring(c.lastIndexOf("?")+1);if(!this.qString.is_empty()){var e=this.qString.split("&");for(var b=0;b>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a+"="},decode:function(c){var a="";var k,h,f;var j,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(k);if(e!=64){a=a+String.fromCharCode(h)}if(d!=64){a=a+String.fromCharCode(f)}}a=Base64._utf8_decode(a);return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var d="";var f=0;var h=0;var g=0;var b,e=0;while(f191)&&(h<224)){e=a.charCodeAt(f+1);d+=String.fromCharCode(((h&31)<<6)|(e&63));f+=2}else{e=a.charCodeAt(f+1);b=a.charCodeAt(f+2);d+=String.fromCharCode(((h&15)<<12)|((e&63)<<6)|(b&63));f+=3}}}return d}};
String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,"")};String.prototype.empty=function(){return(0===this.trim().length)?true:false};Array.prototype.empty=function(){return(0===this.length)?true:false};var ajaxTools=function(onComplete,onWait,parameters,useCache){this.xmlHttp=null;this.onComplete=null;this.onWait=null;this.parameters=parameters||{};this.useCache=useCache;this.url="";this.ReadyState=["Uninitialized","Loading","Loaded","Interactive","Complete"];this.WaitState=["NONE","BAR","PAGE"];this.init=function(onComplete,onWait,parameters,useCache){this.setXmlHttp();this.onComplete=onComplete||this.ParseResult;this.onWait=onWait||"NONE"};this.onChange=function(readyState){switch(this.ReadyState[readyState]){case"Uninitialized":case"Loading":case"Loaded":case"Interactive":break;case"Complete":this.onSuccess();break}};this.onSuccess=function(){if($loadObject("JSON",this)){return}var json=this.getHeader("X-JSON")||false;if(json){json=this.evalJSON(json)}else{try{json=this.evalJSON(this.xmlHttp.responseText);if("undefined"==typeof json){json=false;this.evalScript(this.xmlHttp.responseText)}}catch(e){try{this.evalScript(this.xmlHttp.responseText)}catch(e){}}}try{if(this.useCache){var data=json?json:this.xmlHttp.responseText;ajaxRequest.cache.set(this.url,data)}this.onComplete(this.xmlHttp,json)}catch(e){}this.finish()};this.evalJSON=function(json){return JSON.decode((json))};this.evalScript=function(data){var matchAll=new RegExp("