var qs={scriptBaseUrl:null,create:function(){return function(){this.initialize.apply(this,arguments)}},getScriptBaseUrl:function(){if(null===qs.scriptBaseUrl){qs.scriptBaseUrl=BASE_URL+"/js"+SITE_REVISION_SUFFIX}return qs.scriptBaseUrl},includeBodyScript:function(a){$.ajaxSetup({async:false});$.getScript(qs.getScriptBaseUrl()+"/"+a);$.ajaxSetup({async:true})},getParentTag:function(c,a){var b=c;while(b=b.parentNode){if(b.nodeName==a){return b}}return null},getPreviousTag:function(c,a){var b=c;while(b=b.previousSibling){if(b.nodeName==a){return b}}return null},getNextTag:function(c,a){var b=c;while(b=b.nextSibling){if(b.nodeName==a){return b}}return null},openPopupByLocation:function(b,g,c,a){if(typeof c!="number"){if(c=="MAX"){c=screen.width}else{c=screen.width/2}}if(typeof a!="number"){if(a=="MAX"){a=screen.height}else{a=screen.height-screen.height/3}}var f=screen.height/2-a/2;var e=screen.width/2-c/2;var h="toolbar=0,location=0,menubar=0,resizable=1,status=0,scrollbars=yes,screenX="+e+",screenY="+f+",top="+f+",left="+e+",width="+c+",height="+a;var d=window.open(b,g,h);d.opener=self;d.focus()},openPopup:function(c,d,b){qs.openPopupByLocation(c.href,c.getAttribute("target"),d,b);return false},getPosition:function(f){var b=0;var d=0;var a=f.offsetWidth;var e=f.offsetHeight;while(f){b+=f.offsetLeft;d+=f.offsetTop;if((f.tagName!="TABLE")&&(f.tagName!="BODY")){b+=(f.clientLeft)?f.clientLeft:0;d+=(f.clientTop)?f.clientTop:0}f=f.offsetParent}var c=new Object();c.x=b;c.y=d;c.left=b;c.top=d;c.w=a;c.h=e;c.width=a;c.height=e;return c},popupImage:function(b){var a=150;var d=100;var f=screen.height/2-d;var e=screen.width/2-a/2;var g="Toolbar=0,location=0,Menubar=0,resizable=0,Scrollbars=no";var c=window.open("","ppimg",g);c.resizeTo(300,450);c.document.writeln("<html>");c.document.writeln("<head>");c.document.writeln("<style>");c.document.writeln("html, body {margin:0px; padding:0px;}");c.document.writeln("</style>");c.document.writeln('<script type="text/javascript">');c.document.writeln("function myResize(w,h){");c.document.writeln("window.resizeTo(w,h);");c.document.writeln("}");c.document.writeln("var img = new Image(); ");c.document.writeln("window.onload = function(){");c.document.writeln("img.onload=function(){");c.document.writeln("document.getElementById('id_image').src=this.src; ");c.document.writeln("window.resizeBy(this.width-document.body.clientWidth, this.height-document.body.clientHeight);");c.document.writeln("var top = screen.height/2-this.height/2; ");c.document.writeln("var left = screen.width/2-this.width/2; ");c.document.writeln("window.moveTo(left, top)");c.document.writeln("}");c.document.writeln("img.src='"+b+"'; ");c.document.writeln("}");c.document.writeln("<\/script>");c.document.writeln("</head>");c.document.writeln("<body>");c.document.writeln('<img id="id_image" src="images/loading-arrow-16x16.gif" onclick = "window.close();" alt="Click to close window.">');c.document.writeln("</body>");c.document.writeln("</html>");c.document.close();return false},getPageSize:function(){var c,a;if(window.innerHeight&&window.scrollMaxY){c=window.innerWidth+window.scrollMaxX;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}var b,d;if(self.innerHeight){if(document.documentElement.clientWidth){b=document.documentElement.clientWidth}else{b=self.innerWidth}d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;d=document.body.clientHeight}}}if(a<d){pageHeight=d}else{pageHeight=a}if(c<b){pageWidth=c}else{pageWidth=b}arrayPageSize=new Array(pageWidth,pageHeight,b,d);return arrayPageSize},backgroundImage:function(b,c){var a=document.getElementById(b);if(!a){return false}a.style.backgroundRepeat="no-repeat";$(a).focus(function(){this.style.backgroundImage=""}).blur(function(){if(this.value==""){this.style.backgroundImage="url('"+c+"')"}else{this.style.backgroundImage=""}}).blur()},imageFs:function(e,d,b,h){var a="";var g=e.lastIndexOf(".");var c="";var f="";if(g==-1){c=e}else{c=e.substr(0,g);f=e.substr(g+1)}d=intval(d);b=intval(b);if(d||b){a=c+"_"+d+"x"+b;if(h=="outer"){a+="o"}}else{a=c}if(f.length){a+="."+f}a=a.replace(/\/userfiles\/files\//,"/userfiles/images/");return a}};var Qs_Message=qs.create();Qs_Message.prototype={initialize:function(a){this.messages=a},get:function(a,b){if(typeof b=="undefined"){b=CURRENT_LANGUAGE}if(typeof this.messages[b]=="undefined"){return""}if(typeof this.messages[b][a]=="string"){return this.messages[b][a]}if(typeof this.messages[DEFAULT_LANGUAGE][a]=="string"){return this.messages[DEFAULT_LANGUAGE][a]}return""}};var Qs_Array={get:function(a,c){if(typeof c!="undefined"){c=c.replace(/\]/g,"");var b=c.split(/\[/);while((name=array_shift(b))){if(!array_key_exists(name,a)){return null}a=a[name]}}return a},set:function(c,e,b){if(typeof e=="undefined"){return false}e=e.replace(/\]/g,"");var d=e.split(/\[/);var a=c;while((name=array_shift(d))){if(d.length==0){a[name]=b;break}if(!array_key_exists(name,a)){a[name]={}}a=a[name]}return true}};
