var T_UNDEF="undefined",T_NUM="number",T_STR="string",T_BOOL="boolean",T_OBJ="object",T_FUNC="function",M_GET="GET",M_PUT="PUT",M_POST="POST",M_DELETE="DELETE",M_CONNECT="CONNECT",M_OPTIONS="OPTIONS",M_TRACE="TRACE",M_PATCH="PATCH",M_PROPFIND="PROPFIND",M_PROPPATCH="PROPPATCH",M_MKCOL="MKCOL",M_COPY="COPY",M_MOVE="MOVE",M_LOCK="LOCK",M_UNLOCK="UNLOCK",M_INVALID="INVALID";
Function.prototype.Inherits=function(a){try{var b=function(){};b.prototype=a.prototype;this.prototype=new b;this.prototype.constructor=this;for(var c in a)if(typeof this[c]==T_UNDEF)this[c]=a[c];this.prototype._super=a;for(c in a.prototype)if(typeof this.prototype._super[c]==T_UNDEF)this.prototype._super[c]=a.prototype[c]}catch(d){alert(dfObject.Object2String(d))}};Function.prototype.Class=function(){if(this.toString().match(/^\s*function +(\w+)/))return RegExp.$1;return null};
Function.prototype.Shift=function(a){var b=T_UNDEF;if(a.length){var c=a.length;b=a[0];for(var d=1;d<c;d++)a[d-1]=a[d];a.length--}return b};Function.prototype.Invoke=function(){var a=this.Shift(arguments),b=this.Shift(arguments);if(!b||typeof b!=T_OBJ)b=this;if(typeof b[a]==T_FUNC)return b[a].apply(b,arguments)};function $(a){if(a=document.getElementById(a))a.$T=function(b){return this.getElementsByTagName(b)};return a}function $T(a){return document.getElementsByTagName(a)}
function ShowProperty(a,b){var c="";b=b?b:"\n";c+="<b>PROPERTIES</b>"+b;for(var d in a)try{c+="\u25a0 "+d+" = "+a[d]+b}catch(e){c+="\u25a0 "+d+" = ERROR{"+e+"}"+b}return c}function dfObject(){}dfObject.prototype.Initialize=function(){};dfObject.prototype.BehaveSingleton=function(){var a=this.constructor;if(a._self||a._FROM_GETINSTANCE_==null)throw Error("["+a.Class()+"] you should call ["+a.Class()+".GetInstance()] method.");delete a._FROM_GETINSTANCE_;a._self=this;a._self.Initialize();return a._self};
dfObject.GetInstance=function(){if(this._self)return this._self;this._FROM_GETINSTANCE_=1;return new this};dfObject.AddObjectContainer=function(a,b){try{if(dfObject.InstanceOf(a,Object)&&dfObject.InstanceOf(a,Array)==false)a=new Array(a);a=dfObject.InstanceOf(a,Object)?a:{};if(dfObject.InstanceOf(a,Array))a.push(b);else a=b;return a}catch(c){throw c;}};
dfObject.RemoveObjectContainer=function(a,b,c){if(!a||typeof a!=T_OBJ)return a;try{if(dfObject.InstanceOf(a,Array)){for(var d=0;d<a.length;d++)if(c?c(a[d],b):a[d]==b){a=dfObject.DeleteArrayElement(a,d);d--}if(a.length==1)a=a[0];if(a.length==0){delete a;return null}else return a}else if(c?c(a,b):a==b){delete a;return null}return a}catch(e){throw e;}};
dfObject.TypeOf=function(){if(arguments.length%2)throw Error("dfObject.TypeOf method parameter should be even number.");for(var a=0;a<arguments.length;a++){if(arguments[a]==null)arguments[a]=T_UNDEF;if((typeof arguments[a]).toLowerCase()!=arguments[a+1].toLowerCase())return false;a++}return true};
dfObject.InstanceOf=function(a,b){var c=(typeof b).toLowerCase();if(c!=T_FUNC&&c!=T_OBJ)throw Error("Param Error : \ndfObject.InstanceOf( aObj:object, aType:[function|object]");return a instanceof Object&&a instanceof b};dfObject.EscapeHTML=function(a){a=dfObject.UnEscapeHTML(a);a=a.replace(/&/g,"&#38;");a=a.replace(/\"/g,"&#34;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&#60;");return a=a.replace(/>/g,"&#62;")};
dfObject.UnEscapeHTML=function(a){if(typeof a==T_STR){a=a.replace(/&quot;|&#34;/g,'"');a=a.replace(/&lt;|&#60;/g,"<");a=a.replace(/&gt;|&#62;/g,">");a=a.replace(/&#39;/g,"'");a=a.replace(/&amp;|&#38;/g,"&")}else a="";return a};dfObject.ObjectValForKey=function(a,b){var c=null,d=function(e){if(typeof e==T_OBJ&&b.length>0){c=e[b.shift()];d(c)}};b=b.split(".");d(a);return b.length>0?null:c};dfObject.Object2Query=function(a){var b="";for(var c in a)try{b+="&"+c+"="+encodeURIComponent(a[c])}catch(d){}return b};
dfObject.Object2String=function(a,b){var c,d="",e="";if(a){for(var f in a){c=a[f];switch(typeof c){case T_OBJ:e+=c[0]?f+" : "+this.Array2String(c,b)+", ":f+" : "+this.Object2String(c,b);break;case T_STR:e+=f+" : "+c+",\n";break;default:e+=f+" : "+c+b}}if(e!=""){d=b+"{"+b+e;d=d.substring(0,d.length-1)+"\n}\n"}}return d};
dfObject.GetQueryObj=function(){var a=null,b=decodeURIComponent(location.search.substring(1,location.search.length)).replace("&amp;","&");if(b.length){a={};b=b.split("&");for(var c=0;c<b.length;c++){var d=b[c].split("=",2);d[1]=d[1]!=null?d[1]:"";a[d[0]]=d[1]}}return a};dfObject.SortAsc=function(a,b){return a<b?-1:a>b?1:0};dfObject.SortDesc=function(a,b){return a>b?-1:a<b?1:0};
dfObject.DeleteArrayElement=function(a,b){if(dfObject.InstanceOf(a,Array)&&a.length>b)return a.slice(0,b).concat(a.slice(b+1));return a};dfObject.Array2String=function(a,b){var c,d="";if(a){d+="["+b;for(var e in a){c=a[e];switch(typeof c){case T_OBJ:d+=c[0]?this.Array2String(c,b)+";":this.Object2String(c,b)+";";break;case T_STR:d+="'"+c+"', ";break;default:d+=c}}d=d.substring(0,d.length-1)+b+"]"}return d};
dfObject.GetDomainObj=function(){var a={},b=document.domain.split(".");a.host=b[0];delete b[0];a.domain=b.join(".");return a};
dfObject.UserAgent=function(){var a={},b=null;for(var c in navigator)a[c]=navigator[c];if(navigator.userAgent.match(/MSIE/i)){if(navigator.userAgent.match(/MSIE\s([\d\.]+)/i)){a.name="MSIE";a.version=RegExp.$1}}else if(navigator.userAgent.match(/SAFARI/i)){if(navigator.userAgent.match(/VERSION\/([\d\.]+)/i)){a.name="SAFARI";a.version=RegExp.$1}}else if(navigator.userAgent.match(/FIREFOX/i)){if(navigator.userAgent.match(/FIREFOX\/([\d\.]+)/i)){a.name="FIREFOX";a.version=RegExp.$1}}else if(navigator.userAgent.match(/OPERA/i))if(navigator.userAgent.match(/OPERA\/([\d\.]+)/i)){a.name=
"OPERA";a.version=RegExp.$1}if(a.version){b=a.version.split(".");a.version=b.shift()+"."+b.join("");a.version=Number(a.version)}return a};dfObject.GetOSType=function(){var a=navigator.userAgent.toUpperCase();if(a.indexOf("MAC")>=0)return"MAC";if(a.indexOf("WIN")>=0)return"WIN";if(a.indexOf("X11")>=0)return"UNIX";return""};
dfObject.GetBrowserName=function(){var a=navigator.userAgent.toUpperCase();if(a.indexOf("SAFARI")>=0)return"SAFARI";if(a.indexOf("FIREFOX")>=0)return"FIREFOX";if(a.indexOf("MSIE")>=0)return"MSIE";return""};dfObject.GetBrowserVersion=function(){var a=dfObject.GetBrowserName(),b=0,c=0,d=0,e=navigator.appVersion;if(a=="NETSCAPE"){c=e.indexOf(" ",0);b=eval(e.substring(0,c));b>=5&&b++}if(a=="IE"){e=navigator.userAgent;c=e.indexOf("MSIE ",0)+5;d=e.indexOf(";",c);b=eval(e.substring(c,d))}return b};
dfObject.DetectFlashVer=function(a,b,c){if(navigator.plugins&&navigator.plugins.length>0)if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var d="Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":""),e=navigator.plugins[d].description;d=d.split(" ");e=e.split(" ");for(var f=0;f<d.length;f++)e.shift();for(f=0;f<e.length;f++)if(e[f]=="")if(e[f+1]){e[f]=e[f+1];e[f+1]=""}e[1]=e[1].split(e[1].split("")[0])[1];e=e[0]+"."+e[1];e=e.split(".");if(e[0]>=a&&e[1]>=
b&&e[2]>=c)return true}return false};dfObject.AddCSS=function(a,b){var c=navigator.userAgent.match(new RegExp(a,"i"))?1:0,d=$T("head")[0];if(a=="ALL"||c){c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",b);d.appendChild(c);return a}return false};
dfObject.AddScript=function(a,b,c){var d=navigator.userAgent.match(new RegExp(a,"i"))?1:0,e=$T("head")[0];if(a=="ALL"||d){d=document.createElement("script");d.setAttribute("type","text/javascript");d.setAttribute("src",b);if(typeof c==T_FUNC)d.onload=function(){c()};e.appendChild(d);return a}return false};dfObject.WindowWidth=function(){return typeof window.innerWidth==T_NUM?window.innerWidth:gIsMSIE.version>=7?document.documentElement.clientWidth:document.body.clientWidth};
dfObject.WindowHeight=function(){return typeof window.innerHeight==T_NUM?window.innerHeight:gIsMSIE.version>=7?document.documentElement.clientHeight:document.body.clientHeight};dfObject.ScrollHeight=function(){return document.body&&typeof document.body.scrollHeight==T_NUM?document.body.scrollHeight:document.documentElement.scrollHeight};dfObject.ScrollWidth=function(){return document.body&&typeof document.body.scrollWidth==T_NUM?document.body.scrollWidth:document.documentElement.scrollWidth};
dfObject.IEPNG=function(a){if(gIsMSIE&&gIsMSIE.version<7)for(var b=$T("img"),c=0;c<b.length;c++)if(b[c].className=="IEPNG"){var d=b[c].src;b[c].src=a;b[c].style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+d+'")';b[c].raw_src=d;b[c].style.border="none";b[c].className=b[c].className.replace("IEPNG","")}};dfObject.ScrollLeft=function(){if(gIsMSIE&&gIsMSIE.version>=7)return document.documentElement.scrollLeft;return typeof window.scrollX==T_NUM?window.scrollX:document.body.scrollLeft};
dfObject.ScrollTop=function(){if(gIsMSIE&&gIsMSIE.version>=7)return document.documentElement.scrollTop;return typeof window.scrollY==T_NUM?window.scrollY:document.body.scrollTop};dfObject.MousePt=function(a){var b={};if(window.pageX){alert("pageX");b.x=window.pageX;b.y=window.pageY}else{b.x=dfObject.ScrollLeft()+a.clientX;b.y=dfObject.ScrollTop()+a.clientY}return b};
dfObject.FlipBlockImages=function(a,b){var c;if(c=$(a)){c=c.getElementsByTagName("img");for(var d,e=0;e<c.length;e++){d=false;if(c[e].parentNode.nodeName.toLowerCase()=="a")d=c[e].parentNode.href==location.href;if(gIsMSIE&&gIsMSIE.version<7&&c[e].className=="IEPNG")if(d&&b){if(c[e].raw_src.match(/(.+?)([01])\.(png)$/)){c[e].raw_src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3;c[e].style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+c[e].raw_src+'")'}}else{c[e].onmouseover=
function(){if(this.raw_src.match(/(.+?)([01])\.(png)$/)){this.raw_src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3;this.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.raw_src+'")'}};c[e].onmouseout=function(){if(this.raw_src.match(/(.+?)([01])\.(png)$/)){this.raw_src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3;this.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.raw_src+'")'}}}else if(c[e].src.match(/.+?[01]\.(jpg|png|gif)$/))if(d&&
b){if(c[e].src.match(/(.+?)([01])\.(jpg|png|gif)$/))c[e].src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3}else{c[e].onmouseover=function(){if(this.src.match(/(.+?)([01])\.(jpg|png|gif)$/))this.src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3};c[e].onmouseout=function(){if(this.src.match(/(.+?)([01])\.(jpg|png|gif)$/))this.src=RegExp.$1+(RegExp.$2=="0"?"1":"0")+"."+RegExp.$3}}}}};
dfObject.HrefBlank=function(){var a=$T("a"),b="^$protocol//$host/";b=b.replace("$protocol",window.location.protocol).replace("$host",window.location.host);b=new RegExp(b);for(var c=0;c<a.length;c++)if(!a[c].href.match(b))a[c].target="_blank"};dfObject.BracketParse=function(a,b,c,d){var e=null;if(typeof b==T_STR)if(b.match("\\b"+a+"\\b")){var f=b.indexOf(a+c),g=0;if(f>-1){a=f+=a.length+c.length;for(var h=0;(g=b.indexOf(d,a))>0;){h=b.indexOf(c,a);if(h==-1||h>g)break;a=g+1}if(g>f)e=b.substring(f,g)}}return e};
dfObject.JSONXSSChecker=function(a){var b=a.match(/(?:[^\w\d])([\w\d]+?[\s\t\n]+?)\(/);if(b){var c=null,d=a.indexOf(b[1]),e=0;b=d+b[1].length+1;var f=0;e=a.lastIndexOf(":",d);if(e>-1){e=a.substring(e+1,d);alert("bet"+e.length)}for(;(e=a.indexOf(")",b))>0;){f=a.indexOf("(",b);if(f==-1||f>e)break;b=e+1}if(e>d)c=a.substring(d,e+1);alert("start: "+d+", end: "+e+",\n\n"+c)}return a};
dfObject.BracketJSONParams=function(a,b){var c=dfObject.BracketParse(a,b,"[","]");if(c)try{c=eval("({"+c+"})")}catch(d){var e="\nBracketParse Error:\nbracket name: "+a+"\nstring:\n"+c+"\n";c=null;alert(ShowProperty(d)+e)}return c};dfObject.BracketParams=function(a,b){var c=dfObject.BracketParse(a,b,"[","]"),d=null,e=null;if(c&&(d=c.split(","))){e={};for(c=0;c<d.length;c++){var f=d[c].split("=");e[f[0]]=f[1]}}return e};
dfObject.NiftyBox=function(a,b,c,d,e,f,g){if(Element.IsElement(a)){var h=document.createElement("div"),i=document.createElement("div"),j=new Array(3),k=function(l,m){l.appendChild(document.createElement(m));return l.firstChild};i.className="bounds";i.style.backgroundColor=e.length?e:"#fff";if(g)h.id=g;h.className="NiftyBox";if(f)h.className+=" "+f;if(b){b=document.createElement("div");b.className="ttl";j[0]=b;b=k(b,"div");b.className="ttr";b=k(b,"div");b.className="tt";h.appendChild(j[0])}if(c){b=
document.createElement("div");b.className="tsl";j[1]=b;b=k(b,"div");b.className="tsr";b.appendChild(i);h.appendChild(j[1])}if(d){b=document.createElement("div");b.className="tbl";j[2]=b;b=k(b,"div");b.className="tbr";b=k(b,"div");b.className="tb";h.appendChild(j[2])}i.parentNode||h.appendChild(i);Element.Replace(h,a);i.appendChild(a);return h}return null};
dfObject.RoundBox=function(a,b){if(Element.IsElement(a)){var c=document.createElement("div"),d=null;Number(b.radius.replace(/px/,""));var e={header:{css:{marginLeft:b.radius,textAlign:"left",backgroundPosition:"right top",border:"none"},left:{width:b.radius,height:b.radius,marginLeft:"-"+b.radius,backgroundPosition:"left top",border:"none"}},body:{css:{marginLeft:b.radius,textAlign:"left",backgroundPosition:"right -"+b.radius,border:"none"},left:{marginLeft:"-"+b.radius,marginRight:b.radius,backgroundPosition:"left -"+
b.radius,border:"none"},container:{marginLeft:b.radius,borderLeft:"0 #fff solid"}},footer:{css:{marginLeft:b.radius,textAlign:"left",backgroundPosition:"right bottom",border:"none"},left:{width:b.radius,height:b.radius,marginLeft:"-"+b.radius,backgroundPosition:"left bottom",border:"none"}}};for(var f in e){var g=e[f],h=document.createElement("div"),i=document.createElement("div"),j=g.css;for(var k in j)h.style[k]=j[k];j=g.left;for(k in j)i.style[k]=j[k];h.appendChild(i);if(f=="body"){d=document.createElement("div");
d.innerHTML="&nbsp;";j=g.container;for(k in j)d.style[k]=j[k];if(gIsMSIE)i.innerHTML='<span style="display: block; height: 1px; overflow:hidden; font-size: 1px;">&nbsp;</span>';i.appendChild(d)}else i.innerHTML="&nbsp;";h.style.backgroundImage="url("+b.img+")";h.style.backgroundRepeat="no-repeat";i.style.backgroundImage="url("+b.img+")";i.style.backgroundRepeat="no-repeat";c.appendChild(h)}c.className=b.className?b.className:"";c.id=b.id?b.id:"";Element.Replace(c,a);d.appendChild(a);return c}return null};
dfObject.HeaderBox=function(a,b,c){if(Element.IsElement(a)){var d=null,e=null;b=new Array(b,"rbtr");for(var f=0;f<2;f++){var g=document.createElement("div");g.className=b[f];if(e)e.appendChild(g);else d=g;e=g}d.id=c?c:"";Element.Replace(d,a);a.style.paddingRight="15px";e.appendChild(a);return d}return null};dfObject.ToggleBlock=function(a){a=$(a);if(Element.IsElement(a))a.style.display=a.style.display=="none"|!a.style.display?"block":"none";return false};
dfObject.AspectResize=function(a,b){var c=a.w/a.h;a.w=Math.abs(c>b?a.h*b:a.w);a.h=Math.abs(c<b?a.w/b:a.h)};dfObject.TrackValue=function(a,b,c,d,e,f){var g={};try{if(a==b)e(b,true,f);else{var h=a<b?"up":"down";g.id=setInterval(function(){if(h=="up"?a<b:a>b){var j=a-b,k=Math.round(j/c);a-=k?k:j>0?1:-1;if(e(a,false,f)===true){clearInterval(g.id);e(b,true,f)}}else{clearInterval(g.id);e(b,true,f)}},d)}}catch(i){alert(i);clearInterval(g.id)}};dfError.Inherits(dfObject);
function dfError(){return this.BehaveSingleton()}dfError.prototype.Initialize=function(){this.errors={}};dfError.Errors=function(){return dfError.GetInstance().errors};dfError.AddError=function(a,b,c){try{var d=dfError.Errors();d[a]=dfObject.AddObjectContainer(d[a],b);if(c==true)throw b;}catch(e){throw e;}};
dfError.ShowError=function(a){try{var b=dfError.Errors();a==null?alert((err=dfObject.Object2String(b,"\n"))?err:"No Error."):alert((err=dfObject.Object2String(b[a],"\n"))?err:"No Error.")}catch(c){throw c;}};function dfColor(a){this.RGB={r:0,g:0,b:0};this.SetColor(a)}
dfColor.prototype.SetColor=function(a){if(a)if(typeof a==T_NUM)this.RGB=dfColor.Num2RGB(a);else if(typeof a==T_STR){a=a.replace(/^(#|0x)/,"");this.RGB=dfColor.Num2RGB(Number("0x"+a))}else if(typeof a==T_OBJ)if(a.r)for(var b in this.RGB)this.RGB[b]=a[b];else if(a.h){a=dfColor.HSB2RGB(a);for(b in this.RGB)this.RGB[b]=a[b]}};dfColor.RGB2HexStr=function(a){var b="";b+=a.r.toString(16);b+=a.g.toString(16);b+=a.b.toString(16);return b};
dfColor.Num2RGB=function(a){var b={r:0,g:0,b:0};a=a.toString(16);for(var c=6-a.length,d=0;c>0;){a="0"+a;c--}for(var e in b){b[e]=Number("0x"+a.substr(d,2));d+=2}return b};
dfColor.RGB2HSB=function(a){var b={h:0,s:0,b:0};a={r:a.r/255,g:a.g/255,b:a.b/255};var c,d,e;c=a.r>=a.g?a.r:a.g;c=a.b>c?a.b:c;d=a.r<=a.g?a.r:a.g;d=a.b<d?a.b:d;e=c-d;if(c==0){b.h=b.s=b.b=0;return b}b.b=Math.round(c*100);b.s=Math.round((1-d/c)*100);if(b.s!=0)if(c==a.r){b.h=60*((a.g-a.b)/e);b.h+=a.g<a.b?360:0}else if(c==a.g)b.h=60*(a.b-a.r)/e+120;else if(c==a.b)b.h=60*(a.r-a.g)/e+240;return b};
dfColor.HSB2RGB=function(a){var b={h:a.h,s:a.s/100,b:a.b/100},c={r:0,g:0,b:0},d,e,f;if(a.s==0){c.r=c.g=c.b=Math.round(b.b*255);return c}d=b.h/60;a=Math.floor(d)%6;e=d-Math.floor(d);d=b.b*(1-b.s);f=b.b*(1-b.s*e);e=b.b*(1-b.s*(1-e));switch(a){case 0:c.r=b.b;c.g=e;c.b=d;break;case 1:c.r=f;c.g=b.b;c.b=d;break;case 2:c.r=d;c.g=b.b;c.b=e;break;case 3:c.r=d;c.g=f;c.b=b.b;break;case 4:c.r=e;c.g=d;c.b=b.b;break;case 5:c.r=b.b;c.g=d;c.b=f;break}c.r=Math.round(c.r*255);c.g=Math.round(c.g*255);c.b=Math.round(c.b*
255);return c};function dfDate(){}dfDate.GetDate=function(a,b,c,d,e,f,g){var h=new Date;g=typeof g!=T_NUM?0:g;g+=typeof f!=T_NUM?0:f*60;g+=typeof e!=T_NUM?0:e*60*60;g+=typeof d!=T_NUM?0:d*24*60*60;g+=typeof c!=T_NUM?0:c*30.416666666667*24*60*60;h.setSeconds(typeof g!=T_NUM?h.getSeconds():h.getSeconds()+g);h.setFullYear(typeof b!=T_NUM?h.getFullYear():h.getFullYear()+b);a=typeof a!=T_STR?"local":a;a=a.toUpperCase();switch(a){case "GMT":return h.toGMTString();default:return h.toString()}};
function dfImageView(a,b){var c=this;this.parent=a;this.content=document.createElement("div");this.img=document.createElement("img");this.originPt={};this.startPt={};this.diffPt={};this.scrollType=b=="auto"||b=="scroll"||b=="hidden"?b:"hidden";this.content.style.cursor="move";this.parent.style.overflow="hidden";this.content.style.overflow=this.scrollType;this.img.onload=function(){c.content.scrollLeft=Math.floor((c.content.scrollWidth-c.content.clientWidth)/2);c.content.scrollTop=Math.floor((c.content.scrollHeight-
c.content.clientHeight)/2)};this.content.onmouseup=function(){this.scrollLeft=c.originPt.x+c.diffPt.x;this.scrollTop=c.originPt.y+c.diffPt.y;this.onmousemove=null};this.content.onmouseout=function(){this.scrollLeft=c.originPt.x+c.diffPt.x;this.scrollTop=c.originPt.y+c.diffPt.y;this.onmousemove=null};this.content.ondragstart=function(){window.cancelBubble=true;return false};this.content.onmousedown=function(){this.onmousemove=null;c.originPt.x=this.scrollLeft;c.originPt.y=this.scrollTop;c.startPt.x=
event.clientX;c.startPt.y=event.clientY;this.onmousemove=function(){c.diffPt.x=-(event.clientX-c.startPt.x);c.diffPt.y=-(event.clientY-c.startPt.y);this.scrollLeft=c.originPt.x+c.diffPt.x;this.scrollTop=c.originPt.y+c.diffPt.y}};return this}
dfImageView.prototype.SetImage=function(a){this.img.parentNode&&this.img.parentNode.removeChild(this.img);if(!this.content.parentNode){this.parent.innerHTML="";this.parent.appendChild(this.content)}this.img.src=a;this.content.style.width="100%";this.content.style.height=this.parent.clientHeight+"px";this.content.appendChild(this.img)};function dfString(){}dfString.Decode=function(a){a=a.split("/");for(var b=0;b<a.length;b++)a[b]=decodeURIComponent(escape(a[b]));return a.join("/")};
dfString.Encode=function(a){a=a.split("/");for(var b=0;b<a.length;b++)a[b]=encodeURIComponent(a[b]);return a.join("/")};dfString.CharEntityRefEncode=function(a){if(typeof a==T_STR){for(var b="",c=0;c<a.length;c++)b+="&#"+a.charCodeAt(c)+";";a=b}return a};dfString.CharEntityRefDecode=function(a){if(typeof a==T_STR){var b=document.createElement("pre");b.innerHTML=a;return b.textContent?b.textContent:b.innerText}return a};dfString.FixPathString=function(a){return a=a.replace(new RegExp("/+","g"),"/")};
dfString.IsASCII=function(a){return a.length==escape(a).length};dfString.AutoLink=function(a,b){if(a){var c=b?a:a.innerHTML,d,e="";d=c.match(/(?:http|https):\/\/[-_.!~*\'()a-zA-Z0-9;\/?:@&=+$,%#]+/g);c=encodeURIComponent(c);if(d){for(var f=0;f<d.length;f++)if(e.indexOf(d[f])<0){c=c.replace(RegExp(encodeURIComponent(d[f]),"g"),'<a href="%src">%src</a>'.replace(/%src/g,d[f]));e+=d[f]+" "}c=decodeURIComponent(c);if(b){alert(c);return c}else a.innerHTML=c}}return a};
var gIsMSIE=navigator.userAgent.match(/MSIE/i)?dfObject.UserAgent():null,gIsSafari=navigator.userAgent.match(/KHTML/i)?dfObject.UserAgent():null,gIsFox=navigator.userAgent.match(/FIREFOX/i)?dfObject.UserAgent():null,gIsOpera=navigator.userAgent.match(/OPERA/i)?dfObject.UserAgent():null,gMaxNum=16777216;function BoxWrap(){this.serials=[];this.defaultTarget=["div","p","h2","table"]}BoxWrap.prototype.Unload=function(){for(var a=0;a<this.serials.length;a++)Element.Replace(this.serials[a].elm,this.serials[a].box);delete this.serials;this.serials=[]};
BoxWrap.prototype.Load=function(a){var b=this;$("Log");var c=function(e){for(var f=0;f<e.length;f++){var g=dfObject.BracketParams("BoxWrap",e[f].className);if(g&&g.img&&g.radius){g.elm=e[f];g.elm.style.marginTop=0;g.elm.style.marginBottom=0;if(g.elm.childNodes.length){for(var h=0;h<g.elm.childNodes.length;h++)if(g.elm.childNodes[h].tagName){g.elm.childNodes[h].style.marginTop="0";break}for(h=g.elm.childNodes.length-1;h>=0;h--)if(g.elm.childNodes[h].tagName){g.elm.childNodes[h].style.marginBottom=
"0";break}}b.serials.push(g)}}};if(typeof a!=T_OBJ)a=this.defaultTarget;if(!(a instanceof Array))a=this.defaultTarget;for(var d=0;d<this.serials.length;d++)Element.Replace(this.serials[d].elm,this.serials[d].box);delete this.serials;this.serials=[];for(d=0;d<a.length;d++)c($T(a[d]));for(d=0;d<b.serials.length;d++)this.serials[d].box=b.serials[d].side?this.RoundSideBox(b.serials[d]):this.RoundBox(b.serials[d])};
BoxWrap.prototype.RoundBox=function(a){var b=document.createElement("div"),c=null,d=a.radius?Number(a.radius):0,e=a.shadow?Number(a.shadow):0,f=a.padding?Number(a.padding):0;d=d+e+"px";e=e+f+"px";e={header:{css:{marginLeft:d,backgroundPosition:"right top",border:"none"},left:{width:d,height:d,marginLeft:"-"+d,backgroundPosition:"left top",border:"none"}},body:{css:{marginLeft:e,backgroundPosition:"right -"+d,border:"none"},left:{marginLeft:"-"+e,marginRight:e,backgroundPosition:"left -"+d,border:"none"},
container:{marginLeft:e,borderLeft:"0 #fff solid"}},footer:{css:{marginLeft:d,backgroundPosition:"right bottom",border:"none"},left:{width:d,height:d,marginLeft:"-"+d,backgroundPosition:"left bottom",border:"none"}}};for(var g in e){f=e[g];if(!(a.nohead&&g=="header"||a.nofoot&&g=="footer")){d=document.createElement("div");var h=document.createElement("div"),i=f.css;for(var j in i)d.style[j]=i[j];i=f.left;for(j in i)h.style[j]=i[j];d.appendChild(h);if(g=="body"){c=document.createElement("div");i=f.container;
for(j in i)c.style[j]=i[j];if(gIsMSIE)h.innerHTML='<span style="display: block; height: 1px; overflow:hidden; font-size: 1px;">&nbsp;</span>';h.appendChild(c)}else h.innerHTML="&nbsp;";d.style.backgroundImage="url("+a.img+")";d.style.backgroundRepeat="no-repeat";h.style.backgroundImage="url("+a.img+")";h.style.backgroundRepeat="no-repeat";b.appendChild(d)}}b.className=a.className?a.className:"";b.id=a.id?a.id:"";Element.Replace(b,a.elm);c.appendChild(a.elm);return b};
BoxWrap.prototype.RoundSideBox=function(a){var b=document.createElement("div"),c=a.radius?Number(a.radius):0,d=a.shadow?Number(a.shadow):0,e=a.padding?Number(a.padding):0,f=c+d+d+"px";c=Math.ceil(c/2);var g={left:document.createElement("div"),right:document.createElement("div")},h={height:f,backgroundImage:"url("+a.img+")",backgroundRepeat:"no-repeat"};for(var i in g){var j=g[i];for(var k in h)j.style[k]=h[k];if(i=="left"){j.style["float"]="left";j.style.width=c+"px";j.style.height=f;j.style.marginRight=
-c+"px";j.style.backgroundPosition="left top"}else{j.style.height=f;j.style.marginLeft=c+"px";j.style.paddingRight=c+e+"px";j.style.paddingLeft=e+"px";j.style.backgroundPosition="right top"}b.appendChild(g[i])}a.elm.style.paddingTop=e+d+"px";b.className=a.className?a.className:"";b.id=a.id?a.id:"";Element.Replace(b,a.elm);g.right.appendChild(a.elm);return b};function Browser(a,b,c,d,e,f){try{this._id=a;this._browser=$(a);this._container=document.createElement("table");this._columns=document.createElement("tr");this._path="";this._delegate=f&&typeof f==T_OBJ?f:null;this._selected=[];this._browser.style.width=b;this._browser.style.height=c;this._single=e;this._colWidth=d;this._evenColor=this._oddColor="#ffffff";this._scroller=new Scroller;this._browser.appendChild(this._container);this._container.appendChild(document.createElement("tbody"));this._container.firstChild.appendChild(this._columns);
this._browser.style.overflow="auto";this._browser.style.overflowY="hidden";this._container.style.height=this._browser.clientHeight+"px";this._container.style.borderCollapse="collapse";NotificationCenter.AddObserver(this,"Resize","WindowResize");NotificationCenter.AddObserver(this,"UpdateColumn","BrowserUpdateColumn");NotificationCenter.AddObserver(this,"AddColumn","BrowserAddColumn");NotificationCenter.AddObserver(this,"RemoveColumn","BrowserRemoveColumn");NotificationCenter.AddObserver(this,"ReturnRootColumn",
"BrowserReturnRootColumn")}catch(g){alert(g)}}Browser.prototype.SetDelegate=function(a){this._delegate=a&&typeof a==T_OBJ?a:null};Browser.prototype.Visible=function(a){if(a==true||a==false)this._browser.style.display=a?"block":"none";return this._browser.style.display=="block"?true:false};Browser.prototype.SetColumnWidth=function(a){this._colWidth=a==null||a<1?this._colWidth:a;this.UpdateColumn()};
Browser.prototype.Resize=function(){var a=this._columns.childNodes,b=this._colWidth.replace(/[a-z]+/,""),c=this._colWidth.replace(/[0-9]+/,""),d=this._browser.scrollLeft,e=this._browser.scrollWidth;if(this._single){b=this._browser.clientWidth;c="px"}this._container.style.width=this._columns.childNodes.length*b+c;this._container.style.height=this._browser.clientHeight+"px";for(b=0;b<a.length;b++)if(a[b].childNodes[1]){a[b].childNodes[1].style.height=this._browser.clientHeight-a[b].childNodes[0].clientHeight-
1+"px";if(this._single)a[b].childNodes[1].style.width=this._browser.clientWidth+"px"}else a[b].childNodes[0].style.height=this._browser.clientHeight+"px";this._browser.scrollLeft=0;if(d){e=this._browser.scrollWidth-e;e=e>0?d+e:d;this._browser.scrollLeft=e<=this._browser?e:d}};
Browser.prototype.ReturnRootColumn=function(a,b,c){if(c==null||c==this._id){for(a=this._columns.getElementsByTagName("td");this._columns.childNodes.length;)this._columns.removeChild(a[a.length-1]);this._selected.length=0;this._delegate.WillSelectRow(c,1,0)}};Browser.prototype.RemoveColumn=function(a,b,c){if(c==null||c==this._id)if(this._columns.childNodes.length){a=this._columns.getElementsByTagName("td");this._columns.removeChild(a[a.length-1])}};
Browser.prototype.AddColumn=function(a,b,c){if(this._delegate&&(c==null||c==this._id)){a=this._columns.getElementsByTagName("td").length+1;b=document.createElement("td");c=document.createElement("div");var d=0;b.style.width=this._colWidth;b.style.padding="0px";b.style.verticalAlign="top";b.style.borderStyle="solid";b.style.borderWidth="0px 1px 0px 0px";b.style.borderColor="#ececec";this._delegate.HasColHeader&&this._delegate.HasColHeader(this._id,a)&&b.appendChild(this._delegate.AppendForColHeader(this._id,
a));c.style.overflow="auto";c.style.overflowX="hidden";c.style.height=this._browser.clientHeight+"px";d=this._delegate.NumberOfRowsInCol(this._id,a);if(d>0){for(var e=this,f=document.createElement("ul"),g=1;g<=d;g++){var h=document.createElement("li");h.style.cursor="pointer";h.title=a+":"+g;h.onclick=function(){var i=this.title.split(":");if(e._delegate.WillSelectRow(e._id,i[0],i[1])){if(e._selected[i[0]])e._selected[i[0]].className="";this.className="SelectedRow";e._selected[i[0]]=this}};h.appendChild(this._delegate.AppendForRowInCol(this._id,
a,g));f.appendChild(h)}c.appendChild(f);b.appendChild(c);this._columns.appendChild(b);this.UpdateColumn();this.ScrollColumn(this._columns.childNodes.length-1)}else this.UpdateColumn()}};Browser.prototype.UpdateColumn=function(){var a=this._columns.childNodes,b=this._colWidth;if(this._single)b=this._browser.clientWidth;for(var c=0;c<a.length;c++)a[c].style.width=b;this.Resize()};
Browser.prototype.ScrollColumn=function(a){if(this._columns.childNodes.length){var b=this._colWidth.replace(/[a-z]+/,"");if(this._single)b=this._browser.clientWidth+1;this._scroller.Scroll(this._browser,"h",b*a,true,10)}};function Delegate(){this.delegate={};this.defaultTarget=["a","form","input","select","textarea","button"];this.serials=[]}Delegate.prototype.Add=function(a){if(a&&typeof a==T_OBJ)if(a.constructor.toString().match(/^\s*function\s+(.+?)(?:\()/))this.delegate[RegExp.$1]=a};
Delegate.prototype.Load=function(a){if(this.delegate&&typeof this.delegate==T_OBJ){var b=this,c=function(e){for(var f=null,g=e.length,h=0;h<g;h++)if(f=dfObject.BracketJSONParams("Delegate",e[h].className))for(var i in f)if(b.delegate[f[i].app]){f[i].invoke=f[i].invoke?"Ix"+f[i].invoke:null;typeof b.delegate[f[i].app][f[i].invoke]==T_FUNC?b.serials.push(EventCenter.AddEvent(e[h],i,b,"Invoke",true,f[i])):alert("Delegate.js: Could not register method.\nerrstr: delegate["+f[i].app+"] does not implement method["+
f[i].invoke+"].\n")}else alert("Delegate.js: Could not register method.\nerrstr: delegate["+f[i].app+"] does not registered.\n")};if(typeof a!=T_OBJ||!(a instanceof Array))a=this.defaultTarget;for(var d=0;d<this.serials.length;d++)EventCenter.RemoveEvent(this.serials[d]);delete this.serials;this.serials=[];for(d=0;d<a.length;d++)c($T(a[d]))}else alert("Delegate.js: Could not load element.\nerrstr: delegate is null")};
Delegate.prototype.Invoke=function(a,b){var c=b.obj,d={},e=null,f=false;for(var g in c)g.match(/^(app|invoke)$/)||(d[g]=c[g]);if(this.delegate[c.app])if(typeof this.delegate[c.app][c.invoke]==T_FUNC)f=this.delegate[c.app][c.invoke](b.evt,a,d);else e="delegate["+this.delegate.constructor.Class()+"] does not implement "+c.invoke;else e="delegate is null";e&&alert("Delegate.js: Could not invoke method.\nmethod: $method\nerrstr: $errstr".replace("$method",c.invoke).replace("$errstr",e));return f?true:
false};function LightRoom(a,b){var c=this;b=typeof b==T_OBJ?b:{};this.serials=[];this.target=null;this.path=a.replace(/\/$/,"");this.acceptKeyEvent=b.acceptKeyEvent==true?true:false;this.onDblClick=b.onDblClick==true?true:false;this.delegate=typeof b.delegate==T_OBJ?b.delegate:null;this.assets=this.single=null;this.refNo=0;this.processing=false;this.body=$T("body")[0];this.bg=document.createElement("div");this.bg.style.cursor="pointer";this.bg.style.backgroundColor="#000";this.bg.style.width="100%";this.bg.style.position=
"absolute";this.bg.style.top="0";this.bg.style.left="0";this.bg.style.textAlign="center";this.bg.style.zIndex=gMaxNum-1;this.bg.onclick=function(){c.Close()};Element.SetOpacity(this.bg,0);this.bounds=document.createElement("div");this.bounds.id="LightRoomBounds";this.bounds.style.width="100%";this.bounds.style.textAlign="center";this.bounds.style.backgroundColor="transparent";this.bounds.style.position="absolute";this.bounds.style.top="0";this.bounds.style.left="0";this.bounds.style.zIndex=gMaxNum;
this.bounds.onmouseover=function(){c.closeCtrl.img.style.display=""};this.bounds.onmouseout=function(){c.closeCtrl.img.style.display="none"};this.box=document.createElement("div");this.box.id="LightRoomBox";this.box.style.height="124px";this.box.style.width="124px";this.box.style.margin="0 auto";Element.SetOpacity(this.box,0);this.bounds.appendChild(this.box);this.InitCtrl();b.fixedScroll==true&&this.AddEvent(window,"scroll",true,function(){try{c.bounds.style.top=dfObject.ScrollTop()+c.closeCtrl.height+
"px";c.bg.style.height=dfObject.ScrollHeight()+"px"}catch(d){}});this.AddEvent(window,"resize",true,function(){c.bounds.style.left=dfObject.WindowWidth()/2-c.bounds.clientWidth/2+"px";c.bg.style.height=dfObject.ScrollHeight()+"px"})}
LightRoom.prototype.InitCtrl=function(){var a=this,b=function(c,d){if(d=="closeButton"){c.img.style.cursor="pointer";c.img.onclick=function(){a.Close()}}else if(d=="closeLabel"){c.img.style.cursor="pointer";c.img.style.position="";c.img.onclick=function(){a.Close()}}};this.inspector=document.createElement("div");this.inspector.id="LightRoomInspector";this.indicator={};this.NewImageCtrl(this.path+"/indicator.gif",this.indicator,b,"indicator");this.closeCtrl={};this.NewImageCtrl(this.path+"/closebutton.png",
this.closeCtrl,b,"closeButton");this.closeLabel={};this.NewImageCtrl(this.path+"/closelabel.gif",this.closeLabel,b,"closeLabel");this.InitSwitch()};
LightRoom.prototype.InitSwitch=function(){var a=this,b=null;this.ctrl=document.createElement("table");this.ctrl.style.position="absolute";this.ctrl.style.top=0;this.ctrl.style.left=0;this.ctrl.appendChild(document.createElement("tbody"));b=this.ctrl.childNodes[0];b.appendChild(document.createElement("tr"));b=b.childNodes[0];b.appendChild(document.createElement("td"));b.appendChild(document.createElement("td"));b=b.childNodes;b[0].style.width="50%";b[0].innerHTML="&nbsp;";b[0].onmouseover=function(){if(a.target.opt.group&&
a.refNo>1){this.style.background='transparent url("'+a.path+'/prevlabel.gif") no-repeat left center';this.style.cursor="pointer"}};b[0].onmouseout=function(){this.style.cursor="";this.style.background=""};b[0].onclick=function(c){var d=a.target.opt;c=EventCenter.Event(c);c.cancelBubble=true;if(d.group&&a.refNo>1){this.style.background="";this.style.cursor="";a.refNo--;a.target.elm=a.assets[d.group][a.refNo-1];a.target.opt=dfObject.BracketParams("LightRoom",a.target.elm.className);a.target.opt.ref=
a.refNo;a.LoadStep()}};b[1].style.width="50%";b[1].innerHTML="&nbsp;";b[1].onmouseover=function(){var c=a.target.opt;if(c.group&&a.refNo<a.assets[c.group].length){this.style.background='transparent url("'+a.path+'/nextlabel.gif") no-repeat right center';this.style.cursor="pointer"}};b[1].onmouseout=function(){this.style.background="";this.style.cursor=""};b[1].onclick=function(c){var d=a.target.opt;c=EventCenter.Event(c);c.cancelBubble=true;if(d.group&&a.refNo<a.assets[d.group].length){this.style.background=
"";this.style.cursor="";a.refNo++;a.target.elm=a.assets[d.group][a.refNo-1];a.target.opt=dfObject.BracketParams("LightRoom",a.target.elm.className);a.target.opt.ref=a.refNo;a.LoadStep()}};this.acceptKeyEvent&&this.AddEvent(window,"keydown",true,function(c){if(a.bg.parentNode&&a.processing==false){c=EventCenter.Event(c);try{switch(c.keyCode){case 27:a.Close();break;case 37:b[0].onclick();break;case 39:b[1].onclick();break}}catch(d){alert(d)}}})};
LightRoom.prototype.Clear=function(){for(var a=0;a<this.serials.length;a++)EventCenter.RemoveEvent(this.serials[a]);delete this.serials;this.serials=[];this.assets&&delete this.assets;this.assets={}};LightRoom.prototype.Init=function(){var a=$T("a");this.Clear();for(var b=0;b<a.length;b++)this.Add(a[b])};
LightRoom.prototype.Add=function(a){var b=dfObject.BracketParams("LightRoom",a.className);if(b){if(b.group){this.assets[b.group]||(this.assets[b.group]=[]);this.assets[b.group].push(a);b.ref=this.assets[b.group].length}this.serials.push(EventCenter.AddEvent(a,this.onDblClick?"dblclick":"click",this,"Click",true,b))}};LightRoom.prototype.Click=function(a,b){this.target={elm:a,opt:b.obj};this.Start();return false};
LightRoom.prototype.Idle=function(){this.processing=false;this.closeCtrl.Remove();this.closeLabel.Remove();Element.Remove(this.inspector);this.inspector.innerHTML="";this.box.innerHTML="";Element.SetOpacity(this.box,0);this.bounds.style.filter?(this.bounds.style.filter=""):Element.SetOpacity(this.bounds,100);this.bounds.style.width="100%";this.bounds.style.left="0";Element.Remove(this.bounds);Element.Remove(this.bg)};
LightRoom.prototype.Close=function(a){var b=this,c=0,d=$("LightRoomImage"),e=function(f,g,h){Element.SetOpacity(h,f);if(g){c++;c>1&&b.Idle()}};if(!(this.processing&&a!=true)){this.processing=true;Element.Remove(this.ctrl);this.closeCtrl.Remove();if(d)if(d.childNodes[0]&&d.childNodes[0].nodeName.toLowerCase()=="div")Element.Remove(d.childNodes[0]);else d.innerHTML="";dfObject.TrackValue(100,0,5,10,e,this.bounds);dfObject.TrackValue(100,0,5,10,e,this.bg)}};
LightRoom.prototype.Start=function(){var a=this,b=this.target.opt;if(!this.processing){this.processing=true;if(this.target.opt.group){if(!this.assets[b.group]||!b.ref){alert("Invalid Group!");return}this.refNo=b.ref}else this.single=this.target.elm;this.bg.style.height=this.body.scrollHeight+"px";this.box.style.height="124px";this.box.style.width="124px";this.body.appendChild(this.bg);dfObject.TrackValue(0,70,5,10,function(c,d,e){Element.SetOpacity(e,c);d&&a.ShowBox()},this.bg)}};
LightRoom.prototype.ShowBox=function(){var a=this;this.body.appendChild(this.bounds);this.UpdateCtrl();dfObject.TrackValue(0,100,5,10,function(b,c,d){Element.SetOpacity(d,b);if(c){a.indicator.Append(d);a.UpdateCtrl();a.Load()}},this.box)};
LightRoom.prototype.LoadStep=function(){var a=this,b=this.target.opt,c=$("LightRoomImage"),d=0,e=function(f,g,h){Element.SetOpacity(h,f);if(g){d++;Element.Remove(h);if(d>=2){Element.Remove(c);a.closeLabel.Remove();a.inspector.innerHTML="";a.indicator.Append(a.box);a.UpdateCtrl();a.Load()}}};if(!this.processing){this.processing=true;b.group&&this.box.removeChild(this.ctrl);this.closeCtrl.img.style.display="none";this.closeCtrl.Remove();this.UpdateCtrl();dfObject.TrackValue(100,0,5,10,e,c.childNodes[0]);
dfObject.TrackValue(100,0,5,10,e,this.inspector)}};
LightRoom.prototype.Load=function(){var a=this,b=this.target.elm,c=this.target.opt,d=null,e=c.src!=null?c.src:b.href;if(c.delegate){b=c.delegate;if(typeof this.delegate[b]==T_FUNC){d=this.delegate[b](c);d.type="object";this.BoxResize(d)}else{alert("delegate method["+b+"] not found");a.Close(true)}}else if(e.match(/\.(mov|wmv|avi|swf)$/)){d={};d.type="movie";d.mediatype=RegExp.$1;if(c.width&&c.width.match(/^\d+$/))d.width=c.width;if(c.height&&c.height.match(/^\d+$/))d.height=c.height;d.src=e;this.BoxResize(d)}else{d=
new Image;d.onload=function(){a.BoxResize(d)};d.onerror=function(){alert("could not load image: "+e);a.Close(true)};d.src=e}};
LightRoom.prototype.BoxResize=function(a){var b=this,c=dfObject.WindowWidth(),d=dfObject.WindowHeight(),e={w:a.width,h:a.height},f=e.w/e.h,g=0,h=function(i,j,k){if(k=="width")b.box.style.width=i+"px";else b.box.style.height=i+"px";b.UpdateCtrl();if(j){g++;g>1&&b.PrepareImage(a,e)}};if(e.w>c-150)e.w=c-150;if(e.h>d-200)e.h=d-200;(function(i){var j=i.w/i.h;i.w=Math.abs(j>f?i.h*f:i.w);i.h=Math.abs(j<f?i.w/f:i.h)})(e);e.w+=2;e.h+=2;if(a.mediatype)switch(a.mediatype){case "mov":e.h+=16;break}dfObject.TrackValue(this.box.clientWidth,
e.w+this.closeCtrl.wHalf,10,10,h,"width");dfObject.TrackValue(this.box.clientHeight,e.h+this.closeCtrl.hHalf,10,10,h,"height")};
LightRoom.prototype.PrepareImage=function(a,b){var c=document.createElement("div");c.id="LightRoomImage";c.style.paddingTop=this.closeCtrl.hHalf/2+"px";if(a.type=="movie"){switch(a.mediatype){case "mov":var d=this.QTElm(a,b);if(gIsFox)c.appendChild(d);else c.innerHTML=d.outerHTML;break;default:alert("Unknown mediatype: "+a.mediatype);this.processing=false;this.Close();return}this.SetInspector(a,c,"movie")}else if(a.type=="object"){d=document.createElement("div");a.src.style.margin="0 auto";a.src.style.width=
b.w+"px";a.src.style.height=b.h+"px";d.appendChild(a.src);c.appendChild(d);Element.SetOpacity(d,0);this.SetInspector(a,c,"object")}else{c.innerHTML='<img src="'+a.src+'" width="'+b.w+'" height="'+b.h+'" alt="'+this.target.elm.title+'" />';Element.SetOpacity(c.childNodes[0],0);this.SetInspector(a,c,"image")}};
LightRoom.prototype.SetInspector=function(a,b,c){var d=this,e=null,f=document.createElement("p"),g=document.createElement("span"),h=this.target.elm,i=this.target.opt;g.style.display="block";g.style.textAlign="right";g.style.marginTop=-this.closeLabel.height+"px";this.closeLabel.Append(g);if(this.delegate&&typeof this.delegate.lrDescription==T_FUNC)e=this.delegate.lrDescription(i);else f.innerHTML=h.title?"<b>"+h.title+"</b><br />":"";if(i.group)f.innerHTML+="Image: <b>"+this.refNo+"/"+this.assets[i.group].length+
"</b>";if(i.srclink=="yes")f.innerHTML+='<br />Download &raquo; <a href="'+(i.src!=null?i.src:h.href)+'" target="_blank">SOURCE</a>';f.appendChild(g);e&&this.inspector.appendChild(e);this.inspector.appendChild(f);Element.SetOpacity(this.inspector,0);this.bounds.appendChild(this.inspector);dfObject.TrackValue(0,100,10,10,function(j,k,l){Element.SetOpacity(l,j);k&&d.SetImage(a,b,c)},this.inspector)};
LightRoom.prototype.SetImage=function(a,b,c){var d=this,e=this.target.opt,f=function(g,h,i){Element.SetOpacity(i,g);if(h){d.processing=false;e.group&&d.box.appendChild(d.ctrl);d.closeCtrl.Append(d.box);d.UpdateCtrl();d.bg.style.height=dfObject.ScrollHeight()+"px";a&&typeof a.onstart==T_FUNC&&a.onstart()}};this.indicator.Remove();this.box.innerHTML="";if(c=="movie"){this.box.appendChild(b);e.group&&this.box.appendChild(this.ctrl);this.closeCtrl.Append(this.box);this.UpdateCtrl();this.processing=false;
this.bg.style.height=dfObject.ScrollHeight()+"px"}else{this.box.appendChild(b);dfObject.TrackValue(0,100,5,10,f,b.childNodes[0])}};
LightRoom.prototype.UpdateCtrl=function(){try{this.bounds.style.width=this.box.clientWidth+"px";this.bounds.style.top=dfObject.ScrollTop()+this.closeCtrl.height+"px";this.bounds.style.left=dfObject.WindowWidth()/2-this.box.clientWidth/2+"px";this.indicator.img.style.left=this.box.offsetLeft+this.box.clientWidth/2-this.indicator.wHalf+"px";this.indicator.img.style.top=this.box.offsetTop+this.box.clientHeight/2-this.indicator.hHalf+"px";if(this.closeCtrl.parent){this.closeCtrl.img.style.left=this.box.offsetLeft+
this.box.clientWidth-this.closeCtrl.wHalf+2+"px";this.closeCtrl.img.style.top=this.box.offsetTop-(this.closeCtrl.hHalf+2)+"px"}if(this.target.opt.group){this.ctrl.style.width=this.box.clientWidth+"px";this.ctrl.style.height=this.box.clientHeight+"px";this.ctrl.style.left=this.box.offsetLeft+"px";this.ctrl.style.top=this.box.offsetTop+"px"}this.inspector.style.width=this.box.clientWidth+"px"}catch(a){}};
LightRoom.prototype.NewImageCtrl=function(a,b,c,d){var e=this,f=new Image;f.onload=function(){b.parent=null;b.width=this.width;b.height=this.height;b.wHalf=this.width/2;b.hHalf=this.height/2;b.src=this.src;b.img=document.createElement("img");b.img.width=this.width;b.img.height=this.height;b.img.style.position="absolute";b.img.style.top="0";b.img.style.left="0";b.img.src=this.src;if(gIsMSIE&&gIsMSIE.version<7&&this.src.match(/\.png$/)){var g=this.src;b.img.src=e.path+"/trans.gif";b.img.style.filter=
'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+g+'")';b.img.style.border="none"}b.Append=function(h){this.Remove();this.parent=h;this.parent.appendChild(this.img)};b.Remove=function(){if(this.parent){this.img.parentNode&&this.parent.removeChild(this.img);this.parent=null}};c(b,d)};f.src=a};
LightRoom.prototype.QTElm=function(a,b){var c=document.createElement("object"),d=document.createElement("object"),e={};c.setAttribute("codebase","http://www.apple.com/qtactivex/qtplugin.cab");c.setAttribute("classid","clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B");c.setAttribute("type","video/quicktime");c.setAttribute("width",b.w+"px");c.setAttribute("height",b.h+"px");d.setAttribute("type","video/quicktime");d.setAttribute("width",b.w+"px");d.setAttribute("height",b.h+"px");e.autostart=true;e.controller=
true;e.cache=true;e.showlogo=true;e.saveembedtags=true;for(var f in e){var g=document.createElement("param");g.name=f;g.value=e[f];d.appendChild(g)}d.data=e.src=a.src;for(f in e){g=document.createElement("param");g.name=f;g.value=e[f];c.appendChild(g)}gIsFox&&c.appendChild(d);return c};LightRoom.prototype.AddEvent=function(a,b,c,d){if(a.addEventListener)return a.addEventListener(b,d,c);else if(a.attachEvent)return a.attachEvent("on"+b,d)};function Maps(a){this.corder=new google.maps.Geocoder;this.maps={};this.mkrs={};this.plygs={};this.infoWindow=new google.maps.InfoWindow({content:""});this.config={magnify:5,delegate:null};if(a)for(var b in this.config)this.config[b]=a[b]?a[b]:this.config[b]}Maps.prototype.SetConfigMagnify=function(a){this.config.magnify=a?a:this.config.magnify};Maps.prototype.SetConfigDelegate=function(a){this.config.delegate=a?a:this.config.delegate};
Maps.prototype.AddMap=function(a){var b=this,c;if(a&&!this.maps[a]&&(c=$(a))){this.maps[a]={map:new google.maps.Map(c,{zoom:this.config.magnify,mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:true,scrollwheel:false}),magnify:this.magnify};this.config.delegate&&typeof this.config.delegate.mapOnLoad==T_FUNC&&google.maps.event.addDomListener(this.maps[a].map,"load",function(){b.config.delegate.mapOnLoad()})}};Maps.prototype.AddControl=function(a,b){this.maps[a]&&this.maps[a].map.setOptions(b)};
Maps.prototype.SetCenter=function(a,b,c){if(this.maps[a]&&b){this.maps[a].map.setCenter(b);this.maps[a].map.setZoom(c?c:this.config.magnify)}};Maps.prototype.PanTo=function(a,b){this.maps[a]&&b&&this.maps[a].panTo(b)};Maps.prototype.CreateMarkerByLatLng=function(a,b,c){this.CreateMarker(a,new google.maps.LatLng(b,c))};Maps.prototype.CreateMarkerByAddr=function(a,b,c){var d=this;this.GetLatLngByAddr(b,function(e){d.CreateMarker(a,e);c&&c(e)})};
Maps.prototype.CreateMarker=function(a,b){var c=this;if(this.mkrs[a])this.mkrs[a].marker.setPosition(b);else{this.mkrs[a]={marker:new google.maps.Marker({position:b,title:a}),map:null,option:null};this.mkrs[a].marker.labelPtr=a;google.maps.event.addDomListener(this.mkrs[a].marker,"click",function(){c.OpenMarkerInfo(this.labelPtr)})}};Maps.prototype.MarkerMap=function(a){return this.mkrs[a]?this.mkrs[a].map:null};
Maps.prototype.MarkerLatLng=function(a){return this.mkrs[a]?this.mkrs[a].marker.getPosition():null};Maps.prototype.AppendMarker=function(a,b){if(this.mkrs[a]&&this.maps[b]){this.mkrs[a].map=b;this.mkrs[a].marker.setMap(this.maps[b].map)}};Maps.prototype.DetachMarker=function(a){if(this.mkrs[a]){this.mkrs[a].map=null;this.mkrs[a].marker.setMap(null)}};Maps.prototype.SetCenterByMarker=function(a,b){this.mkrs[a]&&this.SetCenter(this.MarkerMap(a),this.MarkerLatLng(a),b)};
Maps.prototype.PanToByMarker=function(a){this.mkrs[a]&&this.PanTo(this.MarkerMap(a),this.MarkerLatLng(a))};Maps.prototype.SetMarkerInfoHTML=function(a,b){if(this.mkrs[a])this.mkrs[a].html=b};Maps.prototype.OpenMarkerInfo=function(a){this.mkrs[a]&&this.mkrs[a].marker.getMap()&&this.infoWindow.open(this.mkrs[a].marker.getMap(),this.mkrs[a].marker)};
Maps.prototype.CreatePolyCircleWithMarker=function(a,b,c,d){if(this.mkrs[b]){b=this.mkrs[b].marker.getPosition();c=new WGS84({distance:c,latlng:b});var e=1,f=[];if(d.smooth){e=360/(d.smooth<2?5:d.smooth);delete d.smooth}else e=10;for(var g=0;g<360;g+=e)g<=360&&f.push(c.GetLatLngForAngle(g));if(this.plygs[a]){this.DetachPolygon(a);delete this.plygs[a].polygon}d.paths=f;this.plygs[a]={map:null,origin:b,polygon:new google.maps.Polygon(d)}}};
Maps.prototype.AppendPolygon=function(a,b){if(this.plygs[a]&&this.maps[b]){var c=this.plygs[a].polygon.getPath();this.plygs[a].map=b;this.plygs[a].polygon.setMap(this.maps[b].map);this.maps[b].map.fitBounds(new google.maps.LatLngBounds(c.getAt(0),c.getAt(Math.ceil(c.length/2))))}};Maps.prototype.DetachPolygon=function(a){if(this.plygs[a]){this.plygs[a].map=null;this.plygs[a].polygon.setMap(null)}};
Maps.prototype.GetLatLngByAddr=function(a,b){this.corder.geocode({address:a,region:"JP"},function(c,d){if(d==google.maps.GeocoderStatus.OK)typeof b==T_FUNC&&b(c[0].geometry.location);else switch(d){case google.maps.GeocoderStatus.ERROR:alert("There was a problem contacting the Google servers.");break;case google.maps.GeocoderStatus.INVALID_REQUEST:alert("This GeocoderRequest was invalid.");break;case google.maps.GeocoderStatus.OVER_QUERY_LIMIT:alert("The webpage has gone over the requests limit in too short a period of time.");
break;case google.maps.GeocoderStatus.REQUEST_DENIED:alert("The webpage is not allowed to use the geocoder.");break;case google.maps.GeocoderStatus.UNKNOWN_ERROR:alert("A geocoding request could not be processed due to a server error. The request may succeed if you try again.");break;default:alert("\u300c"+a+"\u300d\u306f\u4e0d\u660e\u306a\u4f4f\u6240\u3067\u3059\u3002")}})};
Maps.prototype.SetCenterByAddr=function(a,b,c){if(this.maps[a]){var d=this;this.GetLatLngByAddr(b,function(e){d.SetCenter(a,e,c)})}};Maps.prototype.PanToByAddr=function(a,b){if(this.maps[a]){var c=this;this.GetLatLngByAddr(b,function(d){c.PanTo(a,d)})}};Maps.prototype.GetDirection=function(a,b,c){a&&b&&this.direction.load("from: "+a+" to: "+b,{locale:c})};
Maps.prototype.SetDirection=function(a,b){var c=null;if(a){var d=this;this.direction&&delete this.direction;c=new GDirections(b,a);GEvent.addListener(c,"error",function(){d.Error(this)})}return c};
Maps.prototype.Error=function(){var a=this.direction;if(a.getStatus().code==G_GEO_UNKNOWN_ADDRESS)alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: "+a.getStatus().code);else if(a.getStatus().code==G_GEO_SERVER_ERROR)alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: "+
a.getStatus().code);else if(a.getStatus().code==G_GEO_MISSING_QUERY)alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: "+a.getStatus().code);else if(a.getStatus().code==G_GEO_BAD_KEY)alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: "+a.getStatus().code);else a.getStatus().code==
G_GEO_BAD_REQUEST?alert("A directions request could not be successfully parsed.\n Error code: "+a.getStatus().code):alert("An unknown error occurred.\n"+ShowProperty(a.getStatus()))};
function WGS84(a){var b=0;this.major=6378137;this.minor=6356752.314245;b=this.major*this.major;this.eccentricity=(b-this.minor*this.minor)/b;this.f=1/298.257223563;this.rad=Math.PI/180;this.deg=180/Math.PI;this.distWGS84=0;this.trigWGS84=null;this.origin={lat:{deg:0,rad:0,sin:0,cos:0},lng:{deg:0,rad:0,sin:0,cos:0}};this.SetOrigin(a.latlng);this.SetDistance(a.distance)}
WGS84.prototype.SetOrigin=function(a){this.origin.lat.deg=a.lat();this.origin.lat.rad=this.rad*this.origin.lat.deg;this.origin.lat.sin=Math.sin(this.origin.lat.rad);this.origin.lat.cos=Math.cos(this.origin.lat.rad);this.origin.lng.deg=a.lng();this.origin.lng.rad=this.rad*this.origin.lng.deg;this.origin.lng.sin=Math.sin(this.origin.lng.rad);this.origin.lng.cos=Math.cos(this.origin.lng.rad)};
WGS84.prototype.SetDistance=function(a){this.distWGS84=a/this.major;this.trigWGS84={sin:Math.sin(this.distWGS84),cos:Math.cos(this.distWGS84)}};
WGS84.prototype.GetLatLngForAngle=function(a){a*=this.rad;var b=Math.asin(this.origin.lat.sin*this.trigWGS84.cos+this.origin.lat.cos*this.trigWGS84.sin*Math.cos(a));a=this.origin.lng.rad+Math.atan2(Math.sin(a)*this.trigWGS84.sin*this.origin.lat.cos,this.trigWGS84.cos-this.origin.lat.sin*this.origin.lat.sin);a=(a+Math.PI)%(2*Math.PI)-Math.PI;return new google.maps.LatLng(b*this.deg,a*this.deg)};WGS84.prototype.Deg2Rad=function(a,b){return{lat:a*this.rad,lng:b*this.rad}};
WGS84.prototype.GetDistance=function(a){a=this.Deg2Rad(a.lat(),a.lng());a=this.origin.lat.sin*Math.sin(a.lat)+this.origin.lat.cos*Math.cos(a.lat)*Math.cos(a.lng-this.origin.lng.rad);return Math.round(this.major*(Math.atan(-a/Math.sqrt(-a*a+1))+Math.PI/2))};
WGS84.prototype.GetDistance2=function(a){var b=this.Deg2Rad(a.lat(),a.lng());a=(this.origin.lat.rad+b.lat)/2;var c=this.origin.lat.rad-b.lat;b=this.origin.lng.rad-b.lng;var d=Math.sin(a),e=1-this.eccentricity*d*d;d=this.major/Math.sqrt(Math.pow(e,3));e=this.minor/Math.sqrt(e);c*=d;b=b*e*Math.cos(a);return Math.round(Math.sqrt(c*c+b*b))};function Progress(){var a=false,b=document.createElement("div"),c=document.createElement("p"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),g=document.createElement("div");b.id="Progress";c.id="ProgressBounds";d.id="ProgressMsg";e.id="ProgressIx";c.appendChild(f);b.appendChild(c);b.appendChild(d);b.appendChild(e);b=dfObject.RoundBox(b,{img:"/KIF/js/ApplicationKit/Progress/progress_bg.gif",radius:"20px",className:"ProgressFrame"});f.innerHTML="&nbsp;";
g.id="ProgressBgLayer";g.style.display="none";g.style.position="absolute";g.style.top="0";g.style.left="0";g.style.zIndex=gMaxNum-10;this.Refresh=function(){if(a){var h=dfObject.WindowHeight(),i=dfObject.WindowWidth(),j=b.clientWidth/2;g.style.width="100%";g.style.height=dfObject.ScrollHeight()+"px";b.style.top=Math.round(h/2)-100+"px";b.style.left=Math.round(i/2)-j+"px"}};this.Append=function(h){if(Element.IsElement(h)){a=false;b.style.position="";h.appendChild(b)}};this.Modal=function(h){if(h==
true){a=true;b.style.display="block";b.style.position="absolute";b.style.zIndex=gMaxNum-9}else{a=false;Element.Remove(g);Element.Remove(b);b.style.position=""}};this.Refuge=function(){Element.Remove(g);Element.Remove(b);d.innerHTML="&nbsp;"};this.Interaction=function(h){Element.RemoveChilds(e);if(Element.IsElement(h)){e.appendChild(h);e.style.display="block"}};this.InteractionEnable=function(h){e.style.display=h?"block":"none"};this.Message=function(h){if(Element.IsElement(h)){d.innerHTML="";d.appendChild(h)}else if(typeof h==
T_STR)d.innerHTML="<p>"+h+"</p>"};this.Percentages=function(h){f.style.width=h+"%"};this.Visible=function(h,i){i=Number(i)>=0?i:1500;NotificationCenter.PostNotification(this,"ProgressWillVisible",h==true);if(h==true){g.style.display="block";Element.SetOpacity(g,50);b.style.display="block";Element.SetOpacity(b,100);if(a==true){var j=Element.Body();j.appendChild(g);j.appendChild(b)}this.Refresh()}else{var k=function(l,m,n){Element.SetOpacity(n,l);if(m){Element.Remove(n);Element.SetOpacity(n,100)}};
setTimeout(function(){dfObject.TrackValue(1,0,5,10,k,g);dfObject.TrackValue(1,0,5,10,k,b)},i)}};EventCenter.AddEvent(window,"resize",this,"Refresh",true);EventCenter.AddEvent(window,"scroll",this,"Refresh",true)};function Table(a){try{var b,c;this._id=a.id;this.table=$(a.id);this.delegate=a.delegate&&typeof a.delegate==T_OBJ?a.delegate:null;this.table.innerHTML="";this.table.style.overflow="hidden";this.header=document.createElement("table");b=document.createElement("thead");this._hrow=document.createElement("tr");b.appendChild(this._hrow);this.header.appendChild(b);this.table.appendChild(this.header);this.wrap=document.createElement("div");c=document.createElement("table");this._tbody=document.createElement("tbody");
c.appendChild(this._tbody);this.wrap.appendChild(c);this.table.appendChild(this.wrap);this.table.style.width=a.width;this.header.className="TableHeader";this.header.style.display="block";this.wrap.className="TableWrap";this.wrap.style.clear="left";this.wrap.style.height=a.height;this.wrap.style.overflow="auto";c.className="TableBody";c.style.width="100%";this._hasHeader=true;NotificationCenter.AddObserver(this,"Refresh","TableRefresh");NotificationCenter.AddObserver(this,"Resize","WindowResize");
EventCenter.AddEvent(this.wrap,"scroll",this,"Resize")}catch(d){alert(Dump(d))}}Table.prototype.SetDelegate=function(a){this.delegate=a&&typeof a==T_OBJ?a:null};Table.prototype.Visible=function(a){if(a==true||a==false)this.table.style.display=a?"block":"none";return this.table.style.display=="block"?true:false};
Table.prototype.Refresh=function(a,b,c){if(this.delegate&&(c==null||c==this._id)){a=this.delegate.NumberOfColsInTable(this._id);b=this.delegate.NumberOfRowsInTable(this._id);if(a){Element.RemoveChilds(this._hrow);Element.RemoveChilds(this._tbody);for(c=1;c<=a;c++){var d=document.createElement("th");d.style.display="block";d.style["float"]="left";d.style.overflow="hidden";d.appendChild(this.delegate.ValForColHeader(this._id,c));this._hrow.appendChild(d)}for(c=1;c<=b;c++){d=document.createElement("tr");
d.className=c%2?"odd":"even";this._tbody.appendChild(d);for(var e=1;e<=a;e++){var f=document.createElement("td");f.appendChild(this.delegate.ValForColAtRow(this._id,e,c));d.appendChild(f)}}this.Resize()}}};
Table.prototype.Resize=function(){var a=this._hrow.getElementsByTagName("th"),b=this._tbody.getElementsByTagName("tr");if(b&&b.length){var c=b[0].getElementsByTagName("td"),d=this.wrap.offsetWidth-this.wrap.clientWidth,e=c.length;this.header.style.width=this.wrap.scrollWidth+d+10+"px";e--;for(b=0;b<e;b++){a[b].style.width=c[b].offsetWidth+"px";if(a[b].offsetWidth!=c[b].offsetWidth)a[b].style.width=c[b].offsetWidth-(a[b].offsetWidth-c[b].offsetWidth)+"px"}a[e].style.width=c[e].offsetWidth+"px";a[e].style.width=
c[e].offsetWidth-(a[e].offsetWidth-c[e].offsetWidth)+d+1+"px";this.header.style.marginLeft=-this.wrap.scrollLeft+"px";a[c.length-1].style.borderRight="none"}else if(a&&a.length){c=this.table.offsetWidth/a.length;for(b=0;b<a.length;b++){a[b].style.width=c+"px";if(a[b].offsetWidth!=c)a[b].style.width=c-(a[b].offsetWidth-c)-(b==a.length-1?1.5:0)+"px"}a[a.length-1].style.borderRight="none"}};
Table.prototype.RemoveColumn=function(a,b,c){if(c==null||c==this._id)if(this._columns.childNodes.length){a=this._columns.getElementsByTagName("td");this._columns.removeChild(a[a.length-1]);this.Resize()}};Table.prototype.UpdateColumn=function(){var a=this._columns.childNodes,b=this._colWidth;if(this._single)b=this.table.clientWidth;for(var c=0;c<a.length;c++)a[c].style.width=b;this.Resize()};function Sheet(a){var b=a.delegate,c=a.path,d=document.createElement("div");d.style.position="absolute";d.style.top="0";d.style.left="0";d.style.zIndex=gMaxNum-1E3;d.style.width="100%";d.style.backgroundColor="#000";this.Refresh=function(){var e=$("Sheet");if(e){var f=dfObject.WindowHeight(),g=dfObject.WindowWidth();g=Math.round(g/2-e.clientWidth/2);d.style.height=f+"px";e.style.left=(g<1?1:g)+"px"}};this.Open=function(e,f){if(Element.IsElement(e)&&!Element.Parent(d)){var g=dfObject.RoundBox(e,{img:c+
"/sheet.gif",radius:"10px",id:"Sheet"});Element.SetOpacity(d,40);Element.SetOpacity(g,0);Element.Body().appendChild(d);Element.Body().appendChild(g);g.style.position="absolute";g.style.zIndex=gMaxNum-999;if(typeof f==T_OBJ&&f instanceof Object)for(var h in f)if(e[h])switch(e[h].tagName.toLowerCase()){case "input":case "textarea":if(typeof f[h]==T_STR||T_NUM)e[h].value=f[h];break;case "select":if(f[h]instanceof Array){var i=f[h];e[h].innerHTML="";for(var j=0;j<i.length;j++){var k=document.createElement("option");
k.value=i[j].value;k.innerHTML=i[j].text;k.selected=i[j].selected?"selected":"";e[h].appendChild(k)}}break}b.SheetWillOpen(g);g.style.top=-g.clientHeight;this.Refresh();dfObject.TrackValue(-g.clientHeight,0,5,20,function(l,m,n){Element.SetOpacity(n,100);n.style.top=l+"px"},g)}};this.Close=function(){var e=$("Sheet");if(Element.Parent(d)&&e!=null){b.SheetWillClose(e);dfObject.TrackValue(0,-e.clientHeight,5,20,function(f,g,h){h.style.top=f+"px";if(g){Element.Remove(h);Element.Remove(d)}},e)}};EventCenter.AddEvent(window,
"resize",this,"Refresh",true);EventCenter.AddEvent(window,"scroll",this,"Refresh",true)};function Sprite(a){var b=a.path,c=a.delegate,d=a.debug?true:false,e={},f={},g=function(j){j=j.split("&");var k="Ix"+j.shift(),l={},m=null;if(typeof c==T_OBJ){for(var n=0;n<j.length;n++)if(j[n].match(/^(.+?):(.+?)$/))l[RegExp.$1]=RegExp.$2;if(typeof c[k]==T_FUNC)c[k](l);else m="delegate does not implement "+k}else m="delegate is null";m&&alert("Sprite.js: Could not call interaction method.\nmethod: $method\nerrstr: $errstr".replace("$method",k).replace("$errstr",m))},h=function(j){var k=e[j.title].elm,
l=e[j.title].params,m=document.createElement("span"),n=document.createElement("img"),o="transparent url($src) $x $y no-repeat",p=k.childNodes.length?k.childNodes[0]:null,q=b+"/trans.gif";q=q.replace(/\/+/,"/");o=o.replace("$src",l.src).replace("$x",l.x?l.x:"0").replace("$y",l.y?l.y:"0");m.className=j.title;m.style.width=l.width?l.width:l.src_size.w+"px";m.style.height=l.height?l.height:l.src_size.h+"px";m.style.background=o;n.src=q;n.style.width=l.width?l.width:l.src_size.w+"px";n.style.height=l.height?
l.height:l.src_size.h+"px";if(d)n.style.border="1px #f00 solid";m.appendChild(n);m.onmouseover=function(){if(l=e[this.className].params){o="$x $y";if(l.ox)o=o.replace("$x",l.ox?l.ox:"$x");if(l.oy)o=o.replace("$y",l.oy?l.oy:"$y");o=o.replace("$x",l.x?l.x:"0").replace("$y",l.y?l.y:"0");this.style.backgroundPosition=o}};m.onmouseout=function(){if(l=e[this.className].params){o="$x $y";o=o.replace("$x",l.x?l.x:"0").replace("$y",l.y?l.y:"0");this.style.backgroundPosition=o}};if(l.method){m.style.cursor=
"pointer";m.onclick=function(){if(l=e[this.className].params){g(l.method);return false}}}e[j.title].inject=m;e[j.title].target=null;if(p)if(p.nodeType==3){n.alt=p.nodeValue;e[j.title].target=p;Element.Replace(m,p)}else k.insertBefore(m,p);else k.appendChild(m)},i=function(j,k){for(var l=0;l<k.length;l++){var m=j+l.toString();e[m]={elm:k[l],params:dfObject.BracketParams("Sprite",k[l].className)};if(e[m].params)if(e[m].params.src&&e[m].params.src.length){f[m]=new Image;f[m].title=m;f[m].onload=function(){e[this.title].params.src_size=
{w:this.width,h:this.height};h(this);delete f[this.title]};f[m].onerror=function(){alert("could not load sprite image: "+this.src);delete e[this.title];delete f[this.title]};f[m].src=e[m].params.src}else if(e[m].params.method){e[m].elm._sprite_id=m;e[m].elm.style.cursor="pointer";e[m].elm.onclick=function(){var n=e[this._sprite_id].params;if(n){g(n.method);return false}}}else delete e[m];else delete e[m]}};this.Load=function(j){this.Unload();if(typeof j==T_OBJ&&j instanceof Array)for(var k=0;k<j.length;k++)i(j[k],
$T(j[k]))};this.Unload=function(){for(var j in e)e[j].target?Element.Replace(e[j].target,e[j].inject):Element.Remove(e[j].inject);delete e;e={}}};function Tooltip(){this.body=Element.Body();this.serials=[];this.defaultOpacity=85;this.defaultDelay=500;this.bounds=document.createElement("div");this.bounds.className="TooltipBounds";this.bounds.style.width="auto";this.bounds.style.position="absolute";this.bounds.style.top="0";this.bounds.style.left="0";this.bounds.style.zIndex=gMaxNum;this.bounds.style.display="none";Element.SetOpacity(this.bounds,0);this.box=document.createElement("div");this.box.className="TooltipBox";this.bounds.appendChild(this.box);
this.body.appendChild(this.bounds);this.defaultTarget=["a","label","input"]}
Tooltip.prototype.Load=function(a){var b=this,c=function(e){for(var f=0;f<e.length;f++){var g=dfObject.BracketParams("Tooltip",e[f].className);if(g&&g.tips&&g.tips.length){g.elm=e[f];b.serials.push(EventCenter.AddEvent(e[f],"mouseover",b,"Open",true,g))}}};if(typeof a!=T_OBJ)a=this.defaultTarget;if(!(a instanceof Array))a=this.defaultTarget;for(var d=0;d<this.serials.length;d++)EventCenter.RemoveEvent(this.serials[d]);delete this.serials;this.serials=[];for(d=0;d<a.length;d++)c($T(a[d]))};
Tooltip.prototype.Open=function(a,b){var c=this,d=true,e=dfObject.MousePt(b.evt),f=e.x+15;e=e.y-15;var g=typeof b.obj.opacity==T_STR&&b.obj.opacity.match(/^\d+$/)?Number(b.obj.opacity):this.defaultOpacity,h=typeof b.obj.delay==T_STR&&b.obj.delay.match(/^\d+$/)?Number(b.obj.delay):this.defaultDelay,i=function(j,k,l){Element.SetOpacity(l,j);return d};Element.SetOpacity(this.bounds,0);this.bounds.style.display="block";this.box.innerHTML=decodeURIComponent(b.obj.tips?b.obj.tips:a.title);if((e-=this.bounds.clientHeight)<
0)e+=this.bounds.clientHeight;if(f+this.bounds.clientWidth>this.body.clientWidth)f=f-this.bounds.clientWidth-30;this.bounds.style.top=e+"px";this.bounds.style.left=f+"px";this.bounds.style.width=this.bounds.clientWidth>dfObject.WindowWidth()/2?"50%":"auto";c.serials.push(EventCenter.AddEvent(a,"mousemove",null,function(j,k){c.Trace(k.evt);return false},true,null));c.serials.push(EventCenter.AddEvent(a,"mouseout",null,function(){c.bounds.style.display="none";c.box.innerHTML="";return false},true,null));
c.serials.push(EventCenter.AddEvent(a,"mousedown",null,function(){c.bounds.style.display="none";c.box.innerHTML="";return true},true,null));d=false;setTimeout(function(){dfObject.TrackValue(0,g,5,10,i,c.bounds)},h)};
Tooltip.prototype.Trace=function(a){a=dfObject.MousePt(a);var b=a.x+10,c=a.y-10;if((c-=this.bounds.clientHeight)<dfObject.ScrollTop())c=a.y+10+10;if(b+this.bounds.clientWidth>=dfObject.ScrollWidth())b=b-this.bounds.clientWidth-10;this.bounds.style.top=c+"px";this.bounds.style.left=b+"px";return false};function Uploader(a,b,c){var d={},e=false,f={},g,h={flash_url:a+"/SWFUpload/swfupload.swf",upload_url:null,file_post_name:"UploaderData",file_size_limit:"10485760",file_types:"*",file_types_description:"you can upload any file",file_upload_limit:0,file_queue_limit:500,button_placeholder_id:"UploaderBtn",button_image_url:a+"/Uploader/btn.png",button_disabled:false,button_width:96,button_height:30,button_action:SWFUpload.BUTTON_ACTION.SELECT_FILES,button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor:SWFUpload.CURSOR.HAND,debug:true};a={swfupload_loaded_handler:function(){typeof b.uplLoaded==T_FUNC&&b.uplLoaded()},file_dialog_start_handler:function(){e=false;typeof b.uplDialogStart==T_FUNC&&b.uplDialogStart()},file_queue_error_handler:function(j,k){d.code=k;switch(k){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:d.str="\u540c\u6642\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u51fa\u6765\u308b\u30d5\u30a1\u30a4\u30eb\u306f\uff15\u3064\u307e\u3067\u3067\u3059\u3002";return;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:d.str=
"\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5927\u304d\u904e\u304e\u307e\u3059\u3002";break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:d.str="\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u30bc\u30ed\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u51fa\u6765\u307e\u305b\u3093\u3002";break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:d.str="\u4e0d\u6b63\u306a\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u3067\u3059\u3002";break;default:if(j!=null)d.str="Unhandled Error"}},
file_queued_handler:function(j){typeof b.uplQueued==T_FUNC&&b.uplQueued(j)},file_dialog_complete_handler:function(){if(b.uplDialogComplete({total:this.getStats().files_queued,err:d})){f.total=this.getStats().files_queued;f.count=0;f.success=false;this.startUpload()}},upload_start_handler:function(j){var k=e?false:true;f.count++;f.file=j;f.success=false;if(k)if(typeof b.uplStart==T_FUNC){j=b.uplStart({file:j,total:f.total,count:f.count});for(var l in j)this.addPostParam(l,j[l])}return k},upload_progress_handler:function(j,
k,l){if(e){typeof b.uplAbort==T_FUNC&&b.uplAbort({file:j,count:f.count,total:f.total});this.stopUpload()}else typeof b.uplProgress==T_FUNC&&b.uplProgress({count:f.count,total:f.total,file:j,bytesTotal:l,bytesComplete:k})},upload_error_handler:function(j,k,l){if(typeof b.uplError==T_FUNC){this.stopUpload();b.uplError({file:j,code:k,message:l,abort:e})}},upload_success_handler:function(j,k){f.success=b.uplSuccess({count:f.count,total:f.total,file:j,response:k})},upload_complete_handler:function(j){b.uplComplete({count:f.count,
total:f.total,file:j,abort:e})&&this.getStats().files_queued>0&&this.startUpload()},debug_handler:function(){}};for(var i in h)if(c[i])h[i]=c[i];for(i in a)h[i]=a[i];this.Abort=function(){e=true};this.Reload=function(){if($(h.button_placeholder_id)!=null){g!=null&&delete g;g=new SWFUpload(h)}}};var SWFUpload;if(SWFUpload==undefined)SWFUpload=function(a){this.initSWFUpload(a)};SWFUpload.prototype.initSWFUpload=function(a){try{this.customSettings={};this.settings=a;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(b){delete SWFUpload.instances[this.movieName];throw b;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 Beta 3";
SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};
SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};
SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(a,b){this.settings[a]=this.settings[a]==undefined?b:this.settings[a]};this.ensureDefault("upload_url","");this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",
0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",
0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",
null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});
this.customSettings=this.settings.custom_settings;if(this.settings.prevent_swf_caching)this.settings.flash_url=this.settings.flash_url;delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){this.settings.button_placeholder_id!==""?this.replaceWithFlash():this.appendFlash()};
SWFUpload.prototype.appendFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null)throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";a=document.getElementsByTagName("body")[0];if(a==undefined)throw"Could not find the 'body' element.";b=document.createElement("div");b.style.width="1px";b.style.height="1px";b.style.overflow="hidden";a.appendChild(b);b.innerHTML=this.getFlashHTML();if(window[this.movieName]==undefined)window[this.movieName]=this.getMovieElement()};
SWFUpload.prototype.replaceWithFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null)throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";a=document.getElementById(this.settings.button_placeholder_id);if(a==undefined)throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;b=document.createElement("div");b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined)window[this.movieName]=
this.getMovieElement()};
SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload"><param name="wmode" value="',this.settings.button_window_mode,'" /><param name="movie" value="',this.settings.flash_url,'" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+
this.getFlashVars()+'" />',"</object>"].join("")};
SWFUpload.prototype.getFlashVars=function(){var a=this.buildParamString(),b=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(b),"&amp;params=",encodeURIComponent(a),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),
"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),
"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),
"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined)this.movieElement=document.getElementById(this.movieName);if(this.movieElement==null)throw"Could not find Flash element";return this.movieElement};
SWFUpload.prototype.buildParamString=function(){var a=this.settings.post_params,b=[];if(typeof a==="object")for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c.toString())+"="+encodeURIComponent(a[c].toString()));return b.join("&amp;")};
SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;if((a=this.getMovieElement())&&typeof a.CallFunction==="unknown"){for(var b in a)try{if(typeof a[b]==="function")a[b]=null}catch(c){}try{a.parentNode.removeChild(a)}catch(d){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieName=this.eventQueue=this.customSettings=this.settings=this.movieElement=null;return true}catch(e){return false}};
SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\nVersion: ",SWFUpload.version,"\nMovie Name: ",this.movieName,"\nSettings:\n\tupload_url:               ",this.settings.upload_url,"\n\tflash_url:                ",this.settings.flash_url,"\n\tuse_query_string:         ",this.settings.use_query_string.toString(),"\n\trequeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n\thttp_success:             ",this.settings.http_success.join(", "),"\n\tfile_post_name:           ",
this.settings.file_post_name,"\n\tpost_params:              ",this.settings.post_params.toString(),"\n\tfile_types:               ",this.settings.file_types,"\n\tfile_types_description:   ",this.settings.file_types_description,"\n\tfile_size_limit:          ",this.settings.file_size_limit,"\n\tfile_upload_limit:        ",this.settings.file_upload_limit,"\n\tfile_queue_limit:         ",this.settings.file_queue_limit,"\n\tdebug:                    ",this.settings.debug.toString(),"\n\tprevent_swf_caching:      ",
this.settings.prevent_swf_caching.toString(),"\n\tbutton_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n\tbutton_image_url:         ",this.settings.button_image_url.toString(),"\n\tbutton_width:             ",this.settings.button_width.toString(),"\n\tbutton_height:            ",this.settings.button_height.toString(),"\n\tbutton_text:              ",this.settings.button_text.toString(),"\n\tbutton_text_style:        ",this.settings.button_text_style.toString(),"\n\tbutton_text_top_padding:  ",
this.settings.button_text_top_padding.toString(),"\n\tbutton_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n\tbutton_action:            ",this.settings.button_action.toString(),"\n\tbutton_disabled:          ",this.settings.button_disabled.toString(),"\n\tcustom_settings:          ",this.settings.custom_settings.toString(),"\nEvent Handlers:\n\tswfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n\tfile_dialog_start_handler assigned: ",
(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n\tfile_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n\tfile_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n\tupload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n\tupload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),
"\n\tupload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n\tupload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n\tupload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n\tdebug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};
SWFUpload.prototype.addSetting=function(a,b,c){return b==undefined?(this.settings[a]=c):(this.settings[a]=b)};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined)return this.settings[a];return""};
SWFUpload.prototype.callFlash=function(a,b){b=b||[];var c=this.getMovieElement(),d,e;try{e=c.CallFunction('<invoke name="'+a+'" returntype="javascript">'+__flash__argumentsToXML(b,0)+"</invoke>");d=eval(e)}catch(f){throw"Call to "+a+" failed";}if(d!=undefined&&typeof d.post==="object")d=this.unescapeFilePostParams(d);return d};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};
SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false)b=true;this.callFlash("CancelUpload",[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])};
SWFUpload.prototype.getFile=function(a){return typeof a==="number"?this.callFlash("GetFileByIndex",[a]):this.callFlash("GetFile",[a])};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash("SetUploadURL",[a])};
SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash("SetPostParams",[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash("SetPostParams",[this.settings.post_params])};
SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash("SetFileTypes",[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash("SetFileSizeLimit",[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash("SetFileUploadLimit",[a])};
SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash("SetFileQueueLimit",[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash("SetFilePostName",[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash("SetUseQueryString",[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash("SetRequeueOnError",[a])};
SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a==="string")a=a.replace(" ","").split(",");this.settings.http_success=a;this.callFlash("SetHTTPSuccess",[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash("SetDebugEnabled",[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined)a="";this.settings.button_image_url=a;this.callFlash("SetButtonImageURL",[a])};
SWFUpload.prototype.setButtonDimensions=function(a,b){this.settings.button_width=a;this.settings.button_height=b;var c=this.getMovieElement();if(c!=undefined){c.style.width=a+"px";c.style.height=b+"px"}this.callFlash("SetButtonDimensions",[a,b])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash("SetButtonText",[a])};
SWFUpload.prototype.setButtonTextPadding=function(a,b){this.settings.button_text_top_padding=b;this.settings.button_text_left_padding=a;this.callFlash("SetButtonTextPadding",[a,b])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash("SetButtonTextStyle",[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash("SetButtonDisabled",[a])};
SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash("SetButtonAction",[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash("SetButtonCursor",[a])};
SWFUpload.prototype.queueEvent=function(a,b){if(b==undefined)b=[];else b instanceof Array||(b=[b]);var c=this;if(typeof this.settings[a]==="function"){this.eventQueue.push(function(){this.settings[a].apply(this,b)});setTimeout(function(){c.executeNextEvent()},0)}else if(this.settings[a]!==null)throw"Event handler "+a+" is unknown or is not a function";};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;typeof a==="function"&&a.apply(this)};
SWFUpload.prototype.unescapeFilePostParams=function(a){var b=/[$]([0-9a-f]{4})/i,c={},d;if(a!=undefined){for(var e in a.post)if(a.post.hasOwnProperty(e)){d=e;for(var f;(f=b.exec(d))!==null;)d=d.replace(f[0],String.fromCharCode(parseInt("0x"+f[1],16)));c[d]=a.post[e]}a.post=c}return a};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return false}};
SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(a){this.cleanUp(a);this.queueEvent("swfupload_loaded_handler")}else this.debug("Flash called back ready but the flash movie can't be found.")};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&typeof a.CallFunction==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var b in a)try{if(typeof a[b]==="function")a[b]=null}catch(c){}}}catch(d){}};
SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("file_queued_handler",a)};SWFUpload.prototype.fileQueueError=function(a,b,c){a=this.unescapeFilePostParams(a);this.queueEvent("file_queue_error_handler",[a,b,c])};SWFUpload.prototype.fileDialogComplete=function(a,b){this.queueEvent("file_dialog_complete_handler",[a,b])};
SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("return_upload_start_handler",a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler==="function"){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else if(this.settings.upload_start_handler!=undefined)throw"upload_start_handler must be a function";if(b===undefined)b=true;this.callFlash("ReturnUploadStart",[!!b])};
SWFUpload.prototype.uploadProgress=function(a,b,c){a=this.unescapeFilePostParams(a);this.queueEvent("upload_progress_handler",[a,b,c])};SWFUpload.prototype.uploadError=function(a,b,c){a=this.unescapeFilePostParams(a);this.queueEvent("upload_error_handler",[a,b,c])};SWFUpload.prototype.uploadSuccess=function(a,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_success_handler",[a,b])};
SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("upload_complete_handler",a)};SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)};SWFUpload.prototype.debugMessage=function(a){if(this.settings.debug){var b=[];if(typeof a==="object"&&typeof a.name==="string"&&typeof a.message==="string"){for(var c in a)a.hasOwnProperty(c)&&b.push(c+": "+a[c]);a=b.join("\n")||"";b=a.split("\n");a="EXCEPTION: "+b.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(a)}else SWFUpload.Console.writeLine(a)}};
SWFUpload.Console={};
SWFUpload.Console.writeLine=function(a){var b,c;try{b=document.getElementById("SWFUpload_Console");if(!b){c=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(c);b=document.createElement("textarea");b.id="SWFUpload_Console";b.style.fontFamily="monospace";b.setAttribute("wrap","off");b.wrap="off";b.style.overflow="auto";b.style.width="700px";b.style.height="350px";b.style.margin="5px";c.appendChild(b)}b.value+=a+"\n";b.scrollTop=b.scrollHeight-b.clientHeight}catch(d){alert("Exception: "+
d.name+" Message: "+d.message)}};function Cookie(){}Cookie.GetCookieObj=function(){var a=document.cookie.replace(new RegExp("; ","g"),"\n")+"\n",b=null;if((a=a.match(/\b(.+?=.+?)\n/g))&&a.length>0){var c=0;b={};for(var d=0;d<a.length;d++){a[d]=a[d].replace(/\n/,"");c=a[d].indexOf("=");b[a[d].substring(0,c)]=a[d].substring(c+1)}}return b};Cookie.SetCookie=function(a){document.cookie=a.name+"="+escape(a.val)+(a.expire?"; expires="+a.expire:"")+(a.path?"; path="+a.path:"")+(a.domain?"; domain="+a.domain:"")+(a.secure?"; secure":"")};
Cookie.DeleteCookie=function(a,b,c){GetCookieObj()[a]!=undefined&&SetCookie(a,"",GetDate("gmt",-1),c,b)};function Element(){}Element.Body=function(){return $T("body")[0]};Element.IsElement=function(a){if(a!=null&&typeof a.nodeType==T_NUM)if(a.nodeType==1||a.nodeType==3||a.nodeType==9)return true;return false};Element.Parent=function(a){if(Element.IsElement(a))if(gIsMSIE)if(a.nodeType==3){if(a.parentNode!=null)return a.parentNode}else{if(a.parentElement!=null)return a.parentElement}else if(a.parentNode!=null)return a.parentNode;return null};
Element.Replace=function(a,b){if(Element.IsElement(a)){var c=Element.Parent(b);c&&c.replaceChild(a,b)}};Element.RemoveChilds=function(a){if(Element.IsElement(a))for(;a.childNodes.length;)a.removeChild(a.childNodes[0])};Element.Remove=function(a){var b=Element.Parent(a);b&&b.removeChild(a)};
Element.SetOpacity=function(a,b){if(Element.IsElement(a))if(gIsMSIE)a.style.filter=b>=100?null:"alpha(opacity="+b+")";else if(gIsFox)a.style.MozOpacity=b>=100?null:b<1?0:b/100;else a.style.opacity=b>=100?null:b<1?0:b/100};
Element.GetHeight=function(a,b){b=typeof b!=T_NUM?0:b;if(Element.IsElement(a)){b=a.clientHeight>b?a.clientHeight:b;for(var c=0;c<a.childNodes.length;c++){b=a.childNodes[c].clientHeight&&a.childNodes[c].clientHeight>b?a.childNodes[c].clientHeight:b;if(a.childNodes[c].childNodes)b=Element.GetHeight(a.childNodes[c],b)}}return b};EventCenter.Inherits(dfObject);function EventCenter(){return this.BehaveSingleton()}EventCenter.prototype.Initialize=function(){this.container={};this.serial=0};EventCenter.DefaultCenter=function(){return EventCenter.GetInstance()};EventCenter.Container=function(){return EventCenter.DefaultCenter().container};EventCenter.Serial=function(){return EventCenter.DefaultCenter().serial};
EventCenter.AddEvent=function(a,b,c,d,e,f){if(c&&typeof c==T_OBJ){if(dfObject.TypeOf(a,T_OBJ,b,T_STR,c[d],T_FUNC)!=true)throw Error("Param Error : \nEventCenter.AddEvent( aElm:element, aEvtType:string, aFunc:aDelegate.function_name, aCapture:boolean )");}else{c=null;if(dfObject.TypeOf(a,T_OBJ,b,T_STR,d,T_FUNC)!=true)throw Error("Param Error : \nEventCenter.AddEvent( aElm:element, aEvtType:string, aFunc:function, aCapture:boolean )");}var g=EventCenter.DefaultCenter(),h=a.serial=g.serial,i=new Object({serial:h,
elm:a,type:b,delegate:c,func:d,obj:f,capture:e?true:false,callback:function(j){i.evt=EventCenter.Event(j);j.returnValue=i.delegate?i.delegate[i.func](i.elm,i):i.func(i.elm,i);return j.returnValue}});g.container[h]=dfObject.AddObjectContainer(g.container[h],i);if(i.elm.addEventListener)i.elm.addEventListener(i.type.toLowerCase(),i.callback,i.capture);else i.elm.attachEvent&&i.elm.attachEvent("on"+i.type.toLowerCase(),i.callback);g.serial++;return h};
EventCenter.RemoveEvent=function(a){var b=EventCenter.DefaultCenter(),c=b.container[a];if(c){if(c.elm.removeEventListener)c.elm.removeEventListener(c.type,c.callback,c.capture);else c.elm.detachEvent&&c.elm.detachEvent("on"+c.evt,c.callback);b.container[a]=dfObject.RemoveObjectContainer(b.container[a],c,null);b.container[a]&&delete b.container[a]}};EventCenter.Event=function(a){return a?a:window.event};
EventCenter.StopPropagation=function(a){a=EventCenter.Event(a);a.cancelBubble=true;a.stopPropagation&&a.stopPropagation(a)};Notification.Inherits(dfObject);function Notification(a,b,c,d){if(dfObject.TypeOf(a,T_STR,b,T_OBJ,c,T_STR)!=true)throw Error("Param Error : \nNotification( aName:string, aObserver:object, aMethod:string, aObject:[option:any type] )");else{this._name=a;this._observer=b;this._method=c;this._object=d}}Notification.prototype.CompareWithObserver=function(a,b){return b!=null?this._object==b&&this._observer==a:this._observer==a};
Notification.prototype.Notify=function(a,b){if(!a||typeof a!=T_OBJ)throw Error("Param Error : \nNotification.Notify( aSender:object, aObject:[option:any type]");if(typeof this._observer[this._method]!=T_FUNC){var c=this._observer.constructor.Class?this._observer.constructor.Class():"unknown object";dfError.AddError(this.constructor.Class(),Error("["+c+"] method not implemented for ["+this._name+"] notification."),true)}else this._object&&this._object!==a||this._observer[this._method](a,this._name,
b)};NotificationCenter.Inherits(dfObject);function NotificationCenter(){return this.BehaveSingleton()}
NotificationCenter.prototype.Initialize=function(){this.defaultCenter={};EventCenter.AddEvent(window,"load",null,function(){NotificationCenter.PostNotification(this,"WindowLoad",arguments)});EventCenter.AddEvent(window,"resize",null,function(){NotificationCenter.PostNotification(this,"WindowResize",arguments)});EventCenter.AddEvent(window,"unload",null,function(){NotificationCenter.PostNotification(this,"WindowUnload",arguments)})};NotificationCenter.DefaultCenter=function(){return NotificationCenter.GetInstance().defaultCenter};
NotificationCenter.AddObserver=function(a,b,c,d){if(dfObject.TypeOf(a,T_OBJ,b,T_STR,c,T_STR)!=true)throw Error("Param Error : \nNotificationCenter.AddObserver( aObserver:object, aMethod:string, aNotificationName:string, aObject:[option:any type] )");var e=NotificationCenter.DefaultCenter();a=new Notification(c,a,b,d);e[c]=dfObject.AddObjectContainer(e[c],a)};
NotificationCenter.RemoveObserver=function(a){if(!a||typeof a!=T_OBJ)throw Error("Param Error : \nNotificationCenter.RemoveObserver( aObserver:object");var b=NotificationCenter.DefaultCenter();for(var c in b){b[c]=dfObject.RemoveObjectContainer(b[c],a,function(d,e){return d.CompareWithObserver(e,null)});b[c]||delete b[c]}};
NotificationCenter.RemoveObserverFromNotification=function(a,b,c){if(dfObject.TypeOf(a,T_OBJ,b,T_STR)!=true)throw Error("Param Error : \nNotificationCenter.RemoveObserverFromNotification( aObserver:object, aNotificationName:string");var d=NotificationCenter.DefaultCenter();d[b]=dfObject.RemoveObjectContainer(d[b],new Object({observer:a,object:c}),function(e,f){return e.CompareWithObserver(f.observer,f.object)});d[b]||delete d[b]};
NotificationCenter.PostNotification=function(a,b,c){if(dfObject.TypeOf(a,T_OBJ,b,T_STR)!=true)throw Error("Param Error : \nNotificationCenter.PostNotification( aSender:object, aNotificationName:string");if(b=NotificationCenter.DefaultCenter()[b])try{if(typeof b==T_OBJ)if(b instanceof Array)for(var d=0;d<b.length;d++)b[d].Notify(a,c);else b.Notify(a,c)}catch(e){throw e;}};function Resizer(a){if(a=$(a)){var b=this;a.onmousedown=function(c){c=EventCenter.Event(c);b.TrackResize(c,this)}}}Resizer.prototype.TrackResize=function(a){var b=$("mrows"),c=b.clientHeight,d=a.clientY;window.onmouseup=function(){window.onmousemove=null;window.onmouseup=null};window.onmousemove=function(e){e=EventCenter.Event(e);e=c+(e.clientY-d)+(b.offsetHeight-b.clientHeight);if(e>0)b.style.height=e+"px"}};function Scroller(){this.interval=null}
Scroller.prototype.Scroll=function(a,b,c,d,e){if(this.intervalId){clearInterval(this.intervalId);this.intervalId=null}d=b=="h"?a.scrollWidth-a.clientWidth:a.scrollHeight-a.clientHeight;c=c>d?d:c<0?0:c;if(!(!d||b!="h"&&b!="v")){var f=this;try{this.intervalId=setInterval(function(){var h=b=="h"?a.scrollLeft:a.scrollTop;if(h!=c){var i=h-c,j=Math.round(i/10);h-=j?j:i>0?1:-1;if(b=="h")a.scrollLeft=h;else if(b=="v")a.scrollTop=h}else{clearInterval(f.intervalId);f.intervalId=null}},e)}catch(g){alert(g);
clearInterval(this.intervalId);this.intervalId=null}}};function XMLPackage(a,b,c,d){if(dfObject.TypeOf(a,T_STR,c,T_STR,b,T_STR,d,T_OBJ)!=true)throw Error("Param Error : \nXMLPackage( aID:string, aURL:string, aMethod:string, aQuery:object )");else if(this._xhr=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")){this._id=a;this.Method(c);this.URL(b);this.Query(d)}else return null}XMLPackage.prototype.Id=function(){return this._Id};
XMLPackage.prototype.Method=function(a){if(typeof a==T_STR){a=a.toUpperCase();if(!a.match(/^GET|PUT|POST|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PROPFIND|PROPPATCH|MKCOL|COPY|MOVE|LOCK|UNLOCK|INVALID$/))throw Error("Method "+a+" is not supported.");this._method=a}if(typeof this._method!=T_STR||!this._method.match(/^(GET|PUT|POST|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PROPFIND|PROPPATCH|MKCOL|COPY|MOVE|LOCK|UNLOCK|INVALID)$/))throw Error("Method "+this._method+" is not supported.");return this._method};
XMLPackage.prototype.URL=function(a){if(typeof a==T_STR)this._url=a=a.replace(/\/+/,"/");return this._url};XMLPackage.prototype.Query=function(a){if(a!=null&&typeof a==T_OBJ){var b="";for(var c in a)if(String(a[c]).length)b+=c+"="+encodeURIComponent(a[c])+"&amp;";this._query=b}if(typeof this._query!=T_STR)this._query="";return this._query};XMLPackage.prototype.XHR=function(){return this._xhr};
XMLPackage.prototype.Open=function(){if(this._method.match(/^(GET|PUT|POST|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PROPFIND|PROPPATCH|MKCOL|COPY|MOVE|LOCK|UNLOCK|INVALID)$/)){var a=this._url,b=null;if(this._method==M_POST)b=this._query;else a+=String(this._query).length?"?"+this._query:"";this._xhr.open(this._method,a,true);this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xhr.send(b)}else throw Error("Method "+aMethod+" is not supported.");};
XMLPackage.ResponseTextUTF8=function(a){var b="";try{b=a;if(navigator.appVersion.indexOf("KHTML")>-1){var c=escape(b);if(c.indexOf("%u")<0&&c.indexOf("%")>-1)b=decodeURIComponent(c)}}catch(d){dfError.AddError(this.constructor.Class(),d,true)}return b};XMLPackage.XML2Object=function(a,b){try{var c={},d=a.documentElement;c[d.nodeName]=XMLPackage.Element2Object(d,b);XMLPackage.ParseXMLElement(c[d.nodeName],d,b);return c}catch(e){dfError.AddError(this.constructor.Class(),e,true)}return null};
XMLPackage.ParseXMLElement=function(a,b,c){var d;if(b.childNodes&&b.childNodes.length)for(var e=0;b.childNodes.length>e;e++)if(!(b.childNodes[e].nodeType==3||b.childNodes[e].nodeType==4)){d=String(b.childNodes[e].nodeName);if(a[d]&&dfObject.InstanceOf(a[d],Array)==false)a[d]=new Array(a[d]);a[d]=a[d]?a[d]:"";if(dfObject.InstanceOf(a[d],Array))a[d].push(XMLPackage.Element2Object(b.childNodes[e],c));else a[d]=XMLPackage.Element2Object(b.childNodes[e],c);XMLPackage.ParseXMLElement(dfObject.InstanceOf(a[d],
Array)?a[d][a[d].length-1]:a[d],b.childNodes[e],c)}};XMLPackage.Element2Object=function(a,b){var c={},d=0;try{if(a.attributes.length){var e={};c.attributes=e;for(var f=0;f<a.attributes.length;f++)e[a.attributes[f].name]=a.attributes[f].nodeValue}d=a.firstChild?a.firstChild.nodeType:0;if(a.firstChild&&(d==3||d==4)){var g=a.firstChild?a.firstChild.nodeValue:"";if(b){if(g.replace(/[\n\s]/g,"").length)c.nodeValue=g}else c.nodeValue=g}}catch(h){alert(h)}return c};XMLRequestCenter.Inherits(dfObject);
function XMLRequestCenter(){return this.BehaveSingleton()}XMLRequestCenter.prototype.Initialize=function(){this.defaultCenter={}};XMLRequestCenter.DefaultCenter=function(){return XMLRequestCenter.GetInstance().defaultCenter};XMLRequestCenter.GetRequestPackage=function(a){return XMLRequestCenter.DefaultCenter()[a]};
XMLRequestCenter.Request=function(a,b,c,d,e,f){try{if(typeof a!=T_STR&&typeof b!=T_STR&&typeof c!=T_STR&&typeof d!=T_OBJ&&typeof e!=T_FUNC)throw Error("Param Error : \nXMLRequestCenter.Request( aID:string, aMethod:string, aURL:string, aQuery:object, aCallback:[option:callback function], aObj:[option:any type] )");var g=XMLRequestCenter.DefaultCenter(),h=g[a];if(d==null)d={};d.AJAX_REQUEST=(new Date).getTime();if(h){h.URL(c);h.Method(b);h.Query(d)}else if(h=new XMLPackage(a,c,b,d))gIsMSIE||(g[a]=dfObject.AddObjectContainer(g[a],
h));if(h){h.XHR().onreadystatechange=function(){h.XHR().readyState!=3&&h.XHR().readyState==4&&XMLRequestCenter.RequestCallback(h.XHR(),e,f)};h.Open()}}catch(i){dfError.AddError(this.constructor.Class(),i,true);throw i;}};XMLRequestCenter.RequestCallback=function(a,b,c){b&&typeof b==T_FUNC&&b(a,c)};