// IPORT Web Engine 2.0 & NWApi UI 2.0
// Copyright (c) 2001-2008 NWBOX S.r.l
window.NW||(window.NW={});(function(){NW.extend=function(A,C){var B;C=C||this;for(B in A){C[B]=A[B]}return C};NW.extend({root:null,path:null,window:null,browser:null,document:null,trim:function(A){return A.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},each:function(B,D){for(var C=0,A=B.length;A>C;++C){if(typeof B[C]!="undefined"){D(B[C])}}},filter:function(B,E){for(var C=0,A=B.length,D=[];A>C;++C){if(typeof B[C]!="undefined"&&E(B[C])){D[D.length]=B[C]}}return D},include:function(A){var C=NW.document,B=C.createElement("script");B.src=A;C.getElementsByTagName("head")[0].appendChild(B)},init:function(){var A=top,D=A.document,B=A.navigator.userAgent.toLowerCase(),C=D.getElementsByTagName("script")[0].src;NW.window=A;NW.document=D;NW.root=NW.document.documentElement;NW.path=C.slice(0,C.lastIndexOf("/")+1);NW.browser={dom:A.opera?2:D.all?0:D.getElementById?1:-1,ver:B.match(/.+(?:rv|it|ml|ra|ie)[\/: ]([\d.]+)/)[1],gecko:/gecko/.test(B)?parseFloat(B.split("rv:")[1]):0,opera:/opera/.test(B)?parseFloat(B.split("opera ")[1]):0,khtml:/khtml/.test(B)?parseFloat(B.split("khtml/")[1]):0,safari:/webkit/.test(B)?parseFloat(B.split("webkit/")[1]):0,msie:/msie/.test(B)&&!A.opera?parseFloat(B.split("msie ")[1]):0};if(NW.browser.msie>=6&&D.execCommand){D.execCommand("BackgroundImageCache",false,true)}},setCookie:function(B,A,E,F,D,C){NW.document.cookie=B+"="+escape(A)+((E)?"; path="+E:"")+((F)?"; domain="+F:"")+((D)?"; expires="+D.toGMTString():"")+((C)?"; secure":"")},getCookie:function(B){var A=NW.document.cookie.match("(?:^|;)\\s*"+B+"=([^;]*)");return A?unescape(A[1]):false},deleteCookie:function(A,B,C){if(NW.getCookie(A)){NW.document.cookie=A+"="+((B)?"; path="+B:"")+((C)?"; domain="+C:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}},makePath:function(B){var A=this.parseUrl(/^((?:http|ftp)s?:)/.test(B)?B:"/"+B);return((A.protocol||location.protocol)+"//"+(A.hostname||location.hostname)+("/"+A.pathname).replace("//","/")+A.hash+A.search)},parseUrl:function(A){if(A.match(new RegExp("^((?:http|ftp)s?:)?(?://)?([^/:]+)?(:\d*)?([^#? ]*)([w-]+)?(#[w-]+)?$"))){return{url:RegExp["$&"],protocol:RegExp.$1,hostname:RegExp.$2,port:RegExp.$3,pathname:RegExp.$4,hash:RegExp.$5,search:RegExp.$6}}else{return{url:"",protocol:"",hostname:"",port:"",pathname:"",hash:"",search:""}}},winOpen:function(K,B,I,E,C,H,F){var G,D,L,J,A=["scrollbars","resizable","statusbar","hotkeys","toolbar","location","directories","menubar"];for(L=(typeof I=="number"?"width="+I+",":"")+(typeof E=="number"?"height="+E+",":""),D=0;8>D;D++){L+=A[D]+(((C&Math.pow(2,D))!==0)?"=yes":"=no")+(7>D?",":"")}J=window.open(K,B.replace(/ /,/_/),L);if(J===null){return false}else{J.resizeTo(I+(window.pageXOffset>=0?0:10),E+(window.pageXOffset>=0?0:49));G=J.document}if(!K&&H){G.open("text/html","replace");G.write(H);G.close()}if(K===""||K=="about:"||typeof F=="function"){(function(){if(G.body&&G.getElementsByTagName("body")[0]){if(typeof F=="function"){F(J)}J.focus()}else{setTimeout(arguments.callee,50)}})()}return J},imgOpen:function(A,D,C){var B=new Image();B.onerror=function(){top.status="Error while loading image !"};B.onload=function(){top.status="Image loaded successfully !";NW.winOpen("",D,B.width,B.height,0,"",function(F){var H=F.document,E=H.body,G;G=H.createElement("img");G.src=B.src;while(E.lastChild){E.removeChild(E.lastChild)}E.insertBefore(G,F.document.body.firstChild);E.style.cssText="margin:0px;padding:0px;";if(typeof C=="function"){C(F)}F.focus()})};B.src=A},fixHeight:function(){var A,B=document.getElementsByTagName("div");for(A=0;A<B.length;A++){if(B[A].firstChild&&B[A].firstChild.nodeType==1){B[A].style.height=B[A].firstChild.offsetHeight}}},setSBase:function(E,G){var D=E.form.sbase,C=D.selectedIndex,F=D.options,A=F.length;if(A>0){var B={first:0,prev:F[C>0?C-1:0].value,next:F[C<A-1?C+1:A-1].value,last:F[A-1].value}[G];if(D.value!=B){D.value=B;E.form.submit()}}}});NW.init();if(!(NW.root&&typeof NW.root.className=="string")){return }NW.extend({hasClass:function(A,B){return(new RegExp("(^|\\s+)"+B+"(\\s+|$)")).test(A.className)},addClass:function(A,B){if(!NW.hasClass(A,B)){A.className=A.className+" "+B}},removeClass:function(A,B){A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)","g")," ");if(NW.hasClass(A,B)){NW.removeClass(A,B)}},toggle:function(A){if(A.style.display=="none"){A.style.display=""}else{A.style.display="none"}},show:function(A){A.style.display=""},hide:function(A){A.style.display="none"},setContent:function(B,A){B.innerHTML=A}})})();NW.Dom=function(){var D="1.0",K={},G={},B={from:[],items:[]},J=["htmlFor","className","tabIndex","accessKey","maxLength","readOnly","longDesc","frameBorder","isMap","useMap","noHref","noWrap","colSpan","rowSpan","cellPadding","cellSpacing","marginWidth","marginHeight"],S=/\:(nth|first|last|only)\-/,I=/\-(of-type)/,R=/^\s+|\s+$/g,A={npseudos:/^\:(nth-)?(first|last|only)?-?(child)?-?(of-type)?(\((?:even|odd|[^\)]*)\))?(.*)/,spseudos:/^\:([\w]+)(\(([\x22\x27])?(.*?(\(.*?\))?[^(]*?)\3\))?(.*)/,children:/^\s*\>\s*(.*)/,adjacent:/^\s*\+\s*(.*)/,relative:/^\s*\~\s*(.*)/,ancestor:/^(\s+)(.*)/,attribute:/^\[([-\w]*:?[-\w]+)\s*(?:([!^$*~|])?(\=)?\s*([\x22\x27])?([^\4]*?)\4|([^\4][^\]]*?))\](.*)/,all:/^\*(.*)/,id:/^\#([-\w]+)(.*)/,tagName:/^([-\w]+)(.*)/,className:/^\.([-\w]+)(.*)/},Q={all:/(^\*)$/,id:/^\#([-\w]+)$/,tagName:/^([\w]+)$/,className:/^\.([-\w]+)$/},M=function(V){var U=V.length,W=new Array(U);while(U--){W[U]=V[U]}return W},F=function(Y,U,f){var m,l,c,V,e,W,g,h,X,Z;while(Y){if((e=Y.match(A.all))){U="if(e.nodeType==1){"+U+"}"}else{if((e=Y.match(A.id))){U='if(e.id&&e.id=="'+e[1]+'"||((a=e.getAttributeNode("id"))&&a.value=="'+e[1]+'")){'+U+"}"}else{if((e=Y.match(A.tagName))){U='if(e.nodeName.toLowerCase()=="'+e[1].toLowerCase()+'"){'+U+"}"}else{if((e=Y.match(A.className))){U='if(e.className&&((" "+e.className).replace(/\\s+/g," ") + " ").indexOf(" '+e[1]+' ")>-1){'+U+"}"}else{if((e=Y.match(A.attribute))){V=e[1];for(c=0;c<J.length;++c){if(J[c].toLowerCase().indexOf(e[1])==0){V=J[c];break}}if(/\w+:\w+/.test(e[1])){X='(((a=e.getAttribute("'+e[1]+'",1))&&a)||"")'}else{if("|action|data|href|longdesc|lowsrc|src|".indexOf(e[1])>-1){X='(((a=e.getAttribute("'+e[1]+'",2))&&a)||"")'}else{X="(e."+V+'||"")'}}if(typeof document.fileSize!="undefined"){Z='((a=e.getAttributeNode("'+e[1]+'"))&&a.specified)'}else{Z='e.hasAttribute("'+e[1]+'")'}U="if("+(e[2]&&e[3]&&e[5]&&e[2]!="!"?(e[2]=="~"?'(" "+':(e[2]=="|"?'("-"+':""))+X+(e[2]=="!"||e[2]=="~"?'.replace(/\\s+/g," ")':"")+(e[2]=="~"?'+" ")':(e[2]=="|"?'+"-")':""))+(e[2]=="!"||e[2]=="~"?'.indexOf("':".match(/")+(e[2]=="^"?"^":e[2]=="~"?" ":e[2]=="|"?"-":"")+e[5]+(e[2]=="$"?"$":e[2]=="~"?" ":e[2]=="|"?"-":"")+(e[2]=="!"||e[2]=="~"?'")>-1':(e[2]=="|"?"/i":"/")+")"):(e[3]&&e[5]?X+(e[2]=="!"?"!":"=")+'="'+e[5]+'"':Z))+"){"+U+"}"}else{if((e=Y.match(A.adjacent))){U="while(e.previousSibling){e=e.previousSibling;if(e.nodeType==1){"+U+"break;}}"}else{if((e=Y.match(A.relative))){U="while(e.previousSibling){e=e.previousSibling;if(e.nodeType==1){"+U.replace(/\}$/,"break;}")+"}}"}else{if((e=Y.match(A.children))){U="while(e.parentNode.nodeType==1){e=e.parentNode;"+U+"break;}"}else{if((e=Y.match(A.ancestor))){U="while(e.parentNode.nodeType==1){e=e.parentNode;"+U.replace(/\}$/,"break;}")+"}"}else{if((e=Y.match(A.npseudos))&&(e[2]||e[5])){h=e[4]=="of-type"?"Twin":"Child";if(e[5]){e[5]=e[5].replace(/\(|\)/g,"");if(e[5]=="even"){m=2;l=0}else{if(e[5]=="odd"){m=2;l=1}else{m=e[5].match(/^-/)?-1:e[5].match(/^n/)?1:0;m=m||((W=e[5].match(/(-?\d{1,})n/))?parseInt(W[1],10):0);l=0||((W=e[5].match(/(-?\d{1,})$/))?parseInt(W[1],10):0)}}V=(e[2]=="last"?"(s."+h+"Lengths[s."+h+"Parents[u]]"+(e[4]=="of-type"?"[e.nodeName.toUpperCase()]":"")+"-"+(l-1)+")":l);g=e[5]=="even"||e[5]=="odd"||m>Math.abs(l)?("%"+m+"=="+l):m<0?"<="+V:m>0?">="+V:m==0?"=="+V:"";if(f){U="u=s.getIndex(e)+1;if(s."+h+"Indexes[u]"+g+"){"+U+"}"}else{U="if((n=e)){u=1"+(e[4]=="of-type"?",t=e.nodeName;":";")+"while((n=n."+(e[2]=="last"?"next":"previous")+"Sibling)){if(n.node"+(e[4]=="of-type"?"Name==t":"Type==1")+"){++u;}}if(u"+g+"){"+U+"}}"}}else{V="s."+h+"Lengths[s."+h+"Parents[u]]"+(e[4]=="of-type"?"[e.nodeName.toUpperCase()]":"");if(f){U="u=s.getIndex(e)+1;if("+(e[2]=="first"?"s."+h+"Indexes[u]==1":e[2]=="only"?V+"==1":e[2]=="last"?"s."+h+"Indexes[u]=="+V:"")+"){"+U+"}"}else{U="if((n=e)){"+(e[4]?"t=e.nodeName;":"")+"while((n=n."+(e[2]=="first"?"previous":"next")+"Sibling)&&n.node"+(e[4]?"Name!=t":"Type!=1")+");if(!n&&(n=e)){"+(e[2]=="first"||e[2]=="last"?"{"+U+"}":"while((n=n."+(e[2]=="first"?"next":"previous")+"Sibling)&&n.node"+(e[4]?"Name!=t":"Type!=1")+");if(!n){"+U+"}")+"}}"}}}else{if((e=Y.match(A.spseudos))){switch(e[1]){case"not":U=F(e[2].replace(/\((.*)\)/,"$1"),U,f).replace(/if([^\{]+)/,"if(!$1)");break;case"root":U="if(e==(e.ownerDocument||e.document||e).documentElement){"+U+"}";break;case"empty":U="if(/^\\s*$/.test(e.innerHTML)&&!/\\r|\\n/.test(e.innerHTML)){"+U+"}";break;case"contains":U='if((e.textContent||e.innerText||"").indexOf("'+e[2].replace(/\(|\)/g,"")+'")!=-1){'+U+"}";break;case"enabled":U='if(e.type&&e.type!="hidden"&&!e.disabled){'+U+"}";break;case"disabled":U='if(e.type&&e.type!="hidden"&&e.disabled){'+U+"}";break;case"checked":U='if(e.type&&e.type!="hidden"&&e.checked){'+U+"}";break;case"target":U="if(e.id==location.href.match(/#([_-w]+)$/)[1]){"+U+"}";break;case"link":U='if(e.nodeName.toUpperCase()=="A"&&e.href){'+U+"}";break;case"visited":U='if(e.nodeName.toUpperCase()=="A"&&e.visited){'+U+"}";break;case"active":U="var d=(e.ownerDocument||e.document);if(d.activeElement&&e===d.activeElement){"+U+"}";break;case"hover":U="var d=(e.ownerDocument||e.document);if(d.hoverElement&&e===d.hoverElement){"+U+"}";break;case"focus":U='var d=(e.ownerDocument||e.document);if(e.type&&e.type!="hidden"&&((e.hasFocus&&e.hasFocus())||(d.focusElement&&e===d.focusElement))){'+U+"}";break;default:break}}else{throw new Error('NW.Dom.compileSelector: syntax error, unknown selector rule "'+Y+'"')}}}}}}}}}}}Y=e[e.length-1]}return U},E=function(U,a){var X=0,Y="",W,V={},Z=U.split(",");for(;X<Z.length;++X){W=Z[X].replace(R,"");if(W&&W.length>0){if(!V[W]){V[W]=W;if(a){Y+=F(W,"r[r.length]=c[k];",a)}else{Y+=F(W,"return true;",a)}}}}if(a){return new Function("c,s","var k=-1,e,r=[],n,j,u,t,a;while((e=c[++k])){"+Y+"}return r;")}else{return new Function("e","var n,u,a;"+Y+"return false;")}},H={Elements:[],TwinIndexes:[],TwinLengths:[],TwinParents:[],ChildIndexes:[],ChildLengths:[],ChildParents:[],hasElements:false,hasTwinIndexes:false,hasChildIndexes:false,getIndex:function(U){return O(this.Elements,U)}},O=function(V,U){if(typeof document.fileSize!="undefined"){O=function(X,W){return W.sourceIndex||-1}}else{if(V.indexOf){O=function(X,W){return X.indexOf(W)}}else{O=function(Y,X){var W=Y.length;while(--W>=0){if(X==Y[W]){break}}return W}}}return O(V,U)},P=function(a,m){var X=0,g,U,V,t,q,Z=[a],n=[0],Y=[0],W=[0];while((g=m[X++])){Z[X]=g;W[X]=0;V=g.parentNode;U=g.nodeName;if(t!=V){q=O(Z,t=V)}n[X]=q;W[q]=W[q]||{};W[q][U]=W[q][U]||0;Y[X]=++W[q][U]}H.TwinParents=n;H.TwinIndexes=Y;H.TwinLengths=W},C=function(Z,g){var W=0,a,U,q,n,Y=[Z],m=[0],X=[0],V=[0];while((a=g[W++])){Y[W]=a;V[W]=0;U=a.parentNode;if(q!=U){n=O(Y,q=U)}m[W]=n;X[W]=++V[n]}H.ChildParents=m;H.ChildIndexes=X;H.ChildLengths=V},N=false,T=function(U,V){L();V||(V=document);if(!N&&U){V.addEventListener("DOMNodeInserted",L,false);V.addEventListener("DOMNodeRemoved",L,false);N=true}else{if(N){V.removeEventListener("DOMNodeInserted",L,false);V.removeEventListener("DOMNodeRemoved",L,false);N=false}}},L=function(){H.hasElements=false;H.hasTwinIndexes=false;H.hasChildIndexes=false;B={from:[],items:[]}};if(document.implementation.hasFeature("MutationEvents","2.0")||document.implementation.hasFeature("Events","2.0")&&document.implementation.hasFeature("Core","2.0")){T(true);window.addEventListener("beforeunload",function(){window.removeEventListener("beforeunload",arguments.callee,false);T(false)},false)}return{compile:function(U){return E(U,true).toString()},setCache:T,expireCache:L,match:function(V,U){if(!(V&&V.nodeType==1)){return false}if(typeof U=="string"&&U.length){if(!G[U]){G[U]=E(U,false)}return G[U](V)}else{throw new Error('NW.Dom.match: "'+U+'" is not a valid CSS selector.')}return false},select:function(U,b){var a=[],W;if(!(b&&(b.nodeType==1||b.nodeType==9))){b=document}if(typeof U=="string"&&U.length){if((W=U.match(Q.all))){var V,Z,Y=-1;V=b.getElementsByTagName("*");while((Z=V[++Y])){if(Z.nodeType==1){a[a.length]=Z}}return a}else{if((W=U.match(Q.id))){var X=b.getElementById(W[1]);return X?[X]:[]}else{if((W=U.match(Q.tagName))){return M(b.getElementsByTagName(W[1]))}}}if(N&&H.hasElements){a=H.Elements}else{a=M(b.getElementsByTagName("*"));H.Elements=a;H.hasTwinIndexes=false;H.hasChildIndexes=false}if(U.match(S)){if(!N||!H.hasChildIndexes){C(b,a);H.hasChildIndexes=true}}if(U.match(I)){if(!N||!H.hasTwinIndexes){P(b,a);H.hasTwinIndexes=true}}H.hasElements=true;if(!K[U]){K[U]=E(U,true)}if(N){if(!(B.items[U]&&B.from[U]==b)){B.items[U]=K[U](a,H);B.from[U]=b}return B.items[U]}else{return K[U](a,H)}}else{throw new Error('NW.Dom.select: "'+U+'" is not a valid CSS selector.')}return[]},isCompat:function(U){return U.compatMode&&(/CSS/).test(U.compatMode)?true:false},getRoot:function(U){return this.isCompat(U)?U.documentElement:U.body},getTopWindow:function(){var U=window;while(U.frameElement){U=U.frameElement.contentWindow}return U},getWindow:function(U){return U.defaultView||U.parentWindow||U.contentWindow||null},getDocument:function(U){return U.ownerDocument||U.document||U},getWindowSize:function(W){var V=this.getRoot(W),U=this.getWindow(W);return{w:U.innerWidth||V.clientWidth,h:U.innerHeight||V.clientHeight}},getWindowScroll:function(W){var V=this.getRoot(W),U=this.getWindow(W);return{x:U.pageXOffset||V.scrollLeft,y:U.pageYOffset||V.scrollTop}},getDocumentSize:function(V){var U=this.getRoot(V);return{w:U.scrollWidth||V.width,h:U.scrollHeight||V.height}},getXY:function(V){var U=0,W=0;if(V.offsetParent){while(V.offsetParent){U+=V.offsetLeft+(V.clientLeft||0);W+=V.offsetTop+(V.clientTop||0);V=V.offsetParent}}else{if(V.x){U+=V.x;W+=V.y}}return{x:U,y:W}},getMouse:function(U){if(typeof U.pageX=="number"){this.getMouse=function(V){return{x:V.pageX,y:V.pageY}}}else{if(typeof U.clientX=="number"){this.getMouse=function(W){var V=this.getRoot(this.getDocument(W.srcElement));return{x:W.clientX+V.scrollLeft,y:W.clientY+V.scrollTop}}}else{this.getMouse=function(V){return{x:0,y:0}}}}return this.getMouse(U)},getScreen:function(U){return{x:U.screenX,y:U.screenY}},getButton:function(U){return U.which==3||U.button==2?"r":"l"},getSBLive:function(g){var Z=g.document,f=Z.body,a=Z.compatMode,Y=Z.documentElement,U=a&&(/CSS/).test(a)?Y:f,V=U.scrollWidth||Z.width,e=U.scrollHeight||Z.height,X=g.innerWidth||U.clientWidth,W=g.innerHeight||U.clientHeight;return{h:W>e||V>X,v:X>V||e>W}},getSBSize:function(V){if(!arguments.callee.sizes){var X=V.document,U=X.body,W=X.createElement("div");W.style.cssText="position:absolute;overflow:scroll;top:-100px;left:-100px;width:100px;height:100px;";U.insertBefore(W,U.firstChild);arguments.callee.sizes={h:W.offsetHeight-W.clientHeight,v:W.offsetWidth-W.clientWidth};U.removeChild(W)}return arguments.callee.sizes},getFirst:function(U){return U.parentNode.childNodes[0]},getLast:function(U){return U.parentNode.childNodes[U.parentNode.childNodes.length-1]},getFirstOfType:function(V){var U=V.tagName;V=NW.Dom.getFirst(V);while(V&&V.tagName!=U){V=NW.Dom.getNext(V)}return V},getLastOfType:function(V){var U=V.tagName;V=NW.Dom.getLast(V);while(V&&V.tagName!=U){V=NW.Dom.getPrev(V)}return V},getPrev:function(U){U=U.previousSibling;while(U&&U.nodeType!=1){U=U.previousSibling}return U},getNext:function(U){U=U.nextSibling;while(U&&U.nodeType!=1){U=U.nextSibling}return U},getPrevOfType:function(V){var U=V.tagName;V=V.previousSibling;while(V&&V.tagName!=U){V=V.previousSibling}return V},getNextOfType:function(V){var U=V.tagName;V=V.nextSibling;while(V&&V.tagName!=U){V=V.nextSibling}return V},getByClass:function(b,a,W,Z){var Y,V,U=0,X=[];W=W||"*";a=a||Z||document;Y=a.getElementsByTagName(W);V=Y.length-1;while(V>=0){if((" "+Y[V].className+" ").indexOf(b)>0){X[U++]=Y[V]}V--}return X},getElements:function(V,U){U=U.toUpperCase();return U=="*"?V.getElementsByTagName("*")||V.all:V.getElementsByTagName(U)||V.all.tags(U)},addElement:function(U,X,W,Z,b,f){var Y,V,a;if(U){if(U.nodeType!=9){Y=this.getDocument(U)}else{Y=U}}else{Y=document}if(X){V=this.createElement(Y,X)}if(V){if(W){V.id=W}if(b){V.title=b}if(Z){V.className=Z}if(U&&U.nodeType!=9){V=U.appendChild(V)}if(f){a=this.injectElement(V,f)}}else{if(f){if(U&&U.nodeType!=9){a=this.injectElement(U,f)}}}return V},injectElement:function(Y,V){var U,Z=this.getDocument(Y);if(/<((![-]*)|\w+)[^>]*>/.test(V)){if(!NW.browser.msie){var X,W;W=Z.createRange();W.setStartBefore(Y);X=W.createContextualFragment(V);U=this.clearElement(Y).appendChild(X)}else{Y.innerHTML="";Y.innerHTML=V;U=Y.firstChild}}else{if(V.search(/\S/)!=-1){U=Z.createTextNode(V);Y.appendChild(U)}else{U=Z.createTextNode(V);Y.appendChild(U)}}return U},clearElement:function(U){while(U.hasChildNodes()){U.removeChild(U.lastChild)}return U},createElement:function(V,U){if(typeof V.createElementNS!="undefined"){return V.createElementNS("http://www.w3.org/1999/xhtml",U)}if(typeof V.createElement!="undefined"){return V.createElement(U)}return false},addObject:function(Z,b,U,X){var W,V,Y,a=Z.createElement("object");if(b){a.id=b;a.name=b}if(U){a.className=U}for(W in X){if(typeof X[W]=="object"){for(V in X[W]){Y=Z.createElement("param");Y.name=V;Y.value=X[W][V];a.appendChild(Y)}}else{a[W]=X[W]}}return a},toDOMFragment:function(Y,W){var V=0,Z,X=(W||document).createElement("div"),U=(W||document).createDocumentFragment();X.innerHTML=Y;for(;Z=X.childNodes[V++];){U.appendChild(Z)}return U},swapNodes:function(U,V){var X=U.nextSibling,W=U.parentNode;V.parentNode.replaceChild(U,V);W.insertBefore(V,X)}}}();NW.Event=function(){var E="1.11",S={},Q={},T={},F=1,A=2,U=3,B={id:/#([^\.]+)/,tagName:/^([^#\.]+)/,className:/\.([^#]+)/,all:/^[\.\-\#\w\*]+$/},Z=false,V=typeof document.activeElement!="undefined",a=function(c,e,b){e||(e=J(c).event);e.currentTarget=c;e.target=e.srcElement||c;e.preventDefault=L;e.stopPropagation=M;e.eventPhase=b&&(e.target==c)?F:(e.target==c?A:U);e.relatedTarget=e[(e.target==e.fromElement?"to":"from")+"Element"];e.timeStamp=+new Date();return e},L=function(){this.returnValue=false},M=function(){this.cancelBubble=true},J=function(b){return(b.ownerDocument||b.document||b).parentWindow||window},K=function(n,f,h,g,c){var e,b,m=false;if(n&&n.elements){for(e=0,b=n.elements.length;b>e;e++){if(n.elements[e]===f&&n.funcs[e]===g&&n.parms[e]===c){m=e;break}}}return m},Y=function(c,f,e){for(var b=0,g=[];T[f].elements.length>b;b++){if(T[f].elements[b]===c&&T[f].funcs[b]===e){g.push(T[f].funcs[b])}}return g},H=function(m){var f,c,n,e,h,b=true,g=m.type;if(Z){if("|focus|blur|change|reset|submit|".indexOf(m.type)>-1&&!m.propagated){if(m.preventDefault){m.preventDefault()}else{m.returnValue=false}return false}}if(T[g]&&T[g].elements){n=T[g].elements.slice();e=T[g].funcs.slice();h=T[g].parms.slice();for(f=0,c=n.length;c>f;f++){if(n[f]===this&&((m.eventPhase==U&&h[f]===false)||(m.eventPhase==F&&h[f]===true)||!m.propagated)){if(m.propagated&&m.target===this){m.eventPhase=A}if(e[f].call(this,m)===false){b=false;break}}}}return b},R=function(m){var f,c,n,e,h,b=true,g=m.type;if(Q[g]&&Q[g].elements){n=Q[g].elements.slice();e=Q[g].funcs.slice();h=Q[g].parms.slice();for(f=0,c=n.length;c>f;f++){if(I(m.target,n[f])&&h[f]===this){if(e[f].call(m.target,m)===false){b=false;break}}}}return b},I=function(h,c){var f,l,g,i,e,b=false;if(typeof c=="string"){if(NW.Dom&&typeof NW.Dom.match=="function"){if(NW.Dom.match(h,c)){b=true}}else{if(c.match(B.all)){e=c.match(B.tagName);g=e?e[1]:"*";e=c.match(B.id);l=e?e[1]:null;e=c.match(B.className);i=e?e[1]:null;if((!l||l==h.id)&&(!g||g=="*"||g==h.nodeName.toLowerCase())&&(!i||(" "+h.className+" ").replace(/\s\s+/g," ").indexOf(" "+i+" ")>-1)){b=true}}}}else{if(typeof c=="element"){for(f in c){if(f=="className"){if((" "+h.className+" ").replace(/\s\s+/g," ").indexOf(" "+c[f]+" ")>-1){b=true;break}}else{if(f=="nodeName"||f=="tagName"){if(h.nodeName.toLowerCase()==c[f].toLowerCase()){b=true;break}}else{if(h[f]===c[f]){b=true;break}}}}}}return b},G=function(c,e,b){return{type:e,target:c,bubbles:true,cancelable:true,currentTarget:c,relatedTarget:null,timeStamp:+new Date(),preventDefault:L,stopPropagation:M,eventPhase:b?F:U}},O=function(c){var b=true,e=c.target;e["__"+c.type]=false;NW.Event.removeHandler(e,c.type,arguments.callee,false);b&&(b=N(e,c.type,true));b&&(b=N(e,c.type,false));if(e.form){e=e.form}b&&/^\s*function\s+/.test(e[c.type]+"")&&e[c.type]();return b},N=function(f,h,m){var g,e,p=true,c=f,n=[],b=G(f,h,m);b.propagated=true;while(c.nodeType==1){n.push(c);c=c.parentNode}if(m){n.reverse()}for(g=0,e=n.length;e>g;g++){b.currentTarget=n[g];b.eventPhase=m?F:U;if(H.call(n[g],b)===false||b.returnValue===false){p=false;break}}delete b.propagated;return p},P=function(c){var b=true,e=c.target;b&&(b=N(e,c.type,true));b&&(b=N(e,c.type,false));b||c.preventDefault();return b},X=function(c){var b=true,e=c.target;if(c.type=="beforedeactivate"){b&&(b=N(e,"blur",true));b&&(b=N(e,"blur",false))}if(c.type=="beforeactivate"){b&&(b=N(e,"focus",true));b&&(b=N(e,"focus",false))}b||(c.returnValue=false);return b},D=function(e){var f=e.target,c=f.type,b=J(f).document;if(f!=b.activeElement){if((!V||window.opera)&&f.nodeType==1){b.activeElement=f;b.focusElement=null}}if(c){if(f!=b.focusElement){if((!V||window.opera)){b.focusElement=f}}if(/file|text|password/.test(c)&&e.keyCode==13){c="submit";f=f.form}else{if(/select-(one|multi)/.test(c)){c="change"}else{if(/reset|submit/.test(c)){f=f.form}else{return }}}if(f&&!f["__"+c]){f["__"+c]=true;NW.Event.appendHandler(f,c,O,false)}}},W=function(b){var e=J(b),c=e.document;if(!Z){Z=true;NW.Event.appendHandler(e,"beforeunload",function(f){NW.Event.removeHandler(e,"beforeunload",arguments.callee,false);C(b)},false);NW.Event.appendHandler(c,"keydown",D,true);NW.Event.appendHandler(c,"mousedown",D,true);if(c.addEventListener){NW.Event.appendHandler(c,"blur",P,true);NW.Event.appendHandler(c,"focus",P,true)}else{if(c.attachEvent){NW.Event.appendHandler(c,"beforeactivate",X,true);NW.Event.appendHandler(c,"beforedeactivate",X,true)}}}},C=function(b){var e=J(b),c=e.document;if(Z){Z=false;NW.Event.removeHandler(c,"keydown",D,true);NW.Event.removeHandler(c,"mousedown",D,true);if(c.removeEventListener){NW.Event.removeHandler(c,"blur",P,true);NW.Event.removeHandler(c,"focus",P,true)}else{if(c.detachEvent){NW.Event.removeHandler(c,"beforeactivate",X,true);NW.Event.removeHandler(c,"beforedeactivate",X,true)}}}};if(!V||window.opera){document.activeElement=document.documentElement}return{EVENTS_W3C:true,stop:function(b){if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}return false},dispatch:function(e,f,c){var g,b,i=J(e),h=i.document;if(e.fireEvent){g=h.createEventObject();g.type=f;g.target=e;g.eventPhase=0;g.currentTarget=e;g.cancelBubble=!!c;g.returnValue=undefined;b=e.fireEvent("on"+f,a(e,g,c))}else{if(/mouse|click/.test(f)){g=h.createEvent("MouseEvents");g.initMouseEvent(f,true,true,i,0,0,0,0,0,false,false,false,false,0,null)}else{if(/key(down|press|out)/.test(f)){g=h.createEvent("KeyEvents");g.initKeyEvent(f,true,true,i,false,false,false,false,0,0)}else{g=h.createEvent("HTMLEvents");g.initEvent(f,true,true)}}b=e.dispatchEvent(g)}return b},appendHandler:function(e,g,f,b){var c;S[g]||(S[g]={elements:[],funcs:[],parms:[],wraps:[]});if((c=K(S[g],e,g,f,b||false))===false){S[g].elements.push(e);S[g].funcs.push(f);S[g].parms.push(b);if(e.addEventListener&&NW.Event.EVENTS_W3C){e.addEventListener(g,f,b||false)}else{if(e.attachEvent&&NW.Event.EVENTS_W3C){c=S[g].wraps.push(function(h){return f.call(e,a(e,h,b))});e.attachEvent("on"+g,S[g].wraps[c-1])}else{if(S[g].elements.length==0){if(typeof e["on"+g]=="function"){S[g].elements.push(e);S[g].funcs.push(e["on"+g]);S[g].parms.push(b)}o["on"+g]=function(h){return f.call(this,a(this,h,b))}}}}}return this},removeHandler:function(e,g,f,b){var c;if((c=K(S[g],e,g,f,b||false))!==false){S[g].elements.splice(c,1);S[g].funcs.splice(c,1);S[g].parms.splice(c,1);if(e.removeEventListener&&NW.Event.EVENTS_W3C){e.removeEventListener(g,f,b||false)}else{if(e.detachEvent&&NW.Event.EVENTS_W3C){e.detachEvent("on"+g,S[g].wraps[c]);S[g].wraps.splice(c,1)}else{if(S[g].elements.length==1){elements["on"+g]=S[g].elements[0];S[g].elements.splice(0,1);S[g].funcs.splice(0,1);S[g].parms.splice(0,1)}}}if(S[g].elements.length==0){delete S[g]}}return this},appendListener:function(e,g,f,b){var c;T[g]||(T[g]={elements:[],funcs:[],parms:[],wraps:[]});if((c=K(T[g],e,g,f,b||false))===false){if(!Z){W(e)}T[g].elements.push(e);T[g].funcs.push(f);T[g].parms.push(b);if(Y(e,g,f).length==1){NW.Event.appendHandler(e,g,H,b||false)}}return this},removeListener:function(e,g,f,b){var c;if((c=K(T[g],e,g,f,b||false))!==false){T[g].elements.splice(c,1);T[g].funcs.splice(c,1);T[g].parms.splice(c,1);if(T[g].elements.length==0){NW.Event.removeHandler(e,g,H,b||false);delete T[g]}}return this},appendDelegate:function(c,g,f,e){var b;e=e||document.documentElement;Q[g]||(Q[g]={elements:[],funcs:[],parms:[]});if((b=K(Q[g],c,g,f,e))===false){Q[g].elements.push(c);Q[g].funcs.push(f);Q[g].parms.push(e);if(Q[g].elements.length==1){NW.Event.appendListener(e,g,R,true)}}return this},removeDelegate:function(c,g,f,e){var b;e=e||document.documentElement;if((b=K(Q[g],c,g,f,e))!==false){Q[g].elements.splice(b,1);Q[g].funcs.splice(b,1);Q[g].parms.splice(b,1);if(Q[g].elements.length==0){delete Q[g];NW.Event.removeListener(e,g,R,true)}}return this},extend:function(b){for(var c in b){this[c]=b[c]}return this}}}();NW.Event.extend(function(){return{key:function(){var B,A,C=this;C.mods=[];C.keys=[];C.funcs=[];C.toggle=[];C.keydown=function(D){if(D.altKey||D.ctrlKey||D.shiftKey||D.metaKey){for(A in {altKey:0,ctrlKey:0,metaKey:0,shiftKey:0}){for(B=0;C.keys.length>B;B++){if(C.mods[B]==A.charAt(0)&&D[A]&&D.keyCode==C.keys[B]){C.funcs[B](C.toggle[B]);C.toggle[B]=1-C.toggle[B];NW.Event.stop(D)}}}}};C.addKey=function(D){C.mods[C.mods.length]=D.mod;C.keys[C.keys.length]=D.key;C.funcs[C.funcs.length]=D.onkey;C.toggle[C.toggle.length]=0};C.delKey=function(D){for(var E in C.keys){if(D.key==C.keys[E].key){C.mods.splice(E,1);C.keys.splice(E,1);C.funcs.splice(E,1);C.toggle.splice(E,1)}}};C.start=function(){NW.Event.appendListener(NW.document,"keydown",C.keydown,false)};C.stop=function(){NW.Event.removeListener(NW.document,"keydown",C.keydown,false)};return C},setSelection:function(B,A){if(NW.browser.ie){if(A){B.ondragstart=null;B.onselectstart=null;B.setAttribute("unselectable","off")}else{B.ondragstart=function(){return false};B.onselectstart=function(){return false};B.setAttribute("unselectable","on")}}else{if(B.nodeType==1){B.style.userSelect=A?"auto":"none";B.style.MozUserSelect=A?"auto":"none";B.style.KhtmlUserSelect=A?"auto":"none"}else{B.onmousedown=function(){return false}}}if(B.nodeType==1){B.style.cursor=A?"auto":"default"}},addDOMLoad:function(B,C,A){window.onload=(function(){var D=window.onload||new Function();return function(){return D()!==false&&C()!==false}})()}}}());NW.IFrame=function(){var A="0.99.6",C=function(G){if(typeof G.target.onPreload=="function"){G.target.onPreload(G);G.target.Preloaded=true}},D=function(G){if(typeof this.onPostload=="function"){this.onPostload(G);this.Postloaded=true}},F=function(G){if((this.readyState&&this.readyState=="complete")||this.contentDocument){if(!this.Postloaded){D.call(this,G)}if(typeof this.onLoad=="function"){this.onLoad(G)}}else{if(this.readyState&&!this.Preloaded){C.call(this,G)}}},E=function(H){NW.Event.removeListener(this,H.type,arguments.callee,false);var G=NW.browser.opera?this.parentWindow.frameElement:this.frameElement;G.Loaded=false;G.Preloaded=false;G.contentWindow.name="";if(typeof G.onUnload=="function"){G.onUnload()}NW.Event.appendListener(G,NW.browser.msie?"readystatechange":"load",F,false)},B=function(I){NW.Event.removeListener(parent,"beforeunload",arguments.callee,false);var G=0,H=parent.document.getElementsByTagName("iframe"),G=H.length;while(--G>=0){if(typeof H[G].onPreload!="undefined"){NW.IFrame.close(H[G])}}NW.Event.removeListener(parent.document,"DOMFrameContentLoaded",C,false)};return{close:function(G){if(G){NW.Event.removeListener(G,NW.browser.msie?"readystatechange":"load",F,false);G.parentNode.removeChild(G);G=null}return G},open:function(J){var H=null,I=J.document||(J.parent?NW.Dom.getDocument(J.parent):parent.document);if(parent.frames[J.id]){H=document.getElementById(J.id)}if(!H){if(I&&I.createElement){var G="display:block;";H=I.createElement("iframe");H.id=J.id||("nwf-"+frames.length);H.name=J.id||("nwf-"+frames.length);H.onLoad=J.onLoad||null;H.onUnload=J.onUnload||null;H.onPreload=J.onPreload||null;H.onPostload=J.onPostload||null;H.scrolling=J.scrolling||"auto";H.frameBorder=J.frameBorder||"0";H.marginWidth=J.marginWidth||"0px";H.marginHeight=J.marginHeight||"0px";H.allowTransparency=J.transparent||false;H.style.cssText=J.style||"display:block";H.style.width=J.width+((""+J.width).replace(/[0-9]/g,"")!==""?"":"px");H.style.height=J.height+((""+J.height).replace(/[0-9]/g,"")!==""?"":"px");(J.parent||I.body).appendChild(H);NW.Event.appendListener(H,NW.browser.msie?"readystatechange":"load",F,false)}else{return null}}H.src=(typeof J.src=="string"&&J.src.length>0)?J.src:"about:blank";if(!parent.document.DOMFrameEvent){parent.document.DOMFrameEvent=true;NW.Event.appendListener(parent.document,"DOMFrameContentLoaded",C,false);NW.Event.appendListener(parent,"beforeunload",B,false)}return H},getWindow:function(G){return G.contentWindow||NW.win.frames[G.name]},getDocument:function(G){return G.contentDocument||G.contentWindow.document||G.document}}}();NW.XFrame=function(){var A="",C="",B="",D="";A+='<\x21DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" \n>\n';C+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';B+="html,body{background-color:transparent;margin:0px;padding:0px;overflow:hidden;}";B+=".nw_frames_theme{background: url("+NW.path+"img/nwframes.png) 0px -72px repeat;}";D+="<html><head><title>BLANK</title>"+C+'<style type="text/css">'+B+"</style></head><body></body></html>";return{items:[],init:function(){},shut:function(){},open:function(G,I,F,H,E,K,J){if(isNaN(F)||isNaN(H)||isNaN(E)||isNaN(K)){throw new Error("NW.XFrame: dimensions/positions must be integers.");return null}return new this.create(G,I,F,H,E,K,J)},close:function(E){if(E&&E.constructor==NW.XFrame.create){key=this.has(E.title);if(key!==false){this.items.splice(key,1);delete Iport.xframes[E.title]}E.box.parentNode.removeChild(E.box);E.box.removeChild(E.status);E.box.removeChild(E.xframe);E.box.removeChild(E.header)}},has:function(G){for(var E=this.items,F=0;E.length>F;F++){if(E[F].title==G){return F}}return false},create:function(E,P,R,I,Q,O,S){var F=this,H,M=NW.document,N=null,K=0,G=false,L=false,J=NW.XFrame.items[NW.XFrame.has(P)];if(J){return J.load()}else{NW.XFrame.items.push(F)}F.id="nw_frame_"+P.replace(/[^a-z0-9A-Z]/g,"_")+"_"+NW.XFrame.items.length;F.url=E;F.title=P;F.timer=null;F.headerHeight=18;F.xframeHeight=I;F.statusHeight=18;F.left=0;F.top=0;F.width=R+2;F.height=F.headerHeight+F.xframeHeight+F.statusHeight;F.root=/CSS/.test(M.compatMode)?M.documentElement:M.body;F.size=NW.Dom.getWindowSize(M);F.posX=0;F.posY=0;F.startX=0;F.startY=0;F.deltaX=0;F.deltaY=0;F.box=M.createElement("div");F.box.id=F.id+"_box";F.box.style.cssText="position:"+(NW.browser.msie&&NW.browser.msie<7?"absolute":"fixed")+";top:-9999px;left:-9999px;visibility:hidden;";F.toBack=function(){for(var T=NW.XFrame.items,U=0;T.length>U;U++){T[U].box.style.zIndex=T[U].box==F.box?1001:1003}};F.toFront=function(){for(var T=NW.XFrame.items,U=0;T.length>U;U++){T[U].box.style.zIndex=T[U].box==F.box?1003:1001}};F.loadRect=function(){var U,T;U=NW.getCookie(F.title);if(U){T=U.split(" ");if(F.restrictSize){F.width=Math.max(R,Math.min(F.size.w-0,parseInt(T[2])));F.height=Math.max(I,Math.min(F.size.h-0,parseInt(T[3])))}else{F.width=Math.max(128,parseInt(T[2]));F.height=parseInt(T[3])}F.top=Math.max(0,Math.min(F.size.h-F.height-F.headerHeight-F.statusHeight,parseInt(T[0])));F.left=Math.max(0,Math.min(F.size.w-F.width,parseInt(T[1])))}else{F.width=R;F.height=I;F.top=(F.size.h-F.height)/2;F.left=(F.size.w-F.width)/2}};F.saveRect=function(){F.deltaX=F.deltaY=0;if(NW.browser.msie){F.left=F.box.offsetLeft-F.root.scrollLeft;F.top=F.box.offsetTop-F.root.scrollTop}else{F.left=F.box.offsetLeft;F.top=F.box.offsetTop}F.xframeWidth=F.xframe.offsetWidth-2;F.xframeHeight=F.xframe.offsetHeight;F.width=F.xframeWidth;F.height=F.xframeHeight;NW.setCookie(F.title,F.top+" "+F.left+" "+F.width+" "+F.height)};F.createTitle=function(X){var V,W=F.headerHeight,U,T=["mdihlp","mdimax","mdiend"],Y="position:absolute;height:18px;";for(V=0;T.length>V;V++){F[T[V]]=X.createElement("div");F[T[V]].className="nw_frames_theme";F[T[V]].id=F.id+"_"+T[V];F[T[V]].style.cssText=Y+"z-index:5;background-position:0px -"+((3-V)*W)+"px;cursor:pointer;width:"+W+"px;right:"+((2-V)*W)+"px;";X.body.insertBefore(F[T[V]],null)}F.mdibar=X.createElement("div");F.mdibar.className="nw_frames_theme";F.mdibar.style.cssText=Y+"z-index:1;width:100%;background:url("+NW.path+"img/nwframes.png) 0px -72px repeat;"+(NW.browser.msie?"filter:alpha(opacity=80);":"opacity:0.80;");X.body.insertBefore(F.mdibar,X.body.firstChild);F.mditxt=X.createElement("div");F.mditxt.style.cssText=Y+"z-index:2;font:normal 13px/"+(NW.browser.msie?"18":"20")+"px sans-serif;color:#fff;text-indent:4px;";F.mditxt.appendChild(X.createTextNode(F.title));X.body.insertBefore(F.mditxt,X.body.firstChild);F.handle=X.createElement("div");F.handle.style.cssText=Y+"z-index:3;width:100%;font-size:2px;cursor:move;";F.handle.appendChild(X.createTextNode("\xa0"));X.body.insertBefore(F.handle,X.body.firstChild)};F.createStatus=function(T){var U="position:absolute;height:18px;";T.body.style.cssText="overflow:hidden;height:18px;";F.mdimsg=NW.Dom.addElement(T.body,"div","nw_status_notify","","Status Messages","Ready");F.mdimsg.style.cssText=U+"z-index:1;font:normal 11px/16px sans-serif;text-indent:4px;";F.mdibkg=NW.Dom.addElement(T.body,"div","nw_status_ground","nw_frames_theme","Status Bar","");F.mdibkg.style.cssText=U+"z-index:0;background-position:0px -90px;background-repeat:repeat-x;width:100%;";F.mdires=NW.Dom.addElement(T.body,"div","nw_resize_handle","nw_frames_theme","Resize Handle","\xa0");F.mdires.style.cssText=U+"z-index:2;background-position:0px -108px;font-size:2px;right:0px;cursor:nw-resize;width:18px;"};F.init=function(){var W,V=this.id.split("_"),U=V[V.length-1],T;switch(U){case"header":F.createTitle(W=NW.IFrame.getDocument(this));NW.Event.appendListener(W,"keydown",NW.Event.stop,false);NW.Event.appendListener(W,"contextmenu",NW.Event.stop,true);NW.Event.appendListener(F.handle,"mousedown",F.dragStart,false);NW.Event.appendListener(F.handle,"mouseup",F.dragStop,false);NW.Event.appendListener(F.mdihlp,"mouseup",F.gethelp,false);NW.Event.appendListener(F.mdimax,"mouseup",F.toggle,false);NW.Event.appendListener(F.mdiend,"mouseup",F.close,false);break;case"xframe":if(typeof S=="function"){S(W)}break;case"status":F.createStatus(W=NW.IFrame.getDocument(this));NW.Event.appendListener(W,"keydown",NW.Event.stop,false);NW.Event.appendListener(W,"contextmenu",NW.Event.stop,true);NW.Event.appendListener(F.mdires,"mouseup",F.resizeStop,false);NW.Event.appendListener(F.mdires,"mousedown",F.resizeStart,false);NW.Event.setSelection(F.mdimsg,false);break;default:break}};F.shut=function(){var V,U=this.id.split("_"),T=U[U.length-1];switch(T){case"header":V=NW.IFrame.getDocument(this);NW.Event.removeListener(F.mdiend,"mouseup",F.close,false);NW.Event.removeListener(F.mdimax,"mouseup",F.toggle,false);NW.Event.removeListener(F.mdihlp,"mouseup",F.gethelp,false);NW.Event.removeListener(F.handle,"mouseup",F.dragStop,false);NW.Event.removeListener(F.handle,"mousedown",F.dragStart,false);NW.Event.removeListener(V,"contextmenu",NW.Event.stop,true);NW.Event.removeListener(V,"keydown",NW.Event.stop,false);break;case"xframe":break;case"status":V=NW.IFrame.getDocument(this);NW.Event.removeListener(F.mdires,"mousedown",F.resizeStart,false);NW.Event.removeListener(F.mdires,"mouseup",F.resizeStop,false);NW.Event.removeListener(V,"contextmenu",NW.Event.stop,true);NW.Event.removeListener(V,"keydown",NW.Event.stop,true);break;default:break}};F.setCursor=function(T){var U=parent.document.body.style.cursor;if(U!=T){parent.document.body.style.cursor=T}};F.close=function(){F.saveRect();F.shut.call(F.header);F.shut.call(F.xframe);F.shut.call(F.status);NW.XFrame.close(F);top.focus()};F.load=function(){if(E.length>0){if(NW.browser.dom>2){return window.open(E,"","width="+F.width+",height="+F.height+",scrollbars=1")}F.xframe.src=F.url}else{if(typeof S=="function"){S()}}F.toFront();F.show();return F};F.gethelp=function(T){alert("Call your custom help system here !\n\nMaybe using an XFrame instance again ?")};F.maximize=function(){F.mdimax.style.backgroundPosition="0px -36px";F.box.style.height=F.height+"px";F.xframe.style.display="block";F.status.style.display="block"};F.minimize=function(){F.mdimax.style.backgroundPosition="0px 0px";F.box.style.height=F.headerHeight+"px";F.xframe.style.display="none";F.status.style.display="none"};F.toggle=function(){if(F.xframe.style.display!="none"){F.minimize()}else{F.maximize()}};F.hide=function(){if(typeof F.onBeforeHide=="function"){F.onBeforeHide()}F.box.style.top="-9999px";F.box.style.left="-9999px";F.box.style.visibility="hidden";top.focus()};F.show=function(){if(typeof F.onBeforeShow=="function"){F.onBeforeShow()}F.moveTo();F.box.style.visibility="visible";try{F.xframe.contentWindow.focus()}catch(T){}};F.moveTo=function(){if(F.restrictPosition){F.posX=Math.max(0,Math.min(F.size.w-F.width-16,F.left+F.deltaX));F.posY=Math.max(0,Math.min(F.size.h-F.height,F.top+F.deltaY))}else{F.posX=F.left+F.deltaX;F.posY=F.top+F.deltaY}if(NW.browser.msie&&NW.browser.msie<7){F.box.style.setExpression("left",""+F.posX+"+((/CSS/).test(document.compatMode)?document.documentElement:document.body).scrollLeft");F.box.style.setExpression("top",""+F.posY+"+((/CSS/).test(document.compatMode)?document.documentElement:document.body).scrollTop")}else{F.box.style.left=F.posX+"px";F.box.style.top=F.posY+"px"}};F.resizeTo=function(){if(F.restrictSize){F.sizeX=Math.max(R,F.width+F.deltaX);F.sizeY=Math.max(I,F.height+F.deltaY)}else{F.sizeX=Math.max(128,F.width+F.deltaX);F.sizeY=F.height+F.deltaY}F.box.style.width=F.sizeX+"px";F.box.style.height=F.sizeY+F.headerHeight+F.statusHeight+"px";if(F.xframe.onResize){F.xframe.onResize.call(F.xframe,F.sizeX,F.sizeY)}if(F.restrictSize){F.xframe.style.height=Math.max(I-F.headerHeight-F.statusHeight,F.height+F.deltaY-F.headerHeight-F.statusHeight)+"px"}else{F.xframe.style.height=F.sizeY+"px"}};F.initValues=function(T){F.deltaX=F.deltaY=0;F.startX=T.screenX;F.startY=T.screenY};F.dragStart=function(T){if(NW.Dom.getButton(T)=="l"&&G===false){G=true;if(typeof F.onBeforeDrag=="function"){F.onBeforeDrag()}F.mouseCapture(F.dragEvents);F.mouseStart(F.moveTo,50);F.initValues(T);F.toFront()}};F.dragStop=function(T){if(NW.Dom.getButton(T)=="l"&&G===true){G=false;if(typeof F.onAfterDrag=="function"){F.onAfterDrag()}F.mouseRelease(F.dragEvents);F.mouseStop();F.saveRect()}};F.resizeStart=function(T){if(NW.Dom.getButton(T)=="l"&&L===false){L=true;if(typeof F.onBeforeResize=="function"){F.onBeforeResize()}F.mouseCapture(F.resizeEvents);F.mouseStart(F.resizeTo,50);F.initValues(T);F.toFront()}};F.resizeStop=function(T){if(NW.Dom.getButton(T)=="l"&&L===true){L=false;if(typeof F.onAfterResize=="function"){F.onAfterResize()}F.mouseRelease(F.resizeEvents);F.mouseStop();F.saveRect()}};F.mouseCapture=function(V){var U,T,W=NW.window.frames;NW.Event.appendListener(NW.window.document,"mousemove",V.mousemove,false);for(U=0;W.length>U;U++){for(T in V){try{NW.Event.appendListener(W[U].document,T,V[T],false)}catch(X){}}}};F.mouseRelease=function(V){var U,T,W=NW.window.frames;for(U=0;W.length>U;U++){for(T in V){try{NW.Event.removeListener(W[U].document,T,V[T],false)}catch(X){}}}NW.Event.removeListener(NW.window.document,"mousemove",V.mousemove,false)};F.mouseStart=function(U,T){if(F.timer){F.mouseStop()}F.timer=setInterval(U,T)};F.mouseStop=function(){if(F.timer){F.timer=clearInterval(F.timer)}};F.mouseMove=function(T){F.deltaX=T.screenX-F.startX;F.deltaY=T.screenY-F.startY};F.dragEvents={mousemove:F.mouseMove,mouseup:F.dragStop};F.resizeEvents={mousemove:F.mouseMove,mouseup:F.resizeStop};F.postload=function(U){if(this.src=="about:blank"){var T=this.contentWindow,V=T.document;T.Loaded=true;T.name=this.name;if(NW.browser.msie>=6&&V.execCommand){V.execCommand("BackgroundImageCache",false,true)}if(V.title!="BLANK"){V.open("text/html","replace");V.write(A+D);if(!NW.browser.msie){V.close()}}}this.Loaded=true;this.style.visibility="";if(K>0){K--}if(K===0){N.call(this,U);F.show()}};F.preload=function(T){this.Preloaded=true;if(this.src!="about:blank"){}else{}};F.Elms={header:{u:"",h:F.headerHeight},xframe:{u:E,h:F.xframeHeight},status:{u:"",h:F.statusHeight},onComplete:function(U){var T=this.parentNode.getElementsByTagName("iframe");for(var V=0;V<T.length;V++){T[V].style.visibility="";T[V].style.border="1px solid #333";T[V].style.borderWidth="0px 1px 0px 1px"}}};for(H in F.Elms){if(typeof F.Elms[H]=="function"){N=F.Elms[H]}else{K++}}for(H in F.Elms){if(typeof F.Elms[H]=="object"){F[H]=NW.IFrame.open({id:F.id+"_"+H,document:M,parent:F.box,src:F.Elms[H].u,width:"100%",height:F.Elms[H].h,onLoad:F.init,onUnload:F.shut,onPreload:F.preload,onPostload:F.postload})}}F.loadRect();M.body.insertBefore(F.box,M.body.firstChild);F.resizeTo();F.toFront();F.moveTo();return F}}}();NW.HttpIO=function(){var debug=false;if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var isXML=function(d){return d&&d.documentElement&&d.documentElement.nodeName!="parsererror"?true:false};var emit=function(m){if(m.length>0&&(debug||(/nw_debug/).test(location.search))){alert("NWAPI: HttpIO Library\n\n"+m)}};return{explain:function(){debug=!!(1-debug)},XS:function(method,sURL,parms,func,xml){if(NW.Notifier){setTimeout(function(){NW.Notifier.notify('<div id="nw_notify" onclick="NW.HttpIO.explain();">&nbsp;LOADING&nbsp;<img width="32" height="32" style="vertical-align: middle;" src="/img/loadingj.gif" /></div>')},10)}parms=parms||null;func=func||null;xml=xml||false;if(parms&&method=="GET"){sURL+="?"+parms}var req=new XMLHttpRequest();if(!req&&method){req=new Image();if(typeof func=="function"){req.onload=req.onerror=function(e){func(e||window.event)}}req.src=sURL;return null}else{req.open(method,sURL,func?true:false);if(xml&&req.overrideMimeType){req.overrideMimeType("text/xml")}if(parms&&method=="POST"){req.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}else{parms=null}if(typeof func=="function"){req.onreadystatechange=function(){if(req.readyState==4){func(req)}}}try{req.send(parms)}catch(e){switch(req.status){case 1223:emit("204 No Content");return null;case 12002:emit("Server Timeout");break;case 12152:emit("Connection closed by server");break;case 12029:case 12030:case 12031:emit("Dropped connection");break;default:emit("Network Error");break}return false}if(typeof func=="function"){return req}else{if(method=="HEAD"){return req}else{var x=req.responseXML;var t=req.responseText;emit("\nURL = "+sURL+"\nparms = "+parms+"\nstatus = "+req.status+" "+req.statusText+"\nresponse = "+(isXML(x)?x:t)+"\nresponseLength = "+(isXML(x)?x.documentElement.textContent:t).length+"\n\nResponse Headers\n"+req.getAllResponseHeaders());return NW.HttpIO.responseSet(req)}}}},responseSet:function(x){var r=null;switch(x.status){case 200:if(x.responseXML&&x.responseXML.documentElement){r=x.responseXML}else{if(x.responseText&&x.responseText.length){if(/^\s*{[\w\W\s\S]+}\s*$/.test(x.responseText)){r=eval("("+x.responseText+")")}else{r=x.responseText}}else{r=null}}break;case 202:break;case 204:break;case 304:break;case 404:r=false;break;default:r=false;break}return r},sendData:function(u,d){var i=new Image();i.onload=function(){return true};i.onerror=function(){return false};i.src=u+"?data="+escape(d)},xs:function(el,parms){var parm=parms.indexOf("&")===0?parms:"&"+parms;var path=typeof el=="string"?el:el.href.substring(el.href.lastIndexOf("/"));return this.XS("POST","/include/iportlib.php","q=1&page="+path+parm)}}}();NW.syncXML=NW.HttpIO.XS;NW.Notifier=function(A){A=A||window;var B=null;return{init:function(){if(B===null){B=A.alert;window.alert=function(C){this.notify(C)}}else{alert("[WARNING]: Notifier Object already enabled !!!")}},shut:function(){if(B!==null){A.alert=B;B=null}else{alert("[WARNING]: Notifier Object already disabled !!!")}},explain:function(){alert("X")},notify:function(E,N){var M=window,I=document;if(!(I.body&&I.body.firstChild)){return }var J=NW.Dom.getRoot(I);var G=M.innerWidth?M.innerWidth+M.pageXOffset:J.clientWidth+J.scrollLeft;var C=M.innerHeight?M.innerHeight+M.pageYOffset:J.clientHeight+J.scrollTop;var L=I.createElement("div");L.id="Message";L.className=N||"";L.style.top="-9999px";L.style.left="-9999px";L.style.position=(NW.browser.msie&&NW.browser.msie<7?"absolute":"fixed");L=I.body.insertBefore(L,I.body.firstChild);L.innerHTML=E;if(L.className.length===0){L.style.display="block";L.style.margin="0px 0px";L.style.padding="0px 0px";L.style.border="1px solid #f00";L.style.backgroundColor="#fc0"}var D=NW.Dom.getDocumentSize(I);var H=NW.Dom.getWindowSize(I);var K=L.offsetWidth;var F=L.offsetHeight;if(I.contentType){if(H.w>D.w){G-=H.w-D.w}if(H.h>D.h){C-=H.h-D.h}}L.style.visibility="hidden";L.style.top=C-F+"px";L.style.left=G-K+"px";L.style.visibility="visible";J=function(){I.body.removeChild(L)};if(NW.Style){NW.Style.setFading(L,99,0,1000,J)}else{setTimeout(J,2000)}}}}();NW.Script=function(){var B=true,A=function(C){this.count=0;this.onComplete=C;this.step=function(){if(this.count>0){this.count--}if(this.count===0){setTimeout(this.onComplete,1)}};return this};return{addScript:function(G){var F=NW.Dom.getDocument(G.parent||NW.document),E=F.getElementsByTagName("head")[0],D,C=F.parentWindow||F.window||NW.window;if(G.id){D=F.getElementById(G.id);if(D){if(typeof G.callback=="function"){G.callback.call(G.scope||C,D)}return D}else{D=F.createElement("script")}}if(G.id){D.id=G.id}if(G.defer){D.defer=G.defer}D.type=G.type||"text/javascript";if(G.src){if(B===true){NW.Event.appendListener(NW.browser.opera?F:D,NW.browser.msie?"readystatechange":"load",function(H){if(!NW.browser.msie||(this.readyState&&(/loaded|complete/).test(this.readyState))){NW.Event.removeListener(this,H.type,arguments.callee,false);if(typeof G.callback=="function"){G.callback.call(G.scope||C,D)}if(typeof G.fn=="object"&&typeof G.fn.step=="function"){G.fn.step()}}},false);D.src=G.src}else{NW.syncXML("GET",NW.makePath(G.src),"",function(H){if(H.status=="200"){D.text=H.responseText;if(typeof G.callback=="function"){G.callback(H)}if(typeof G.fn=="object"&&typeof G.fn.step=="function"){G.fn.step()}}})}}else{if(G.text){D.text=G.text}}if(G.parent&&G.parent.nodeType==1){D=G.parent.appendChild(D)}else{D=E.appendChild(D)}return D},addScripts:function(){var D,C=arguments,E=null,F=0;for(D=0;D<C.length;D++){if(typeof C[D]=="function"){E=A(C[D])}else{if(NW.document.getElementById(C[D].id)===null){F++}}}if(E!==null){E.count=F}for(D=0;D<C.length;D++){if(typeof C[D]=="object"){if(C[D].id&&C[D].src){if(E!==null){C[D].fn=E}if(NW.document.getElementById(C[D].id)===null){NW.Script.addScript(C[D])}}}}if(E!==null&&E.count===0&&typeof E.step=="function"){E.step()}}}}();NW.Style=function(){var B=function(C,E,D){return C>E?C-D>E?C-D:E:C<E?C+D<E?C+D:E:C},A=/[\x00-\x1f\x7f-\xff]+/g;return{addStyleSheet:function(G,D,C,E){if(G.createStyleSheet){var F=null;if(C){F=G.createStyleSheet(C)}else{F=G.createStyleSheet()}if(E&&F){F.cssText+=E}return F}else{return this.addStyle(G,D,C,E)}},addStyle:function(I,F,D,J,E,C){var H,G=I.getElementsByTagName("head").item(0);if(G.tagName=="head"&&I.createElementNS){H=I.createElementNS("http://www.w3.org/1999/xhtml","style")}else{H=I.createElement("style")}H.id=F;H.type=E||"text/css";H.media=C||"screen";if(D){H.appendChild(I.createTextNode('@import url("'+D+'");'))}if(J){H.appendChild(I.createTextNode(J))}G.appendChild(H);return H},addLink:function(H,G,D,E){var C,F=H.getElementsByTagName("head").item(0);if(F.tagName=="head"&&H.createElementNS){C=H.createElementNS("http://www.w3.org/1999/xhtml","link")}else{C=H.createElement("link")}if(G){C.rel=G}if(D){C.href=D}if(E){C.type=E}F.appendChild(C);return C},getStyleSheets:function(G,D){var C,E,F=arguments.callee;if(!D){E=F.sheets=[];for(C=0;G.styleSheets.length>C;C++){E.push(this.getStyleSheets(G,G.styleSheets[C]))}return E}else{E=F.sheets;if(D.imports){for(C=0;D.imports.length>C;C++){E.push(this.getStyleSheets(G,D.imports[C]))}}else{if(D.cssRules){for(C=0;D.cssRules.length>C;C++){if(D.cssRules[C].styleSheet){E.push(this.getStyleSheets(G,D.cssRules[C].styleSheet))}}}}return D}},getRuleBySelector:function(J,D,H){var F,E,L,M,K,I,C=false;var G=this.getStyleSheets(J);for(F=0;G.length>F;F++){M=NW.Style.getRules(G[F]);for(E=0;M.length>E;E++){if(M[E].selectorText!==null){if(new RegExp("\\b"+D+"\\b","i").test(M[E].selectorText||"")){if(M[E].style.cssText.indexOf("important")>0){C=true}else{if(C){continue}}K=G[F];L=M[E];I=E;if(H){break}}}}if(H&&K&L&I){break}}return{sheet:K,rule:L,index:I}},toHypenCase:function(C){return C.replace(/([A-Z])/g,function(D,E){return"-"+E.toLowerCase()})},toCamelCase:function(C){return C.replace(/-([a-z])/g,function(D,E){return E.toUpperCase()})},getCSP:function(D,C){return D.style.setProperty?(D.ownerDocument||D.document).defaultView.getComputedStyle(D,"").getPropertyValue(this.toHypenCase(C)):D.style[this.toCamelCase(C)]},setCSP:function(E,D,C,F){return E.style.setProperty?E.style.setProperty(this.toHypenCase(D),C,F||""):E.style[this.toCamelCase(D)]=C},setFading:function(I,D,H,C,G){var F=100/10,E=setInterval(function(){D=B(D,H,F);NW.Style.setOpacity(I,D/100);if(D==H){if(E){clearInterval(E);E=null}if(typeof G=="function"){G()}}},C/F)},setOpacity:function(C,D){if(window.ActiveXObject){this.setOpacity=function(E,F){E.style.filter="alpha(opacity="+F*100+")"}}else{if((/WebKit|KHTML/i).test(navigator.userAgent)){this.setOpacity=function(E,F){E.style.KhtmlOpacity=F}}else{if(!C.style.opacity&&C.style.MozOpacity){this.setOpacity=function(E,F){E.style.MozOpacity=F}}else{this.setOpacity=function(E,F){E.style.opacity=F}}}}this.setOpacity(C,D)},getSelector:function(I){var F,C,H=null,G=null,E=null,D=top.document.styleSheets;for(F=0;F<D.length;F++){H=NW.Style.getRules(D[F]);for(C=0;C<H.length;C++){if(typeof H[C].selectorText!="undefined"&&H[C].selectorText=="."+I.className){G=G[F];E=H[C];break}}if(G&&E){break}}return{sheet:G,rule:E}},appendRule:function(E,G,C){var D,F;if(E&&(G=G.replace(A,""))&&(/.|#/.test(G)&&G.length!=1)&&(F=NW.Style.getSheet(E))){C=C.replace(A,"");if(E.imports){F.addRule(G,C,0)}else{F.insertRule(G+"{"+C+"}",0)}}},removeRule:function(D,G){var C,E,F;if(D&&(G=G.replace(A,""))&&(/.|#/.test(G)&&G.length!=1)&&(F=NW.Style.getSheet(D))&&(E=NW.Style.getRules(D))){for(C=0;C<E.length;C++){if(E[C].selectorText==G){if(F.imports){F.removeRule(C)}else{F.deleteRule(C)}}}}},replaceRule:function(E,H,C){var D,F,G;if(E&&(H=H.replace(A,""))&&(/.|#/.test(H)&&H.length!=1)&&(G=NW.Style.getSheet(E))&&(F=NW.Style.getRules(E))){for(D=0;D<F.length;D++){if(F[D].selectorText==H){if(G.imports){G.removeRule(D)}else{G.deleteRule(D)}}}C=C.replace(A,"");if(E.imports){G.addRule(H,C,0)}else{G.insertRule(H+"{"+C+"}",0)}}},getRules:function(C){return C.imports?C.imports.length>0?C.imports[0].rules:C.rules:C.cssRules.length>0&&C.cssRules[0].type==3?C.cssRules[0].styleSheet.cssRules:C.cssRules},getSheet:function(C){return C.imports?C.imports.length>0?C.imports[0]:C:C.cssRules.length>0&&C.cssRules[0].type==3?C.cssRules[0].styleSheet:C}}}();NW.Tooltip=function(D){var F=this;F.tooltip=null;F.enabled=false;F.el=(D&&D.element)||NW.document;F.timer=new Date().getTime();var E=F.el.ownerDocument||F.el.document||F.el,A=E.defaultView||E.contentWindow||E.parentWindow,C=E.compatMode&&(/CSS/).test(E.compatMode)?E.documentElement:E.body;F.init=function(G){F.text=F.text||G.text||"";F.style=F.style||G.style||"";F.follow=G.follow||true;F.tooltip=F.tooltip||E.createElement("div");F.tooltip.className=F.style;F.tooltip.style.cssText="z-index:10000;position:absolute;visibility:hidden;";F.enable()};F.shut=function(){F.disable();F.tooltip=null};F.enable=function(){if(!F.enabled){F.enabled=true;E.body.insertBefore(F.tooltip,E.body.firstChild);NW.Event.appendListener(F.el,"mousemove",F.handler,false);NW.Event.appendListener(F.el,"mouseover",F.handler,false);NW.Event.appendListener(F.el,"mouseout",F.handler,false)}};F.disable=function(){if(F.enabled){F.enabled=false;NW.Event.removeListener(F.el,"mouseout",F.handler,false);NW.Event.removeListener(F.el,"mouseover",F.handler,false);NW.Event.removeListener(F.el,"mousemove",F.handler,false);E.body.removeChild(F.tooltip)}};F.update=function(K){var M=C.clientWidth,I=C.scrollHeight,H=F.tooltip.offsetWidth,J=F.tooltip.offsetHeight,L=K.clientY+(A.scrollY||C.scrollTop||0)+8,G=K.clientX+(A.scrollX||C.scrollLeft||0)+8;if(G+H+8>M){G=M-H}if(L+J+8>I){L=I-J}F.tooltip.style.left=G+"px";F.tooltip.style.top=L+"px"};var B=0;F.handler=function(H){var G=H.target||H.srcElement;switch(H.type){case"mousemove":if(new Date().getTime()-F.timer>100){F.timer=new Date().getTime()}else{return }if(!F.follow){if(NW.browser.msie&&NW.browser.msie<=6){F.tooltip.removeAttribute("title")}break}F.show(H);break;case"mouseover":F.swap(G,F);F.show(H);break;case"mouseout":F.swap(F,G);F.hide(H);break;default:break}};F.show=function(G){var H=F.text||F.title||"";if(typeof H=="string"&&H.length>0){F.tooltip.innerHTML=H;F.tooltip.style.visibility="visible";F.update(G)}};F.hide=function(G){if(F.enabled){F.tooltip.style.visibility="hidden"}};F.swap=function(H,G){if(H.title){G.title=H.title;H.title=""}};return F};NW.XForms=function(C){var B="1.0",A={CAPS_LOCK:{it:"Disattiva il tasto CAPS LOCK nei campi password !!!",en:"Deactivate the CAPS LOCK key in password fields !!!"},EMPTY_FIELD:{it:'Il campo "{}" è obbligatorio e non può essere lasciato vuoto.',en:'The "{}" field is required and cannot be left empty.'},BLANK_FIELD:{it:'Il campo "{}" contiene solo spazi o caratteri non stampabili.',en:'The "{}" field only contains spaces or blank characters.'},INVALID_CHARS:{it:'Il campo "{}" contiene caratteri non validi.',en:'The "{}" field contains invalid characters.'}};return{doc:C||document,count:0,init:function(){if(this.count===0){this.attach(this.doc)}},shut:function(){if(this.count===1){this.detach(this.doc)}},attach:function(J){var I,G,F,E,D,H;if(J&&J.nodeType&&J.nodeType==9){D=J.forms;for(G=0;D.length>G;G++){if(D[G].required){this.fixLabels(D[G]);this.fixBorders(D[G]);this.fixBooleans(D[G]);this.fixTextareas(D[G]);if(D[G].required.value!=""){NW.Event.appendListener(D[G],"submit",this.handleForm,false);for(F=0,I=D[G].elements;I.length>F;F++){if(typeof I[F].type!="undefined"){if(I[F].type.indexOf("select")===0){for(H=I[F].options,E=0;H.length>E;E++){if(H[E].selected||H[E].defaultSelected){I[F].selectedIndex=E;H[E].selected=true;H[E].defaultSelected=true}}I[F].defaultLength=E}else{if(I[F].type=="hidden"){if(typeof I[F].defaultString=="undefined"){I[F].defaultString=I[F].value}}else{if(I[F].type=="password"){NW.Event.appendListener(I[F],"focus",this.fieldFocus,false);NW.Event.appendListener(I[F],"keypress",this.capsDetect,false)}else{if(I[F].type=="text"){NW.Event.appendListener(I[F],"focus",this.fieldFocus,false)}}}}}}}}}this.count++}},detach:function(I){if(I&&I.nodeType&&I.nodeType==9){var F,E,H,G,D=I.forms;for(F=0;D.length>F;F++){NW.Event.removeListener(D[F],"submit",this.handleForm,false);for(E=0,H=D[F].elements;H.length>E;E++){if(typeof H[E].type!="undefined"){if(H[E].type.indexOf("select")===0){for(G=H[E].options,k=0;G.length>k;k++){if(G[k].defaultSelected){H[E].selectedIndex=k}}H[E].defaultLength=undefined}else{if(H[E].type=="hidden"){if(typeof H[E].defaultString=="undefined"){H[E].defaultString=H[E].value}}else{if(H[E].type=="password"){NW.Event.removeListener(H[E],"keypress",capsDetect,false);NW.Event.removeListener(H[E],"focus",this.fieldFocus,false)}else{if(H[E].type=="text"){NW.Event.removeListener(H[E],"focus",this.fieldFocus,false)}}}}}}}this.count--}},notify:function(D,E){var F=(navigator.language?navigator.language:navigator.userLanguage).substr(0,2);alert(A[D][F].replace(/{}/,E))},fieldFocus:function(D){if(this.value.match(/\[|\]/)){this.value="";this.select()}},hasChanged:function(D){if(typeof D!="object"){return false}return D.nodeName!="FORM"?this.hasElementChanged(D):this.hasFormChanged(D)},hasFormChanged:function(D){if(D.nodeName!="FORM"){return false}for(var E=0;D.length>E;E++){if(this.hasElementChanged(D[E])){return true}}return false},hasElementChanged:function(E){var G=false;switch(E.type){case"text":case"file":case"password":case"textarea":if(typeof E.defaultValue!="undefined"){G=E.defaultValue!=E.value}break;case"hidden":if(typeof E.defaultString!="undefined"){G=E.defaultString!=E.value}break;case"radio":case"checkbox":if(typeof E.defaultChecked!="undefined"){G=E.defaultChecked!=E.checked}break;case"select-one":case"select-multiple":var D,F=E.options;if(E.defaultLength!=F.length){G=true}else{for(D=0;F.length>D;D++){if(F[D].defaultSelected!=F[D].selected){G=true}}}break;case"image":case"button":break;default:break}return G},handleForm:function(H){var F=H.target||H.srcElement;if(F.nodeName=="FORM"&&!NW.XForms.hasFormChanged(F)){top.status="[WARNING]: Default fields values were not changed. No form submission necessary !";H.preventDefault()}else{var G=false;if(F.nodeName=="FORM"&&typeof F.required=="object"&&F.required.value.length>0){var D=F.required.value.split(",");for(var E=0;E<D.length;E++){if(NW.XForms.IsEmpty(F[D[E]])){NW.XForms.notify("EMPTY_FIELD",D[E]);F[D[E]].focus();F[D[E]].select();H.preventDefault();break}if(NW.XForms.IsBlank(F[D[E]])){NW.XForms.notify("BLANK_FIELD",D[E]);F[D[E]].focus();F[D[E]].select();H.preventDefault();break}if(F[D[E]].value!=F[D[E]].value.match(/[!#$%&()*+,\-.\/:;<=>?@\w]+/)){NW.XForms.notify("INVALID_CHARS",D[E]);F[D[E]].focus();F[D[E]].select();H.preventDefault();break}}}}return true},fixLabels:function(G){var F,E,H,D=0;E=G.getElementsByTagName("label");for(F=0,H=E.length;F<H;F++){D=E[F].offsetWidth>D?E[F].offsetWidth:D}for(F=0,H=E.length;F<H;F++){E[F].parentNode.style.overflow="auto";E[F].style.width=D+"px";E[F].style.cssFloat="left"}},fixBorders:function(G){var E,D,F,H=G.getElementsByTagName("input");for(E=0,D=H.length;E<D;E++){F=H[E].getAttribute("type");if(F=="checkbox"||F=="radio"){H[E].style.border="none"}}},fixBooleans:function(H){var G,E,D,J,F,I=H.getElementsByTagName("input");for(E=0;E<I.length;E++){F=I[E].getAttribute("type");if(F=="checkbox"||F=="radio"){G=d.createElement("img");G.id=F+"Image"+E;G.src="img/"+F+(I[E].checked?"1":"0")+".gif";G.style.cssText="vertical-align: middle;";G.onclick=function(K){return NW.XForms.handleBooleans.call(this.nextSibling,K)};J=NW.Dom.getPrev(I[E]);if(I[E].parentNode.nodeName.toLowerCase()=="label"){D=I[E].parentNode}else{if(J&&J.nodeName.toLowerCase()=="label"){D=J}}if(D){D.onclick=function(K){var L=this.getElementsByTagName("input")[0]||NW.Dom.getNext(this);if(!L||L.nodeName.toLowerCase()!="input"){if(this["for"]){L=this.form.getElementById(this["for"])}}if(L){NW.XForms.handleBooleans.call(L,K)}};G.style.height=D.offsetHeight+"px"}I[E].parentNode.insertBefore(G,I[E]);I[E].style.display="none"}}},handleBooleans:function(F){var D,G=this,E=this.form;if(E&&G.type=="radio"){var H=E.getElementsByTagName("input");for(D=0;D<H.length;D++){if(H[D].name==G.name){H[D].checked="";H[D].value="0";H[D].previousSibling.src="img/"+H[D].type+"0.gif"}}G.previousSibling.src="img/"+G.type+"1.gif";G.checked=true}else{if(E){var H=F.target||F.srcElement;if(typeof H.htmlFor!="undefined"&&H.htmlFor.length>0){this.previousSibling.src="img/"+G.type+(G.checked?"0":"1")+".gif"}else{if(H.nodeName.toLowerCase()=="img"||H.nodeName.toLowerCase()=="input"){this.previousSibling.src="img/"+G.type+(G.checked?"0":"1")+".gif";G.checked=G.checked?false:true;if(F.stopPropagation){F.preventDefault();F.stopPropagation()}else{F.returnValue=false;F.cancelBubble=true}}else{this.previousSibling.src="img/"+G.type+(G.checked?"0":"1")+".gif";G.checked=G.checked?false:true}}}}},fixTextareas:function(H){var F,D,E,G=H.getElementsByTagName("textarea");for(D=0;D<G.length;D++){}},addOption:function(F,E,D){var G=NW.Dom.getDocument(F).createElement("option");G.text=E;G.value=D;F.options.add(G)},removeOption:function(E){for(var D=E.options.length-1;D>=0;D--){if(E.options[D].selected){E.remove(D)}}},IsBlank:function(D){if(D===null){return true}if(typeof D=="object"&&typeof D.value=="string"){return D.value.replace(/[\s]/g,"")==""}else{if(typeof D=="string"){return D.replace(/[\s]/g,"")==""}}return false},IsEmpty:function(D){if(D===null){return true}if(typeof D=="object"&&typeof D.value=="string"){if(D.value.length===0){return true}}else{if(typeof D=="string"){if(D.length===0){return true}}}return false},IsValid:function(D){return !this.IsBlank(D)&&!this.IsEmpty(D)},capsDetect:function(E){var D=E.shiftKey||(E.modifiers&&(E.modifiers&SHIFT_MASK));var F=E.which?E.which:(E.keyCode?E.keyCode:(E.charCode?E.charCode:0));if((F>64&&F<91&&!D)||(F>96&&F<123&&D)){NW.XForms.notify("CAPS_LOCK")}},getSelectionStart:function(E){if(E.createTextRange){var D=E.ownerDocument.selection.createRange().duplicate();D.moveEnd("character",E.value.length);if(D.text===""){return E.value.length}return E.value.lastIndexOf(D.text)}else{return E.selectionStart}},getSelectionEnd:function(E){if(E.createTextRange){var D=E.ownerDocument.selection.createRange().duplicate();D.moveStart("character",-E.value.length);return D.text.length}else{return E.selectionEnd}},setSelectionRange:function(G,D,F){if(G.setSelectionRange){G.focus();G.setSelectionRange(D,F)}else{if(G.createTextRange){var E=G.createTextRange();E.collapse(true);E.moveEnd("character",F);E.moveStart("character",D);E.select()}}},prevTabIndex:function(H){if(H.form){if(H.tabIndex==this.firstTabIndex(H).tabIndex){return this.lastTabIndex(H)}var F=0,D=0,E=0,G=H.form.elements;for(;G.length>F;F++){if(G[F].tabIndex<H.tabIndex){E=D;D=F;if(G[E].tabIndex>G[D].tabIndex){D=E}}}return G[D]}else{return H}},nextTabIndex:function(H){if(H.form){if(H==this.lastTabIndex(H)){return this.firstTabIndex(H)}var F=0,G=H.form.elements,D=this.lastTabIndex(H).tabIndex,E=G.length-1;for(F=G.length-1;F>0;F--){if(G[F].tabIndex<D&&G[F].tabIndex>H.tabIndex){E=F;D=G[F].tabIndex}}return G[E]}else{return H}},firstTabIndex:function(H){if(H.form){var F=0,E=0,G=H.form.elements,D=this.lastTabIndex(H).tabIndex;for(;G.length>F;F++){if(G[F].tabIndex<D){E=F;D=G[F].tabIndex}}return G[E]}else{return H}},lastTabIndex:function(G){if(G.form){var E=j=0,F=G.form.elements,D=0;for(;F.length>E;E++){if(F[E].tabIndex>D){j=E;D=F[E].tabIndex}}return F[j]}else{return G}}}}();window.Iport||(window.Iport={});Iport=new function(){return{type:"user",AppName:"Iport Designer",AppRelease:"20080803",AppVersion:"2.0",window:window,document:window.document,xframes:[],pageID:null,userID:null,pageName:null,level:null,pages:null,pagedivs:null,pageinfo:null,fk:{"1":{mod:"s",key:112,onkey:function(A){Iport.xframes["IPORT Online Help"]=Iport.xframe.open("/admin/admhelp.php","IPORT Online Help",320,240,0,null,null)}},"9":{mod:"a",key:120,onkey:function(A){location.href="/login.html";Iport.window.focus()}},"10":{mod:"a",key:121,onkey:function(A){location.href="/help.html";Iport.window.focus()}},"11":{mod:"a",key:122,onkey:function(A){if(!A){Iport.tooltip.disable();top.status="Tooltips disabled !"}else{Iport.tooltip.enable();Iport.window.status="Tooltips enabled !"}return false}},"12":{mod:"a",key:123,onkey:function(A){Iport.xframes["Site Statistics"]=new Iport.xframe.open("/admin/sitestat.php","Site Statistics",640,480,0,null,null)}}},init:function(){var A,B;this.widgets={Tooltip:{style:"nw_tooltip"},XFrame:this.document,XForms:this.document};for(A in this.widgets){B=A.toLowerCase();if(typeof NW[A]=="function"){this[B]=this[B]||new NW[A](this.document)}else{if(typeof NW[A]=="object"){this[B]=this[B]||NW[A]}}this[B].init&&this[B].init(this.widgets[A])}this.fKeys=new NW.Event.key(this.fk);for(var A in this.fk){this.fKeys.addKey(this.fk[A])}this.fKeys.start()},shut:function(){var C,A;for(var B in this.widgets){C=B.toLowerCase();if(typeof NW[B]!="undefined"){this[C].shut();this[C]=null}}if(this.fKeys){this.fKeys.stop();for(var B in this.fk){this.fKeys.delKey(this.fk[B])}this.fKeys=null}}}}();NW.Event.addDOMLoad(window,start,2);function start(A){Iport.init.call(Iport,A)};