var swaf={NAMESPACE:'swaf',version:'2.0',build:'080131',ScriptRegExp1:/<script[^>]*>([\u0001-\uFFFF]*?)<\/script>/gmi,ScriptRegExp2:/<script[^>]*>([\u0001-\uFFFF]*?)<\/script>/mi,define:{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY_NODE:6,COMMENT_NODE:8},ext:{},dummy:{},_$search:function(b,c){var a,node,matches;var d=[];var e=(b||document.body).getElementsByTagName('*');for(var i=0;i<e.length;i++){if(typeof e[i].id=='undefined'||!e[i].id)continue;matches=c.exec(e[i].id);if(matches&&matches.length>0){d.push(e[i])}}e=null;return d},_$$:function(j){var l=[];var d=j.split('~');var f=d[0].indexOf('##');if(f==-1)return document.getElementById(d[0]);var a=d.length==1?true:false;var e=(d.length>1)?d[1]:-1;var g=d[0].substring(0,f);var b=d[0].substr(f+2);for(var i=1;true;i++){var c=(i<10?'0':'')+i;var k=g+c+b;var h=document.getElementById(k);if(h){l.push(h);h=null}else{if(a==true)break}if(e>0&&i==e)break}return l},getElementsByClassName:function(b,e){var f=b.getElementsByTagName('*');var c=new RegExp("(^|\\s)"+e+"(\\s|$)");var d=[];for(var i=0;i<f.length;i++){var a=f[i];if(a.className.match(c))d.push(a)}f=null;c=null;return d},getElementFromForm:function(a){var b=a.split('.');return(b.length>1)?document.forms[b[0]][b[1]]:document.forms[a]},getElementsFromParent:function(c){var a=window;var b=$(c);var d=[];if(b){if(typeof b.length=='number')d=$A(b);else d.push(b)}for(;a.parent;a=a.parent){try{if(!a.parent.document||!a.parent.document.body||typeof a.parent.swaf=='undefined')break;if(a.parent.document.body.tagName!='BODY')break;if(window.top==a)break}catch(e){break}b=a.parent.$(c);if(typeof b.length=='number')d=d.concat($A(b));else d.push(b)}return d},_selector_sub:{35:function(a,b){a=(b||document).getElementsByTagName(a);if(a.length==1)a=a[0];else if(a.length==0)a=undefined;return a},64:function(a,b){a=document.getElementsByName(a);if(a.length==1)a=a[0];else if(a.length==0)a=undefined;return a},46:function(a,b){a=swaf.getElementsByClassName((b||document),a);if(a.length==1)a=a[0];else if(a.length==0)a=undefined;return a},37:function(a,b){return swaf.getElementFromForm(a)},42:function(b,c){var a=(c||document).firstChild;if(a)a=a.nextSibling;else return null;for(var i=0;a&&i<b;a=a.nextSibling){if(a.nodeType==swaf.define.ELEMENT_NODE)i++}return a},126:function(a,b){return swaf._$$(a)},43:function(a,b){return swaf.gs.$(a)},94:function(a,b){return swaf.getElementsFromParent(a)}},_$:function(b,c){if(typeof b=='string'){var a=swaf._selector_sub[b.charCodeAt(0)];if(a)b=a(b.substr(1),c);else b=document.getElementById(b)}else if(b instanceof RegExp)return swaf._$search(c,b);return b},_set_attribute:function(b,c,a){if(typeof b!='string'&&typeof b.length=='number'){for(var i=0;i<b.length;i++){if(b[i])b[i].setAttribute(c,a)}}else if(b)b.setAttribute(c,a)},onLoadDocument:function(){if(typeof window.main=="function")window.main.call(window)},onUnloadDocument:function(){if(typeof window.exit=="function")window.exit.call(window)}};swaf.$=function(a,c){if(typeof a!='string'&&typeof a.length=='number'&&a[0]){var b=[];for(var i=0,elements=[],length=a.length;i<length;i++){b.push[swaf._$(a[i],c)]}return b}return swaf._$(a,c)};if(typeof $=='undefined')var $=swaf.$;swaf.$A=function(a){var b=[];if(a.toArray)return a.toArray();if(typeof a.length=='number'){for(var i=0;i<a.length;i++){b[i]=a[i]}}return b};if(typeof $A=='undefined')var $A=swaf.$A;swaf.extend=function(d,a,c){for(var b in a){if(c==false&&typeof d[b]!='undefined')continue;d[b]=a[b]}return d};if(typeof $extend=='undefined')var $extend=swaf.extend;swaf.include=function(c){var b=document.getElementsByTagName("head");if(b){var a=document.createElement('script');a.setAttribute('src',c);a.setAttribute('type','text/javascript');b[0].appendChild(a)}b=null};if(typeof $include=='undefined')var $include=swaf.include;swaf.ext.Array={find:function(a){for(var i=0;i<this.length;i++){if(this[i]==a)return i}return-1},copy:function(){var a=new Array(this.length);for(i=0;i<this.length;i++){var b=this[i];if(b instanceof Array)a[i]=this[i].copy();else a[i]=b}return a},each:function(b,c){var d=[null,0];if(c){var a=swaf.$A(arguments);a.shift();d=d.join(a)}for(var i=0;i<this.length;i++){d[0]=this[i];d[1]=i;b.apply(b,d)}return this},remove:function(a){var b=[];for(var i=0;i<this.length;i++){if(this[i]==a){b.push(this[i]);delete this[i]}}return b},removeCompact:function(a){var b=[];for(var i=0;i<this.length;i++){if(this[i]==a)b.push(this.splice(i,1))}return b},last:function(){return this[this.length-1]},tryFn:function(){for(var i=0;i<this.length;i++){if(typeof this[i]!='function')continue;try{return this[i].apply(window,arguments)}catch(e){continue}}return null}};swaf.ext.String={trim:function(){return this.replace(/^\s+|\s+$/g,'')},ltrim:function(){return this.replace(/^\s*/g,'')},rtrim:function(){return this.replace(/\s*$/g,'')},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'')},stripScripts:function(){return this.replace(swaf.ScriptRegExp1,'')},extractScripts:function(){var b=[];var a=this.match(swaf.ScriptRegExp1)||[];for(var i=0;i<a.length;i++){b.push((a[i].match(swaf.ScriptRegExp2)||['',''])[1])}a=null;return b},evalScripts:function(){var a=this.extractScripts();for(var i=0;i<a.length;i++)eval(scrips[i])},escapeHTML:function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\"/g,'&quot;')},unescapeHTML:function(){return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"')},toArray:function(){return this.split('')},toObject:function(){var b=this.split('.');var a=window;for(i=0;i<b.length;i++){a=a[b[i]]}b=null;return a},_set_param:function(b,a){var c=new RegExp('\\{\\$'+b+'\\}','gm');return this.replace(c,a)},_set_param_obj:function(c){var a=this;for(var b in c){a=a._set_param(b,c[b])}return a},set:function(b,a){if(typeof b=='object')return this._set_param_obj(b);return this._set_param(b,a)},byteTruncate:function(d,b){b=b?b.toLocaleLowerCase():'utf-8';var e=(b=='utf-8')?3:2;var g=0;var a=this.length;var f='';for(var i=0;i<a;i++){var c=this.charAt(i);if(escape(c).length>4)g+=e;else g++;if(g<=d)f+=c;else break}return f},byteLength:function(b){b=b?b.toLocaleLowerCase():'utf-8';var d=(b=='utf-8')?3:2;var e=0;var a=this.length;for(var i=0;i<a;i++){var c=this.charAt(i);if(escape(c).length>4)e+=d;else e++}return e}};swaf.ext.Number={leadingZero:function(b){var a='000000000000'+this;return a.substr(a.length-b,b)}};swaf.ext.Function={bind:function(){var c=this;var b=swaf.$A(arguments);var a=b.shift();return function(){return c.apply(a,b.concat(swaf.$A(arguments)))}},bindAsEventListener:function(){var g=this;var e=swaf.$A(arguments);var d=e.shift();var f=function(b){var a=b||window.event;var c=arguments.callee.eventSrc;if(!a.target)a.target=c;return g.apply(d,[new swaf.eventObject(a),c,a.type].concat(e))};f.__swaf__bindedAsListener=true;return f},getProxy:function(f,b,a,d){var c=this;if(b&&a&&d){return function(){try{b.apply(f,arguments);c.apply(f,arguments);a.apply(f,arguments)}catch(e){d.call(f,error,c,arguments)}}}else if(!b&&a&&d){return function(){try{c.apply(f,arguments);a.apply(f,arguments)}catch(e){d.call(f,error,c,arguments)}}}else if(b&&!a&&d){return function(){try{b.apply(f,arguments);c.apply(f,arguments)}catch(e){d.call(f,error,c,arguments)}}}else if(b&&a&&!d){return function(){b.apply(f,arguments);c.apply(f,arguments);a.apply(f,arguments)}}else if(!b&&!a&&d){return function(){try{c.apply(f,arguments)}catch(e){d.call(f,error,c,arguments)}}}else if(!b&&a&&!d){return function(){c.apply(f,arguments);a.apply(f,arguments)}}else if(b&&!a&&!d){return function(){b.apply(f,arguments);c.apply(f,arguments)}}else{return function(){c.apply(f,arguments)}}}};swaf.ext.Object={toQueryString:function(b){var a=[];for(var d in b){var c=b[d];a.push(encodeURIComponent(d)+'='+(c?encodeURIComponent(c):''))}return a.join('&')}};if(typeof Object.toQueryString=='undefined')Object.toQueryString=swaf.ext.Object.toQueryString;swaf.extend(Array.prototype,swaf.ext.Array,false);swaf.extend(String.prototype,swaf.ext.String,false);swaf.extend(Number.prototype,swaf.ext.Number,false);swaf.extend(Function.prototype,swaf.ext.Function,false);swaf.namespace=function(f,a){var b=f.split('.');var c=window;var d=b.length-1;var e='';for(i=0;i<d;i++){if(e.length>0)e+='.';e+=b[i];if(typeof c[b[i]]=='undefined')c[b[i]]={NAMESPACE:e};c=c[b[i]]}if(!c[b[d]]){if(a){c[b[d]]=a;(c[b[d]]).NAMESPACE=f}else c[b[d]]={NAMESPACE:f}}c=null};if(typeof $namespace=='undefined')var $namespace=swaf.namespace;swaf.attr=function(b,c,a){if(typeof b=='undefined')return null;if(a){swaf._set_attribute(b,c,a);return null}if(typeof b!='string'&&typeof b.length=='number'){var d=[];for(var i=0;i<b.length;i++){d.push((b[i])?b[i].getAttribute(c):null)}return d}return b.getAttribute(c)};if(typeof $attr=='undefined')var $attr=swaf.attr;swaf.$a=function(b,c,a){return swaf.attr(b,'swaf:'+c,a)};if(typeof $a=='undefined')var $a=swaf.$a;swaf.browser={};swaf.browser.userAgent=navigator.userAgent.toLowerCase();swaf.browser.isOpera=(swaf.browser.userAgent.indexOf('opera')!=-1);swaf.browser.isSafari=(swaf.browser.userAgent.indexOf('safari')!=-1);swaf.browser.isIE=(swaf.browser.userAgent.indexOf('msie')!=-1&&!swaf.browser.isOpera);swaf.browser.isFF=(swaf.browser.userAgent.indexOf('firefox')!=-1);swaf.browser._getVersion_ie=function(a){var b=a.split(';');return(b[1].split(' '))[2]};swaf.browser._getVersion_nonie=function(a){var b=a.split(' ');return b[0]};swaf.browser._getVersion=swaf.browser.isIE?swaf.browser._getVersion_ie:swaf.browser._getVersion_nonie;swaf.browser._getClientRect_non_ie=function(){return{width:self.innerWidth,height:self.innerHeight}};swaf.browser._getClientRect_ie6_strict=function(){return{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}};swaf.browser._getClientRect_other_ie=function(){return{width:document.body.clientWidth,height:document.body.clientHeight}};swaf.browser._getScrollPosition_non_ie=function(){return{x:self.pageXOffset,y:self.pageYOffset}};swaf.browser._getScrollPosition_ie6_strict=function(){return{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}};swaf.browser._getScrollPosition_other_ie=function(){return{x:document.body.scrollLeft,y:document.body.scrollTop}};swaf.browser._getWindowPosition_1=function(){return{x:window.screenLeft,y:window.screenTop}};swaf.browser._getWindowPosition_2=function(){return{x:window.screenX,y:window.screenY}};swaf.browser.getVersion=function(){var a=swaf.browser._getVersion(navigator.appVersion);return parseFloat(a)};swaf.browser.getClientRect=function(){return self.innerHeight?swaf.browser._getClientRect_non_ie():((document.documentElement&&document.documentElement.clientHeight)?swaf.browser._getClientRect_ie6_strict():swaf.browser._getClientRect_other_ie())};swaf.browser.getScrollPosition=function(){return self.pageYOffset?swaf.browser._getScrollPosition_non_ie():((document.documentElement&&document.documentElement.scrollTop)?swaf.browser._getScrollPosition_ie6_strict():swaf.browser._getScrollPosition_other_ie())};swaf.browser.getWindowPosition=function(){return window.screenLeft?swaf.browser._getWindowPosition_1():((window.screenX)?swaf.browser._getWindowPosition_2():(function(){return{x:0,y:0}}))};swaf._event={listenerCache:null,_addListenerSub1:function(b,c,a,d){b.addEventListener(c,a,d)},_addListenerSub2:function(b,c,a,d){b.attachEvent('on'+c,a)},_addListenerSub:function(b,c,a,d){b['on'+c]=a},addListener:function(b,c,a,e){e=e||false;if(!this.listenerCache)this.listenerCache=[];var d=this.listenerCache.length;this.listenerCache.push([b,c,a,e]);a.eventSrc=b;swaf._event._addListenerSub(b,c,a,e);return d},_removeListenerSub1:function(b,c,a,d){b.removeEventListener(c,a,d)},_removeListenerSub2:function(b,c,a,d){try{b.detachEvent('on'+c,a)}catch(e){}},_removeListenerSub:function(b,c,a,d){a.eventSrc=null;delete b['on'+c]},removeListener:function(a){if(a instanceof Array){for(var i=0;i<a.length;i++){swaf._event._removeListenerSub.apply(this,swaf._event.listenerCache[a[i]]);this.listenerCache[a[i]]=null}a=null}else if(swaf._event.listenerCache){swaf._event._removeListenerSub.apply(this,swaf._event.listenerCache[a]);this.listenerCache[a]=null}},resetListener:function(){if(swaf._event.listenerCache){for(var i=0;i<swaf._event.listenerCache.length;i++){if(swaf._event.listenerCache[i]){swaf._event.removeListener(i);swaf._event.listenerCache[i]=null}}swaf._event.listenerCache=null}}};if(document.addEventListener)swaf._event._addListenerSub=swaf._event._addListenerSub1;else if(document.attachEvent)swaf._event._addListenerSub=swaf._event._addListenerSub2;if(document.removeEventListener)swaf._event._removeListenerSub=swaf._event._removeListenerSub1;else if(document.detachEvent)swaf._event._removeListenerSub=swaf._event._removeListenerSub2;swaf.listener=function(d,f,g,a){if(!d)return null;var e=null;if(typeof d.length=='number'&&d[0]){var b=[];for(var i=0;i<d.length;i++){var c=a?g.bindAsEventListener(a):(g.__swaf__bindedAsListener==true?g:g.bindAsEventListener(window));b.push(swaf._event.addListener(d[i],f,c))}e=b}else{var c=a?g.bindAsEventListener(a):(g.__swaf__bindedAsListener==true?g:g.bindAsEventListener(window));e=swaf._event.addListener(d,f,c)}c=null;return e};swaf.listener.remove=function(a){swaf._event.removeListener(a)};swaf.message={listenerCache:null,addListener:function(k,o,n){if(!k._swaf_eventMap){k._swaf_eventMap={};k._swaf_eventMapCount={}}if(!k._swaf_eventMap[o])k._swaf_eventMap[o]=[];if(typeof k._swaf_eventMapCount[o]=="undefined")k._swaf_eventMapCount[o]=0;var j=k._swaf_eventMap[o].length;k._swaf_eventMap[o].push(n);k._swaf_eventMapCount[o]++;if(!this.listenerCache)this.listenerCache=[];var h=this.listenerCache.length;this.listenerCache.push([k,o,j,n]);if(!k._swaf_eventTrigger)k._swaf_eventTrigger={};if(!k._swaf_eventTrigger[o]){var m=(function(c,a,e){var f=true;var g=swaf.$A(arguments);var b=this._swaf_eventMap[e];for(var i=0;i<b.length;i++){var d=b[i];if(d){if(typeof d=='function'&&d.apply(this,g)==false){f=false;break}else if(typeof d=='object'&&swaf.message.fireTo.apply(swaf.message,[d].concat(g))==false){f=false;break}d=null}}return f});k._swaf_eventTrigger[o]=m;var l=(k.addEventListener||k.attachEvent)?true:false;if(l){if(!k._swaf_eventTriggerHandle)k._swaf_eventTriggerHandle={};var m=(function(f,a,d){var e=true;var b=this._swaf_eventMap[d];var g=swaf.$A(arguments);for(var i=0;i<b.length;i++){var c=b[i];if(c){if(typeof c=='function'&&c.apply(this,g)==false){e=false;break}else if(typeof c=='object'&&swaf.message.fireTo.apply(swaf.message,[c].concat(g))==false){e=false;break}c=null}}return e}).bindAsEventListener(k);k._swaf_eventTriggerHandle[o]=swaf._event.addListener(k,o,m)}}return h},removeListenerSub:function(b){var c=this.listenerCache[b];var a=c[0];var e=c[1];var d=c[2];if(a._swaf_eventMap[e]){a._swaf_eventMap[e][d]=null;a._swaf_eventMapCount[e]--;if(a._swaf_eventMapCount[e]==0){a._swaf_eventMap[e]=null;a._swaf_eventTrigger[e]=null;if(a.addEventListener||a.attachEvent){swaf._event.removeListener(a._swaf_eventTriggerHandle[e])}}}this.listenerCache[b]=null;c=null},removeListener:function(a){if(a instanceof Array){for(var i=0;i<a.length;i++){swaf.message.removeListenerSub(a[i])}a=null}else{swaf.message.removeListenerSub(a)}},resetListener:function(){if(swaf.message.listenerCache){for(var i=0;i<swaf.message.listenerCache.length;i++){if(swaf.message.listenerCache[i]){swaf.message.removeListener(i);swaf.message.listenerCache[i]=null}}swaf.message.listenerCache=null}},fire:function(e,a,c){var d=swaf.$A(arguments);if(d[0]){d[0].target=a;d[0].type=c}else{d[0]={target:a,type:c}}if(a.addEventListener||a.attachEvent){var b=a['on'+c];if(typeof b=='function')b.apply(a,d)}if(a._swaf_eventTrigger&&a._swaf_eventTrigger[c]){return a._swaf_eventTrigger[c].apply(a,d)}return false},fireTo:function(c,f,b,d){var e=swaf.$A(arguments);e.shift();if(!e[0]){e[0]={target:b,type:d}}if(c._swaf_eventTrigger&&c._swaf_eventTrigger[d]){return c._swaf_eventTrigger[d].apply(c,e)}else{if(typeof c=='object'){var a='on'+d.substr(0,1).toUpperCase()+d.substr(1);if(typeof c[a]=='function')return c[a].apply(c,e)}}return false}};swaf.event=function(a,h){var d=[];if(h instanceof Array){for(var i=0;i<h.length;i++){var e=swaf.event(a,h[i]);if(e instanceof Array)d=d.concat(e);else d.push(e)}return d}if(h.isSwafClass==true&&h._swaf_event_map_define){var b=h;h={};for(var g in b._swaf_event_map_define){h[g]=b}}for(var c in h){var f=h[c];if(f instanceof Array){for(var i=0;i<f.length;i++)d.push(swaf.message.addListener(a,c,f[i]))}else{d.push(swaf.message.addListener(a,c,f))}f=null}h=null;return d};swaf.event.remove=function(a){swaf.message.removeListener(a)};swaf.event.bypass=function(c,a){var b=swaf.$A(a);b.unshift(c);swaf.message.fireTo.apply(c,b)};swaf.event.fire=function(c,b){var a=swaf.$A(arguments);a.unshift(null);swaf.message.fire.apply(swaf.message,a)};swaf.messageQueue={args:[],put:function(a){this.args.push(a);window.setTimeout(this.sendMessage.bind(this),100)},sendMessage:function(){arg=this.args.shift();if(arg)swaf.event.fire.apply(window,arg);if(this.args.length>0)window.setTimeout(this.sendMessage.bind(this),250)}};swaf.event.post=function(b,a){swaf.messageQueue.put(swaf.$A(arguments))};swaf.listener.fire=function(a,b,c){if(a.fireEvent)a.fireEvent('on'+b,c);else if(a.dispatchEvent){var e;switch(b){case'focus':case'blur':case'resize':case'scroll':e=document.createEvent('UIEvents');e.initUIEvent(b,true,true,c.view,c.detail);break;case'textInput':e=document.createEvent('TextEvent');e.initTextEvent(b,true,true,c.view,c.detail);break;case'click':case'mousedown':case'mouseup':case'mouseover':case'mousemove':case'mouseout':e=document.createEvent('MouseEvents');e.initMouseEvent(b,true,true,c.view,c.detail,c.screenX,c.screenY,c.clientX,c.clientY,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,c.button,c.relatedTarget);break;case'keydown':case'keyup':e=document.createEvent('KeyboardEvent');e.initKeyboardEvent(b,true,true,c.view,c.detail);break;case'load':case'unload':case'abort':case'error':case'select':case'change':case'submit':case'reset':e=document.createEvent('Event');e.initEvent(b,true,true);break}a.dispatchEvent(e)}};if(typeof $listener=='undefined')var $listener=swaf.listener;if(typeof $event=='undefined')var $event=swaf.event;swaf.factory={_repository:{},_referenceCounter:{}};swaf.factory.get=function(b){if(typeof b=='function'&&b.prototype.CLASSNAME)b=b.prototype.CLASSNAME;var a=b.toObject().prototype._singleton_info;if(a){var c=a.scope;if(c=='domain'){var d=swaf.gs('_swaf_factory_repository');if(!d[b]){eval('var instance=new '+b);instance.isSingleton=true;d[b]=instance}if(swaf.factory._referenceCounter[b])swaf.factory._referenceCounter[b]++;else swaf.factory._referenceCounter[b]=1;var e=swaf.gs('_swaf_factory_referenceCounter');if(e[b])e[b]++;else e[b]=1;return d[b]}else{if(!swaf.factory._repository[b]){eval('var instance=new '+b);instance.isSingleton=true;swaf.factory._repository[b]=instance}return swaf.factory._repository[b]}}return null};swaf.factory.regist=function(c,b){if(!b)b={scope:'page',lazyInit:false};c.prototype._singleton_info=b;var a=swaf.factory.get(c.prototype.CLASSNAME);return a};swaf.factory.remove=function(a){if(typeof a=='function'&&a.prototype.CLASSNAME)a=a.prototype.CLASSNAME;var b=a.toObject().prototype._singleton_info.scope;if(b=='domain'){var c=swaf.gs('_swaf_factory_repository');c[a]=null;swaf.factory._referenceCounter[a]--;var d=swaf.gs('_swaf_factory_referenceCounter');d[a]--}else{swaf.factory._repository[a]=null}};swaf.factory.unloadPage=function(){var c=swaf.gs('_swaf_factory_referenceCounter');for(var a in swaf.factory._referenceCounter){c[a]-=swaf.factory._referenceCounter[a];if(c[a]<=0){var b=swaf.gs('_swaf_factory_repository');delete b[a];delete c[a]}}};swaf.dummy._swaf_base_class=function(){};swaf.dummy._swaf_base_class.prototype={CLASSNAME:'base',_inherit_initList:[],_inherit_list:['base'],isSwafClass:true,isSingleton:false,init:function(){},instanceOf:function(a){return(this._inherit_list.find(a.prototype.CLASSNAME)>=0)}};swaf.dummy._swaf_class_keyword='parent|BASE|EXTEND|NAMESPACE';swaf.dummy._swaf_class_regexp=/\./g;swaf.dummy._swaf_process_class_inherit=function(a,d){a.prototype._inherit_list=d.prototype._inherit_list;a.prototype._inherit_list.push(a.prototype.CLASSNAME);for(var c in d.prototype){if(swaf.dummy._swaf_class_keyword.indexOf(c)>=0)continue;if(c=='EVENT_MAP'){if(!a.prototype.EVENT_MAP)a.prototype.EVENT_MAP={};$extend(a.prototype.EVENT_MAP,d.prototype.EVENT_MAP)}else{if(a.prototype[c]){var f=d.prototype.CLASSNAME.split('.');var b=d.prototype.CLASSNAME.replace(swaf.dummy._swaf_class_regexp,'_');a.prototype['parent$'+c]=d.prototype[c];a.prototype[b+'$'+c]=d.prototype[c];if(f.length>1)a.prototype[f.last()+'$'+c]=d.prototype[c];if(c=='init'){var e=d.prototype._inherit_initList.concat([b+'$'+c]);if(a.prototype._inherit_initList)a.prototype._inherit_initList=a.prototype._inherit_initList.concat(e);else a.prototype._inherit_initList=e}}else{a.prototype[c]=d.prototype[c];if(c=='init'){var e=d.prototype._inherit_initList.concat([c]);if(a.prototype._inherit_initList)a.prototype._inherit_initList=a.prototype._inherit_initList.concat(e);else a.prototype._inherit_initList=e}}}}};swaf.dummy._swaf_process_class_extend=function(a,b){for(var c in b){if(swaf.dummy._swaf_class_keyword.indexOf(c)>=0)continue;if(a.prototype[c]){a.prototype['parent$'+c]=b[c];if(b.CLASSNAME)a.prototype[b.CLASSNAME.replace(swaf.dummy._swaf_class_regexp,'_')+'$'+c]=b[c]}else{a.prototype[c]=b[c]}}};swaf.$class=function(g){for(var h in g){var a=g[h];var f=function(){if(arguments.length==50&&arguments[49]==2&&arguments[0]==1)return;if(this._swaf_event_map_define&&swaf.message){if(this.EVENT_SRC){if(typeof this.EVENT_SRC=='string')swaf.event(swaf.$(this.EVENT_SRC),this._swaf_event_map_define);else if(this.EVENT_SRC instanceof RegExp)swaf.event(swaf.$(this.EVENT_SRC),this._swaf_event_map_define);else swaf.event(this.EVENT_SRC,this._swaf_event_map_define)}else swaf.event(this,this._swaf_event_map_define)}for(var i=0;i<this._inherit_initList.length;i++){this[this._inherit_initList[i]].apply(this,arguments)}if(this.init)this.init.apply(this,arguments)};if(a.BASE){var e=null;if(a.BASE instanceof Array)e=a.BASE[0];else e=a.BASE;f.prototype=new e(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2);e=null}for(var c in a){f.prototype[c]=a[c]}f.prototype.CLASSNAME=a.NAMESPACE?a.NAMESPACE.NAMESPACE+'.'+h:h;if(!a.BASE)a.BASE=swaf.dummy._swaf_base_class;{var d=a.BASE;if(d instanceof Array&&d.length>1){for(var i=0;i<d.length;i++){swaf.dummy._swaf_process_class_inherit(f,d[i])}}else{swaf.dummy._swaf_process_class_inherit(f,d)}delete a.BASE}if(a.EXTEND){var d=a.EXTEND;if(d instanceof Array&&d.length>1){for(var i=0;i<d.length;i++){swaf.dummy._swaf_process_class_extend(f,d[i])}}else{swaf.dummy._swaf_process_class_extend(f,d)}delete a.EXTEND}if(a.EVENT_MAP&&swaf.message){f.prototype._swaf_event_map_define={};for(var k in a.EVENT_MAP){var b=a.EVENT_MAP[k];if(b instanceof Array){f.prototype._swaf_event_map_define[k]=[];for(var i=0;i<b.length;i++){f.prototype._swaf_event_map_define[k].push(f.prototype[b])}}else{f.prototype._swaf_event_map_define[k]=f.prototype[b]}b=null}delete a.EVENT_MAP}f.prototype.toString=function(){return this.CLASSNAME};var j=null;if(typeof a.SINGLETON!='undefined'){if(a.SINGLETON==true){j={scope:'page',lazyInit:false}}else if(typeof a.SINGLETON=='object'){j=a.SINGLETON}if(j){f.prototype._singleton_info=j}delete a.SINGLETON}if(a.NAMESPACE){a.NAMESPACE[h]=f;delete a.NAMESPACE}else{window[h]=f}if(j&&j.lazyInit==false)swaf.factory.get(f.prototype.CLASSNAME);f=null}};if(typeof $class=='undefined')var $class=swaf.$class;if(typeof $factory=='undefined')var $factory=swaf.factory;swaf.listener(window,"unload",swaf.factory.unloadPage);swaf.gs=function(b,c){var a=swaf.gs.get(b);if(!a){if(swaf.gs.enableOpener&&swaf.gs.opener){a=swaf.gs.opener.swaf.globalStorage.create(b)}else{if(!swaf.gs.window._swaf_gs_storage)swaf.gs.window._swaf_gs_storage={};a=swaf.gs.window._swaf_gs_storage[b]={}}if(a)swaf.gs.nameCache[b]=(typeof c=='undefined')?true:c}return a};swaf.gs.nameCache={};swaf.gs.childs=[];swaf.gs.childsAll=[];swaf.gs.window=window;swaf.gs.opener=null;swaf.gs.enableOpener=false;swaf.gs.get=function(a){if(swaf.gs.enableOpener&&swaf.gs.opener){return swaf.gs.opener.swaf.gs.get(a)}if(swaf.gs.window&&swaf.gs.window._swaf_gs_storage){return swaf.gs.window._swaf_gs_storage[a]}return null};swaf.gs.remove=function(b,a){if(a==true){if(swaf.gs.nameCache[b]!=true&&swaf.gs.nameCache[b]!=false)return}if(swaf.gs.enableOpener&&swaf.gs.opener){swaf.gs.opener.swaf.gs.remove(b)}else if(swaf.gs.window._swaf_gs_storage&&swaf.gs.window._swaf_gs_storage[b])swaf.gs.window._swaf_gs_storage[b]=null;swaf.gs.nameCache[b]=null};swaf.gs.onUnload=function(){if(swaf.gs.nameCache){for(selector in swaf.gs.nameCache){if(swaf.gs.nameCache[selector]==true){swaf.gs.window._swaf_gs_storage[name]=null}}}var b=window;for(var a=0;b.parent;a++,b=b.parent){try{if(!b.parent.document||!b.parent.document.body||typeof b.parent.swaf=='undefined')break;if(b.parent.document.body.tagName!='BODY')break;if(window.top==b)break}catch(e){break}if(a==0){b.parent.swaf.gs.childs.removeCompact(b)}b.parent.swaf.gs.childsAll.removeCompact(b)}};swaf.gs.onLoad=function(){var b=window;for(var a=0;b.parent;a++,b=b.parent){try{if(!b.parent.document||!b.parent.document.body||typeof b.parent.swaf=='undefined')break;if(b.parent.document.body.tagName!='BODY')break;if(window.top==b)break}catch(e){break}if(a==0){b.parent.swaf.gs.childs.push(b)}b.parent.swaf.gs.childsAll.push(b)}swaf.gs.window=b;try{if(b.opener&&b.opener.swaf)swaf.gs.opener=b.opener}catch(e){swaf.gs.opener=null}};swaf.gs.$=function(b){var a=swaf.$(b);var c=[];if(a){if(typeof a.length=='number')c=$A(a);else c.push(a)}for(var i=0;i<swaf.gs.childsAll.length;i++){a=swaf.gs.childsAll[i].swaf.$(b);if(a){if(typeof a.length=='number')c=c.concat(swaf.$A(a));else c.push(a)}}return c};swaf.gs.getAllWindows=function(){return swaf.gs.window.swaf.gs.childsAll};var _global_onLoad=function(){swaf.gs.onLoad();swaf.onLoadDocument()};var _global_onUnLoad=function(){swaf.onUnloadDocument();if(swaf.browser.isIE){swaf._event.resetListener();swaf.message.resetListener()}swaf.gs.onUnload()};if(typeof $gs=='undefined')var $gs=swaf.gs;swaf.listener(window,"load",_global_onLoad);swaf.listener(window,"unload",_global_onUnLoad);swaf.$class({eventObject:{NAMESPACE:swaf,event:null,init:function(a){this.event=a},KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(){return this.event.target||this.event.srcElement},isLeftClick:function(){return(((this.event.which)&&(this.event.which==1))||((this.event.button)&&(this.event.button==1)))},getX:function(){return this.event.pageX||(this.event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},getY:function(){return this.event.pageY||(this.event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},keyCode:function(){return this.event.keyCode},stop:function(){if(this.event.preventDefault){this.event.preventDefault();this.event.stopPropagation()}else{this.event.returnValue=false;this.event.cancelBubble=true}}}});swaf.namespace('swaf');var _swaf_execJS=function(a){return eval(a)};swaf._debug={debugMode:false,autoview:true,bInit:false,consoleHTML:'<table width="100%" border="0" cellspacing="0" cellpadding="0" id="SwafDebugMessageTable" style="font-family:Verdana Tahoma ±¼¸²Ã¼;font-size:12px;font-weight:400;"><tr style="height:15px;background:#ff0000;font-weight:600;">			<td id="swaf_debug_dnd_handle"><a onclick="swaf._debug.viewConsole();" style="cursor:pointer;">VIEW</a>&nbsp;<a onclick="swaf._debug.hideConsole();" style="cursor:pointer;">MIN</a>&nbsp;<a onclick="swaf._debug.clearCode();" style="cursor:pointer;">CLEAR1</a>&nbsp;<a onclick="swaf._debug.clearConsole();" style="cursor:pointer;">CLEAR2</a>&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="swaf._debug.hideDebug();" style="cursor:pointer;">HIDE</a></td>			</tr><tr style="height:20px;"><td><input type="text" id="swaf_debug_object_path" style="width:490px;background:#e0e0ff" value="window"/></td></tr>			<tr style="height:20px;"><td><input type="text" id="swaf_debug_objects1" style="width:150px;" value="window" readonly/>&nbsp;<select id="swaf_debug_objects2" style="width:200px;" onchange="swaf._debug.onChangeObject2();"></select>&nbsp;&nbsp;&nbsp;<span onclick="swaf._debug.goParentObject()" style="cursor:pointer;border:1px solid #a0a0ef;">&nbsp;PARENT&nbsp;</span></td></tr>			<tr style="height:200px;"><td><textarea id="SwafDebugJSConsole" style="width:490px;height:200px;font-size:11px;"></textarea></td></tr><tr><td><textarea id="SwafDebugMessageContents" style="width:490px;height:250px;" readonly></textarea></td></tr></table>',dumpObject:function(c,b){var a='';var d=b||' ';if(c instanceof Array){for(var i=0;i<c.length;i++)a+=c[i]+d}else{for(selector in c){a+=selector+' : '+c[selector]+d}}return a},initialize:function(){if(this.bInit==true)return;this.bInit=true;this.setObjectList2();swaf.listener($('SwafDebugJSConsole'),'keydown',this.onJSKeyDown,this);swaf.listener($('swaf_debug_object_path'),'keydown',this.onObj1KeyDown,this)},curObj:window,objList2:null,setObjectList2:function(){var a;var b=swaf.$('swaf_debug_objects2');if(this.curObj){a=this.getMemberList(this.curObj)}else{a=this.getMemberList(window)}this.setObjectList(a,b);this.objList2=a;this.viewValue()},onChangeObject2:function(){var b=swaf.$('swaf_debug_objects2');var a=swaf.$('swaf_debug_object_path');a.value+='.'+b.value;swaf.$('swaf_debug_objects1').value=b.value;this.curObj=this.curObj[b.value];this.setObjectList2()},getMemberList:function(c){var d=[];for(property in c){d.push({text:property+' ['+typeof c[property]+']',value:property})}d.sort(function(a,b){return a.text.toLowerCase()<b.text.toLowerCase()?-1:1});return d},setObjectList:function(c,a,b){a.options.length=0;for(var i=0;i<c.length;i++){a.options[i]=new Option();a.options[i].text=c[i].text;a.options[i].value=c[i].value}if(typeof b!='undefined')a.selectedIndex=b;c=a=null},viewValue:function(){var b=swaf.$('swaf_debug_object_path').value;try{var a=eval(b)}catch(e){this.outputDebugLn(this.dumpObject(e,'\n'))}switch(typeof a){case'number':case'string':case'boolean':this.outputDebugLn(b+' = '+a);break;case'object':if(a instanceof Array)this.outputDebugLn(this.dumpObject(a,','));break}},onObj1KeyDown:function(d,a,c){if(d.keyCode()==13){var b=swaf.$('swaf_debug_object_path').value;swaf.$('swaf_debug_objects1').value=b.split('.').last();try{this.curObj=eval(b);this.setObjectList2()}catch(e){swaf.$('swaf_debug_objects2').options.length=0;this.outputDebugLn(this.dumpObject(e,'\n'))}}},goParentObject:function(){var b=swaf.$('swaf_debug_object_path').value;var c=b.split('.');if(c.length==1)return;c.pop();swaf.$('swaf_debug_objects1').value=c.last();var a=c.join('.');swaf.$('swaf_debug_object_path').value=a;this.curObj=eval(a);this.setObjectList2()},jscode:[],onJSKeyDown:function(h,b,f){if(h.keyCode()==13){var g=swaf.$('SwafDebugJSConsole');var c=g.value;var i=c.split('\n');var d=i.last();if(d.trim().length==0)return;var a='';try{a=_swaf_execJS(d)}catch(e){a=this.dumpObject(e,'\n')}g.value=c+'\n'+a;g.scrollTop=g.scrollHeight}},clearCode:function(){swaf.$('SwafDebugJSConsole').value='';this.clearDebug()},debugMsg:'',viewConsole:function(){if(this.debugMode!=true)return;swaf.dom.setSize(swaf.$('SwafDebugMessageLayer'),500,530);this.initialize()},hideConsole:function(){swaf.dom.setSize(swaf.$('SwafDebugMessageLayer'),40,15)},clearConsole:function(){swaf.$('SwafDebugMessageContents').value='';this.clearDebug()},onDndDown:function(d,b,c){if(this.dragMode==true)return;this.dragMode=true;var a=swaf.dom.getPos(b);this.origOffset={x:d.getX()-a.x,y:d.getY()-a.y};this.dndListenerHandle=swaf.event(document,{mousemove:this.onDndMove,mouseup:this.onDndUp})},onDndMove:function(c,a,b){if(swaf._debug.dragMode==true)swaf.dom.setPos(swaf.$('SwafDebugMessageLayer'),c.getX()-swaf._debug.origOffset.x,c.getY()-swaf._debug.origOffset.y)},onDndUp:function(c,a,b){if(swaf._debug.dragMode==true){swaf._debug.dragMode=false;swaf.dom.setPos(swaf.$('SwafDebugMessageLayer'),c.getX()-swaf._debug.origOffset.x,c.getY()-swaf._debug.origOffset.y);swaf.event.remove(swaf._debug.dndListenerHandle);swaf._debug.dndListenerHandle=null}},outputDebug:function(a){if(swaf._debug.debugMode!=true)return;this.debugMsg+=a;this.createConsole();el=swaf.$('SwafDebugMessageContents');el.value=this.debugMsg;if(this.autoview==false)this.hideDebug();else el.scrollTop=el.scrollHeight;el=null},createConsole:function(){var a=document.getElementById('SwafDebugMessageLayer');if(!a){a=document.createElement('div');a.id='SwafDebugMessageLayer';a.style.position='absolute';a.style.left='0px';a.style.top='0px';a.style.background='white';a.style.border='1px solid red';a.style.zIndex=9999;a.style.width='40px';a.style.height='15px';a.style.overflow='hidden';a.dragMode=false;document.body.appendChild(a);a.innerHTML=this.consoleHTML;$style.opacity(a,0.9);swaf.listener($('swaf_debug_dnd_handle'),'mousedown',this.onDndDown,this)}},outputDebugLn:function(a){if(swaf._debug.debugMode!=true)return;this.outputDebug(a+'\n')},clearDebug:function(){this.debugMsg=''},hideDebug:function(){var a=swaf.$('SwafDebugMessageLayer');if(a)swaf.dom.hide(a)},showDebug:function(){if(this.debugMode!=true)return;this.createConsole();swaf.dom.show(swaf.$('SwafDebugMessageLayer'))},setDebugMode:function(b,c,a){this.debugMode=b;this.autoview=(typeof c=='undefined')?true:c;if(b==true){this.debugKeyCode=(typeof a=='undefined')?68:a;this.debugModeHandle=swaf.listener(document,'keydown',this.viewDebugConsole,this)}else{this.hideDebug();if(this.debugModeHandle)swaf.listener.remove(this.debugModeHandle);this.debugModeHandle=null}},viewDebugConsole:function(a,b){if(this.debugMode!=true)return;if(a.event.altKey&&a.event.ctrlKey&&a.event.shiftKey&&a.keyCode()==this.debugKeyCode){this.showDebug()}}};swaf.debug=function(b,c,a){swaf._debug.setDebugMode(b,c,a)};swaf.debug.output=function(a){swaf._debug.outputDebug(a)};swaf.debug.outputLn=function(a){swaf._debug.outputDebugLn(a)};swaf.debug.show=function(){swaf._debug.showDebug()};swaf.debug.hide=function(){swaf._debug.hideDebug()};swaf.debug.max=function(){swaf._debug.viewConsole()};swaf.debug.min=function(){swaf._debug.hideConsole()};swaf.debug.dump=function(a,b){return swaf._debug.dumpObject(a,b)};if(typeof $debug=='undefined')var $debug=swaf.debug;swaf.css=function(b,a){if(a)swaf.css.set(b.className);else return swaf.css.get(b)};swaf.css.set=function(b,a){b.className=a;b._swaf_class_cache=a.split(' ')};swaf.css.add=function(b,a){if(!b._swaf_class_cache){b._swaf_class_cache=b.className.split(' ')}if(b._swaf_class_cache.find(a)>=0)return;b._swaf_class_cache.push(a);b.className=b._swaf_class_cache.join(' ')};swaf.css.get=function(a){if(!a._swaf_class_cache){a._swaf_class_cache=a.className.split(' ')}return a._swaf_class_cache};swaf.css.remove=function(b,a){if(!b._swaf_class_cache){b._swaf_class_cache=b.className.split(' ')}var p=b._swaf_class_cache.find(a);if(p<0)return;b._swaf_class_cache=b._swaf_class_cache.splice(p,1);b.className=b._swaf_class_cache.join(' ')};swaf.css.getRule=function(c){var b=document.styleSheets;var a,rule;for(var i=b.length-1;i>=0;i--){try{if(b[i].cssRules)a=b[i].cssRules;else if(b[i].rules)a=b[i].rules}catch(e){continue}for(var j=0;j<a.length;j++){rule=a[j];if(rule.selectorText&&rule.selectorText==c){return rule.style}}}return null};swaf.css.addRule=function(b,a){var c=document.getElementsByTagName("head");if(c){var d=document.createElement('style');if(swaf.browser.isIE){d.setAttribute('type','text/css');if(d.styleSheet){d.styleSheet.cssText=b+' {'+a+'}'}else{var e=document.createTextNode(b+' {'+a+'}');d.appendChild(e);e=null}}else{d.setAttribute('type','text/css');d.innerHTML=b+' {'+a+'}'}c[0].appendChild(d);d=null}c=null};swaf.css.load=function(c){var b=document.getElementsByTagName("head");if(b){var a=document.createElement('link');a.setAttribute('href',c);a.setAttribute('rel','stylesheet');a.setAttribute('type','text/css');b[0].appendChild(a)}b=null};swaf.style=function(c,a,b){if(b)swaf.style.set(c,a,b);else return swaf.style.get(c,a)};swaf.style.set=function(c,a,b){if(a=='opacity')swaf.style.opacity(c,b);else c.style[a]=b};swaf.style.get=function(d,b){var c=null;var e=document.defaultView;if(swaf.browser.isIE&&b=='opacity'){c=1;if(c=(d.style.filter||'').match(/alpha\(opacity=(.*)\)/))if(c[1])c=parseFloat(c[1])/100}else if(d.style[b]){return d.style[b]}else if(d.currentStyle&&d.currentStyle[b]){return d.currentStyle[b]}else if(e&&e.getComputedStyle){var a='';for(var i=0,len=b.length;i<len;++i){if(b.charAt(i)==b.charAt(i).toUpperCase()){a=a+'-'+b.charAt(i).toLowerCase()}else{a=a+b.charAt(i)}}if(e.getComputedStyle(d,'')&&e.getComputedStyle(d,'').getPropertyValue(a)){c=e.getComputedStyle(d,'').getPropertyValue(a)}}d=null;return c};swaf.style.opacity=function(b,a){if(arguments.length>1)this.setOpacity(b,a);else return this.get(b,'opacity')};swaf.style._setOpacity_ie=function(b,a){b.style.filter='alpha(opacity='+(a*100)+')';if(!b.currentStyle||!b.currentStyle.hasLayout){b.style.zoom=1}};swaf.style._setOpacity_non_ie=function(b,a){b.style.opacity=a;b.style['-moz-opacity']=a;b.style['-khtml-opacity']=a};swaf.style.setOpacity=(swaf.browser.isIE)?swaf.style._setOpacity_ie:swaf.style._setOpacity_non_ie;swaf.style.setFromObject=function(a,b){for(selector in b){this.set(a,selector,b[selector])}};swaf.dom={setPos:function(g,x,y,c){var d=g.style.position?g.style.position:'static';var h=(d=='relative');var f=swaf.dom.getPos(g);var a=parseInt(g.style.left,10);var b=parseInt(g.style.top,10);if(isNaN(a)){a=(h)?0:g.offsetLeft}if(isNaN(b)){b=(h)?0:g.offsetTop}if(c){var e=swaf.dom.getPos(c);a+=e.x;b+=e.y;c=null}f.x=x-f.x+a;f.y=y-f.y+b;g.style.left=f.x+'px';g.style.top=f.y+'px';g=null},_getPosition_ie:function(d,f){var c=null;var a={x:0,y:0};var b=d.getBoundingClientRect();a.x=b.left+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);a.y=b.top+Math.max(document.documentElement.scrollTop,document.body.scrollTop);b=null;if(f){var e=this._getPosition_ie(f);a.x-=e.x;a.y-=e.y;f=null;e=null}d=null;c=null;return{x:isNaN(a.x)?0:a.x,y:isNaN(a.y)?0:a.y}},_getPosition_ff:function(d,f){var c=null;var a={x:0,y:0};var b=document.getBoxObjectFor(d);a={x:b.x,y:b.y};b=null;if(d.parentNode){c=d.parentNode}else{c=null}while(c&&c.tagName!='BODY'&&c.tagName!='HTML'){a.x-=c.scrollLeft;a.y-=c.scrollTop;if(c.parentNode){c=c.parentNode}else{c=null}}if(f){var e=this._getPosition_ff(f);a.x-=e.x;a.y-=e.y;f=null;e=null}d=null;c=null;return{x:isNaN(a.x)?0:a.x,y:isNaN(a.y)?0:a.y}},_getPosition_etc:function(c,e){var b=null;var a={x:0,y:0};a={x:c.offsetLeft,y:c.offsetTop};b=c.offsetParent;if(b!=c){while(b){a.x+=b.offsetLeft;a.y+=b.offsetTop;b=b.offsetParent}}if(swaf.browser.isOpera||(swaf.browser.isSafari&&c.style.position=='absolute')){a.x-=document.body.offsetLeft;a.y-=document.body.offsetTop}if(e){var d=this._getPosition_etc(e);a.x-=d.x;a.y-=d.y;e=null;d=null}c=null;b=null;return{x:isNaN(a.x)?0:a.x,y:isNaN(a.y)?0:a.y}},_getPosition:null,getPos:function(b,a){if(!this._getPosition){if(b.getBoundingClientRect)this._getPosition=this._getPosition_ie;else if(document.getBoxObjectFor)this._getPosition=this._getPosition_ff;else this._getPosition=this._getPosition_etc}return this._getPosition(b,a)},toRelative:function(x,y,b){var a={x:x,y:y};var c=this.getPosition(b);a.x-=c.x;a.y-=c.y;b=null;c=null;return a},setWidth:function(a,w){a.style.width=w+'px'},setHeight:function(a,h){a.style.height=h+'px'},getWidth:function(a){return a.offsetWidth},getHeight:function(a){return a.offsetHeight},setSize:function(a,w,h){var b=a.style;b.width=w+'px';b.height=h+'px';b=null},getSize:function(a){return{width:a.offsetWidth,height:a.offsetHeight}},setRect:function(c,x,y,b,a,d){this.setPos(c,x,y,d);this.setSize(c,b,a);c=null},getRect:function(b,d){var a=this.getPos(b,d);var c=this.getSize(b);b=null;return{x:a.x,y:a.y,width:c.width,height:c.height}},getBorderWidth:function(a){var l=parseInt(swaf.style.get(a,'borderLeftWidth'),10);var t=parseInt(swaf.style.get(a,'borderTopWidth'),10);var r=parseInt(swaf.style.get(a,'borderRightWidth'),10);var b=parseInt(swaf.style.get(a,'borderBottomWidth'),10);return{left:isNaN(l)?0:l,top:isNaN(t)?0:t,right:isNaN(r)?0:r,bottom:isNaN(b)?0:b}},getPadding:function(a){var l=parseInt(swaf.style.get(a,'paddingLeft'),10);var t=parseInt(swaf.style.get(a,'paddingTop'),10);var r=parseInt(swaf.style.get(a,'paddingRight'),10);var b=parseInt(swaf.style.get(a,'paddingBottom'),10);return{left:isNaN(l)?0:l,top:isNaN(t)?0:t,right:isNaN(r)?0:r,bottom:isNaN(b)?0:b}},getMargin:function(a){var l=parseInt(swaf.style.get(a,'marginLeft'),10);var t=parseInt(swaf.style.get(a,'marginTop'),10);var r=parseInt(swaf.style.get(a,'marginRight'),10);var b=parseInt(swaf.style.get(a,'marginBottom'),10);return{left:isNaN(l)?0:l,top:isNaN(t)?0:t,right:isNaN(r)?0:r,bottom:isNaN(b)?0:b}},getDocumentRect:function(d){if(!d)d=document;var g=-1,winHeight=-1,bodyHeight=-1;var f=-1,bodyWidth=-1,winWidth=-1;var e=swaf.dom.getMargin(d.body);var c=d.compatMode;if((c||swaf.browser.isIE)&&!swaf.browser.isOpera){switch(c){case'CSS1Compat':f=d.docElement?d.docElement.clientWidth:0;g=((window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:-1);winWidth=self.innerWidth||-1;winHeight=Math.max((d.docElement)?d.docElement.clientHeight:0,self.innerHeight||-1);bodyWidth=d.body.offsetWidth+e.left+e.right;bodyHeight=d.body.offsetHeight+e.top+e.bottom;break;default:winWidth=d.body.scrollWidth;winHeight=d.body.scrollHeight;bodyWidth=d.body.clientWidth;bodyHeight=d.body.clientHeight;break}}else{winWidth=self.innerWidth;winHeight=self.innerHeight;f=d.docElement.clientWidth;g=d.docElement.docHeight;bodyWidth=d.body.offsetWidth+e.left+e.right;bodyHeight=d.docElement.clientHeight}var w=[f,bodyWidth,winWidth].sort(function(a,b){return(a-b)});var h=[g,winHeight,bodyHeight].sort(function(a,b){return(a-b)});d=null;return{width:w[2],height:h[2]}},show:function(a,x,y,b){swaf.style.set(a,'display','block');if(x&&y)this.setPosition(a,x,y,b)},hide:function(a){swaf.style.set(a,'display','none')},toggle:function(b,x,y,c){var a=swaf.style.get(b,'display');if(a=='none')this.show(b,x,y,c);else this.hide(b)},swap:function(a,b){if(a.swapNode){a.swapNode(b)}else{var p=b.parentNode;var s=b.nextSibling;a.parentNode.insertBefore(b,a.nextSibling);p.insertBefore(a,s)}},hideByTag:function(a,b){var c=b.getElementsByTagName(a);for(var i=0;i<c.length;i++){if(c[i].style.display=='none')continue;c[i].style.visibility='hidden'}c=null},showByTag:function(a,b){var c=b.getElementsByTagName(a);for(var i=0;i<c.length;i++){c[i].style.visibility='visible'}c=null},deleteElement:function(b){try{b.innerHTML='';var a=document.getElementById('IELeakGarbageBin');if(!a){a=document.createElement('DIV');a.id='IELeakGarbageBin';a.style.display='none';document.body.appendChild(a)}a.appendChild(b);a.innerHTML=''}catch(e){}b=null},resetID:function(b){var a=b.childNodes;for(var i=0;i<a.length;i++){node=a[i];if(node.nodeType==swaf.define.ELEMENT_NODE&&node.id){node.id=''}}a=null},cloneNode:function(a){var b=a.cloneNode(true);swaf.dom.resetID(b);return b}};swaf.iframe={document:function(b){var a;try{if(b.contentWindow){a=b.contentWindow.document}else if(b.contentDocument){a=b.contentDocument.documentElement}}catch(e){a=null}return a},window:function(a){return a.contentWindow},setHTML:function(b,c){var a=this.document(b);a.open();a.write(c);a.close()},write:function(b,c){var a=this.document(b);a.write(c)},resizeWidth:function(c,e,d,f){var a=this.document(c);var b=e?a.getElementById(e):null;var w=(b)?swaf.dom.getWidth(b):(a.body.scrollWidth+(a.body.offsetWidth-a.body.clientWidth));if(typeof d=='number')w=Math.max(w,d);if(typeof f=='number')w=Math.min(w,f);swaf.dom.setWidth(c,w);return w},resizeHeight:function(c,e,d,f){var a=this.document(c);var b=e?a.getElementById(e):null;var h=(b)?swaf.dom.getHeight(b):(a.body.scrollHeight+(a.body.offsetHeight-a.body.clientHeight));if(typeof d=='number')h=Math.max(h,d);if(typeof f=='number')h=Math.min(h,f);swaf.dom.setHeight(c,h);return h},resize:function(c,e,d,f){var a=this.document(c);var b=e?a.getElementById(e):null;var w=(b)?swaf.dom.getWidth(b):(a.body.scrollWidth+(a.body.offsetWidth-a.body.clientWidth));var h=(b)?swaf.dom.getHeight(b):(a.body.scrollHeight+(a.body.offsetHeight-a.body.clientHeight));if(d){w=Math.max(w,d.width);h=Math.max(h,d.height)}if(f){w=Math.min(w,f.width);h=Math.min(h,f.height)}swaf.dom.setSize(c,w,h);return{width:w,height:h}}};if(typeof $css=='undefined')var $css=swaf.css;if(typeof $style=='undefined')var $style=swaf.style;if(typeof $dom=='undefined')var $dom=swaf.dom;if(typeof $iframe=='undefined')var $iframe=swaf.iframe;swaf.util={setPngSrc:function(b,a){if(swaf.browser.isIE==true&&swaf.browser.getVersion()<7){if(b.src!='about:blank'){b.src='about:blank';b.width=b.height=1}b.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+a+'\', sizingMethod=\'image\');'}else{b.src=a}}};swaf.$class({xmlDocument:{NAMESPACE:swaf,xmlobj:null,init:function(a){if(a){if(typeof a=='string')this.loadXML(a);else this.xmlobj=a}},setXMLObject:function(a){this.xmlobj=a},getXMLObject:function(){return this.xmlobj},loadXML:function(a){this.xmlobj=null;var b=[function(){return new ActiveXObject('Microsoft.XMLDOM')},function(){return new XMLDocument()}].tryFn();if(b){b.loadXML((typeof a=='string'?a:a.toString()));this.xmlobj=b;return this}return null},$:function(c,b){var a;if(this.xmlobj){if(b!=null)a=this.xmlobj.getElementsByTagName(c)[b];else a=this.xmlobj.getElementsByTagName(c)[0];if(a)return new swaf.xmlNode(a)}return null}}});swaf.$class({xmlNode:{NAMESPACE:swaf,xmlobj:null,init:function(a){this.node=a;if(a){this.tagName=a.tagName;this.nodeType=a.nodeType}},setXMLNode:function(a){this.node=a;if(a){this.tagName=a.tagName;this.nodeType=a.nodeType}},getXMLNode:function(){return this.node},toArray:function(c){var a=[];var b;for(b=this.node.firstChild;b;b=b.nextSibling){if(b.nodeType==swaf.define.ELEMENT_NODE){if(b.tagName!=undefined&&(c==undefined||(c!=undefined&&c==b.tagName))){a.push(new swaf.xmlNode(b))}}}return a},isNull:function(){return(this.node==null)},getValue:function(){return this.toString()},$:function(c,b){if(this.node){var a=this.node.getElementsByTagName(c)[b||0];if(a)return new swaf.xmlNode(a)}return null},$a:function(a){return this.node.getAttribute(a)},$len:function(c){var a=[];var b,len=0;if(this.node){for(b=this.node.firstChild;b;b=b.nextSibling){if(b.nodeType==swaf.define.ELEMENT_NODE){if(c){if(b.tagName==c)len++}else{len++}}}}return len},getNext:function(){return this.node.nextSibling?new swaf.xmlNode(this.node.nextSibling):null},getPrev:function(){return this.node.previousSibling?new swaf.xmlNode(this.node.previousSibling):null},getFirstChild:function(){return this.node.firstChild?new swaf.xmlNode(this.node.firstChild):null},getLastChild:function(){return this.node.lastChild?new swaf.xmlNode(this.node.lastChild):null},getParent:function(){return this.node.parentNode?new swaf.xmlNode(this.node.parentNode):null}}});swaf.extend(swaf.xmlNode.prototype,{getChilds:swaf.xmlNode.prototype.toArray});swaf.xmlNode.prototype.toString=function(){return(this.node&&this.node.firstChild)?this.node.firstChild.data:null};swaf.xml=function(a){return new swaf.xmlDocument(a)};if(typeof $xml=='undefined')var $xml=swaf.xml;swaf.dummy._swaf_ajax_dummy_func=function(){};swaf._ajax={requestHeaders:['X-Requested-With','SwafXMLHttpRequest','X-Swaf-Version',swaf.version+'.'+swaf.build],regexp_local:/%%local%%/gm,regexp_load1:/%%load%%\s*=\s*\S+/gm,regexp_load2:/%%load%%\s*=\s*/,regexp_load3:/%%load%%\s*=\s*\S+/,sequence:0,addAjaxSequence:true,ajaxDebug:false,arrMSxmlProgId:["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],msxmlProgId:null,getSequence:function(){this.sequence++;if(this.sequence>9999999)this.sequence=0;return this.sequence},_createXHR1:function(){return new XMLHttpRequest()},_createXHR2:function(){if(this.msxmlProgId){return new ActiveXObject(this.msxmlProgId)}for(var i=0;i<this.arrMSxmlProgId.length;i++){try{var a=new ActiveXObject(this.arrMSxmlProgId[i]);if(a){this.msxmlProgId=this.arrMSxmlProgId[i];return a}}catch(e){continue}}return null},createXMLHTTPRequest:function(){return null},initAjax:function(){var a=this.poolnum=(swaf.browser.isIE)?2:4;this.queue_pool=new Array(a);for(var i=0;i<a;i++){this.queue_pool[i]=new swaf._ajax.RequestProcessor()}this.queue_index=0;this.ajaxobjnum=0;this.ajaxobjcache={}},destroyAjax:function(){for(var i=0;i<this.poolnum;i++){delete this.queue_pool[i]}delete this.queue_pool;this.ajaxobjcache=null;this.ajaxobjnum=0;this.initialized=false},push_request:function(a){this.queue_index=(this.queue_index+1)%this.poolnum;return{queue:this.queue_index,sequence:this.queue_pool[this.queue_index].push_request(a)}},abortRequest:function(a){this.queue_pool[a.queue].abortRequest(a.sequence)},getResponseHeader:function(b,a){return b.getResponseHeader(a)},ajaxSyncRequest:function(h,j,d,b,g){var a=this.createXMLHTTPRequest();var c=(b?((typeof b=='string')?b:swaf.ext.Object.toQueryString(b)):'');var f=h;var e=(g)?this.requestHeaders.concat(g):this.requestHeaders.copy();if(j=='get'&&c.length>0){f+=(f.match(/\?/)?'&':'?')+c}a.open(j,f,false);if(j=='post'){a.setRequestHeader('Content-type','application/x-www-form-urlencoded')}if(a.overrideMimeType)e.push('Connection','close');for(var i=0;i<e.length;i+=2){a.setRequestHeader(e[i],e[i+1])}a.send(j=='post'?c:null);return new swaf.ajax.Response(a,d)},ajaxobjnum:0,ajaxobjcache:{},ajaxobjpool:{},getAjaxObject:function(){if(!this.ajaxobjcache[this.ajaxobjnum])this.ajaxobjcache[this.ajaxobjnum]={_objectIndex:this.ajaxobjnum};var a='ajaxScript'+this.ajaxobjnum;this.ajaxobjpool[a]=this.ajaxobjcache[this.ajaxobjnum];this.ajaxobjnum++;return a},removeAjaxObject:function(a){if(a&&a._objectIndex){this['ajaxScript'+a._objectIndex]=null;this.ajaxobjcache[a._objectIndex]=null;a=null}}};if(window.XMLHttpRequest)swaf._ajax.createXMLHTTPRequest=swaf._ajax._createXHR1;else if(window.ActiveXObject)swaf._ajax.createXMLHTTPRequest=swaf._ajax._createXHR2;swaf.ajax=function(d,b){var c=b||{method:'get',async:true,parameter:null,type:'XML',header:null,cbHandler:null,cbParameter:null};if(c.async==false){return swaf._ajax.ajaxSyncRequest(d,c.method||'get',c.type||'XML',c.parameter,c.header)}var a=new swaf.ajax.Request(c.method||'get',c.type||'XML',true);if(c.parameter)a.setParameter(c.parameter);if(c.header)a.setRequestHeader(c.header);if(c.cbHandler)a.setCallbackHandler(c.cbHandler);if(c.cbParameter)a.setCallbackParameter.call(a,c.cbParameter);a.request();return a};swaf.$class({RequestQueue:{NAMESPACE:swaf._ajax,queue:null,pool:{},garbage:null,init:function(){this.initRequestQueue()},initRequestQueue:function(){this.queue=[];this.garbage=[]},push:function(a){var b=swaf._ajax.getSequence();a.__sequence=b;this.pool[b]=a;this.queue.push(b);return b},pop:function(){if(this.queue.length>0){var a=this.queue.shift();this.garbage.push(a);return this.pool[a]}return null},remove:function(a){for(var i=0;i<this.queue;i++){if(this.queue[i]==a){this.queue.splice(i,1);delete this.pool[a];return true}}return false},clearGarbage:function(){for(var i=0;i<this.garbage.length;i++){delete this.pool[this.garbage[i]]}this.garbage.length=0}}});swaf.$class({RequestProcessor:{NAMESPACE:swaf._ajax,queue:null,busy:false,curRequest:null,xhr:null,init:function(){this.initRequestProcessor()},initRequestProcessor:function(){this.queue=new swaf._ajax.RequestQueue()},onDestroy:function(){this.queue.clearGarbage();delete this.queue},push_request:function(b){var c={parameter:'',method:'get',doctype:'XML',headers:[]};Object.extend(c,b);var a=this.queue.push(c);if(a%10==0)this.queue.clearGarbage();window.setTimeout(this.do_request.bind(this),0);return a},deleteXHR:function(){if(this.xhr){this.xhr.onreadystatechange=swaf.dummy._swaf_ajax_dummy_func;delete this.xhr}this.busy=false;this.curRequest=null},abortRequest:function(a){if(this.curRequest){if(this.curRequest.__sequence==a){if(this.xhr)this.xhr.abort();this.deleteXHR();window.setTimeout(this.do_request.bind(this),0)}}this.queue.remove(a)},do_request:function(){var b;if(this.busy==true)return;if(this.queue){b=this.queue.pop();if(!b)return}else return;this.deleteXHR();this.curRequest=b;this.busy=true;this.xhr=swaf._ajax.createXMLHTTPRequest();var c=(b.headers)?swaf._ajax.requestHeaders.concat(b.headers):swaf._ajax.requestHeaders.copy();var a=(b.parameter?((typeof b.parameter=='string')?b.parameter:swaf.ext.Object.toQueryString(b.parameter)):'');var d=b.url;if(b.method=='get'&&a.length>0){d+=(d.match(/\?/)?'&':'?')+a}if(swaf._ajax.addAjaxSequence==true){if(d.indexOf('?')==-1)d+='?swaf_ajaxseq='+b.__sequence;else d+='&swaf_ajaxseq='+b.__sequence}this.xhr.open(b.method,d,true);this.xhr.onreadystatechange=this.callbackAjax.bind(this);if(b.method=='post'){c.push('Content-type','application/x-www-form-urlencoded')}if(this.xhr.overrideMimeType)c.push('Connection','close');for(var i=0;i<c.length;i+=2){this.xhr.setRequestHeader(c[i],c[i+1])}this.xhr.send(b.method=='post'?a:'');b=null},callbackAjax:function(){if(this.xhr.readyState==4){var a=new swaf.ajax.Response(this.xhr,this.curRequest.doctype,null,this.curRequest.owner);if(this.curRequest.callback){this.curRequest.callbackParameter[0]=a;if(swaf._ajax.ajaxDebug==true){this.curRequest.callback.apply(this.curRequest.owner,this.curRequest.callbackParameter)}else{try{this.curRequest.callback.apply(this.curRequest.owner,this.curRequest.callbackParameter)}catch(err){swaf.debug.outputDebugLn('Ajax Callback Handler Exception!<br>'+swaf.debug.dumpObject(err,'<br>')+'<br>request url : '+this.curRequest.url+'<br>response status : '+a.getStatus()+' - '+a.getStatusText()+'<br>response data : <br>'+a.getText())}}}a=null;this.deleteXHR();this.do_request()}}}});swaf.$class({Request:{NAMESPACE:swaf.ajax,url:null,method:'get',doctype:'XML',parameter:null,async:true,userid:null,password:null,owner:null,callbackParameter:[null],request_sequence:null,init:function(a,c,b){this.onComplete=swaf.dummy._swaf_ajax_dummy_func;this.method=a?a.toLowerCase():'get';this.doctype=c||'XML';this.async=(typeof b!='undefined')?b:true},setUrl:function(a){this.url=a},getUrl:function(){return this.url},setOwner:function(a){this.owner=a},getOwner:function(){return this.owner},setMethod:function(a){this.method=a},getMethod:function(){return this.method},setDocType:function(a){this.doctype=a},getDocType:function(){return this.doctype},setAsync:function(a){this.async=a},getAsync:function(){return this.async},setParameter:function(a){this.parameter=a},getParameter:function(){return this.parameter},setRequestHeader:function(a){if(!this.requestHeaders)this.requestHeaders=a;else this.requestHeaders=this.requestHeaders.concat(a)},getRequestHeader:function(){return this.requestHeaders},setCallbackHandler:function(a){this.onComplete=a},getCallbackHandler:function(){return this.onComplete},setCallbackParameter:function(){this.callbackParameter=this.callbackParameter.concat(swaf.$A(arguments))},request:function(){var a={url:this.url,parameter:this.parameter,method:this.method,doctype:this.doctype,owner:this.owner||window,callback:this.onComplete,callbackParameter:this.callbackParameter,headers:this.requestHeaders};this.request_sequence=swaf._ajax.push_request(a);a=null},abort:function(){swaf._ajax.abortRequest(this.request_sequence)}}});swaf.$class({Response:{NAMESPACE:swaf.ajax,xhr:null,doctype:null,option:null,value:null,owner:null,recvtext:null,init:function(b,e,c,g,d){this.xhr=b;var a=b.readyState;var f=b.status;this.doctype=e;this.option=c;this.owner=g;this.recvtext=d;if(!this.isSuccess()&&!d){this.value=null;return}switch(e.toUpperCase()){case'JSON':this.value=this.evalResult();break;case'XML':this.value=this.getXML();break;case'HTML':this.value=this.getText();break;case'JS':this.value=this.applyScript();break;case'TEXT':this.value=this.getText().escapeHTML();break}},isSuccess:function(){return(this.xhr.status==undefined||this.xhr.status==0||(this.xhr.status>=200&&this.xhr.status<300))},getHeader:function(a){return this.xhr.getResponseHeader(a)},getDocType:function(){return this.doctype},getOwner:function(){return this.owner},getXML:function(){if(this.recvtext){return swaf.xml(this.recvtext)}else if(this.xhr){return swaf.xml(this.xhr.responseXML)}},getText:function(){if(this.recvtext){return this.recvtext}else if(this.xhr){return(this.xhr.responseText)}},evalResult:function(){var a;if(swaf._ajax.ajaxDebug==true){a=eval('('+this.getText()+')')}else{try{a=eval('('+this.getText()+')')}catch(e){swaf.debug.outputDebugLn('Evaluation failed! '+swaf.debug.dumpObject(e,'<br>')+'<br>Received data :<br>'+this.getText())}}return a},applyScript:function(){return this.getText().evalScripts()},updateHTML:function(d,e){var a=null;var b=swaf._ajax.getAjaxObject();var f=this.getText().replace(swaf._ajax.regexp_local,'swaf._ajax.ajaxobjpool.'+b);d.innerHTML=f;var g=f.extractScripts();if(g){for(var i=0;i<g.length;i++){var c=g[i].match(swaf._ajax.regexp_load1);if(c){a=c[0].replace(swaf._ajax.regexp_load2,'');a=a.replace(';','')}g[i]=g[i].replace(swaf._ajax.regexp_load3,'')}for(var i=0;i<g.length;i++)eval(g[i])}if(a)eval(a+'()');if(e)eval(e+'()')},updateIFrame:function(a){swaf.iframe.setHTML(a,this.getText())},getStatus:function(){return this.xhr.status},getStatusText:function(){return this.xhr.statusText}}});swaf.ajax.Response.prototype.toString=function(){return this.getText()};swaf._ajax.initAjax();swaf.listener(window,'unload',swaf._ajax.destroyAjax,swaf._ajax);if(typeof $ajax=='undefined')var $ajax=swaf.ajax;swaf._ajax._swaf_ajaxHTML_callback=function(a,b){a.updateHTML(b);b=null;a=null};swaf.ajaxHTML=function(c,b){var a=b||{method:'get',async:true,parameter:null,element:null};if(!a.element)return null;$extend(a,{type:'HTML',cbHandler:swaf._ajax._swaf_ajaxHTML_callback,cbParameter:[a.element]});return $ajax(c,a)};if(typeof $ajaxHTML=='undefined')var $ajaxHTML=swaf.ajaxHTML;