(function(){if(window.jQuery){var _jQuery=window.jQuery;}var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$){var _$=window.$;}window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else{if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector);}else{this[0]=elem;this.length=1;return this;}}else{selector=[];}}}else{return new jQuery(context).find(selector);}}else{if(jQuery.isFunction(selector)){return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);}}}return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.3",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem){ret=i;}});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value==undefined){return this.length&&jQuery[type||"attr"](this[0],name)||undefined;}else{options={};options[name]=value;}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));}});},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined;}return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);}});});return ret;},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild;}return elem;}).append(this);}return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild);}});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else{return this.cloneNode(true);}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null;}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return;}var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);}}});}return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true));}else{selector=jQuery.multiFilter(selector,this);}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return !selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value;}values.push(value);}}return values;}else{return(this[0].value||"").replace(/\r/g,"");}}return undefined;}return this.each(function(){if(this.nodeType!=1){return;}if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);}else{if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length){this.selectedIndex=-1;}}else{this.value=value;}}});},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length){data=jQuery.data(this[0],key);}return data==null&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse();}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove());}callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}if(elem.parentNode){elem.parentNode.removeChild(elem);}}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function"){target={};}if(length==1){target=this;i=0;}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){if(target===options[name]){continue;}if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType){target[name]=jQuery.extend(target[name],options[name]);}else{if(options[name]!=undefined){target[name]=options[name];}}}}}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;}return jQuery;},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data;}else{script.appendChild(document.createTextNode(data));}head.appendChild(script);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid;}if(name&&!jQuery.cache[id]){jQuery.cache[id]={};}if(data!=undefined){jQuery.cache[id][name]=data;}return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break;}if(!name){jQuery.removeData(elem);}}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando);}}delete jQuery.cache[id];}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(var i=0,length=object.length;i<length;i++){if(callback.apply(object[i],args)===false){break;}}}}else{if(object.length==undefined){for(var name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i);}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className;}});},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className);}).join(" "):"";}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options){elem.style[name]=old[name];}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible")){getWH();}else{jQuery.swap(elem,props,getWH);}return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari){return false;}var ret=document.defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save;}if(name.match(/float/i)){name=styleFloat;}if(!force&&elem.style&&elem.style[name]){ret=elem.style[name];}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i)){name="float";}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem)){ret=getComputedStyle.getPropertyValue(name);}else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode){stack.unshift(a);}for(var i=0;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i];}}}if(name=="opacity"&&ret==""){ret="1";}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}jQuery.each(elems,function(i,elem){if(!elem){return;}if(elem.constructor==Number){elem=elem.toString();}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild;}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return;}if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex;}if(fix[name]){if(value!=undefined){elem[fix[name]]=value;}return elem[fix[name]];}else{if(jQuery.browser.msie&&name=="style"){return jQuery.attr(elem.style,"cssText",value);}else{if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method")){return elem.getAttributeNode(name).nodeValue;}else{if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed";}elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem)){return elem.getAttribute(name,2);}return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined){elem[name]=value;}return elem[name];}}}}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array"){for(var i=0,length=array.length;i<length;i++){ret.push(array[i]);}}else{ret=array.slice(0);}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]==elem){return i;}}return -1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++){if(second[i].nodeType!=8){first.push(second[i]);}}}else{for(var i=0;second[i];i++){first.push(second[i]);}}return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv&&callback(elems[i],i)||inv&&!callback(elems[i],i)){ret.push(elems[i]);}}return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!==null&&value!=undefined){if(value.constructor!=Array){value=[value];}ret=ret.concat(value);}}return ret;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret);}return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this);}});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name);}},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return !a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return !a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string"){return[t];}if(context&&context.nodeType!=1&&context.nodeType!=9){return[];}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c);}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue;}foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break;}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true;}r.push(n);}if(m=="+"){break;}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift();}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0];}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param";}r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]=="."){r=jQuery.classFilter(r,m[2]);}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t){ret=[];}if(ret&&context==ret[0]){ret.shift();}done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i]);}}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m){break;}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not);}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||"";}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a);}}r=tmp;}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++;}}merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last){add=true;}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true;}}if(add^not){tmp.push(node);}}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]];}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}");}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}}}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur);}cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break;}}return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem)){r.push(n);}}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return;}if(jQuery.browser.msie&&elem.setInterval!=undefined){elem=window;}if(!handler.guid){handler.guid=this.guid++;}if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered){return val;}val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false);}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle);}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return;}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""));}}else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid];}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler];}}}for(ret in events[type]){break;}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false);}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}}}ret=null;delete events[type];}}});}for(ret in events){break;}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null;}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data);}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined;}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift(this.fix({type:type,target:elem}));}data[0].type=type;if(exclusive){data[0].exclusive=true;}if(jQuery.isFunction(jQuery.data(elem,"handle"))){val=jQuery.data(elem,"handle").apply(elem,data);}if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false;}if(event){data.shift();}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret;}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false){val=ret;}if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie){event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;}return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault();}originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation();}originalEvent.cancelBubble=true;};if(!event.target){event.target=event.srcElement||document;}if(event.target.nodeType==3){event.target=originalEvent.target.parentNode;}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}return event;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie){return false;}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie){return false;}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this)){return true;}arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false;}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie){return false;}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this)){return true;}arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0]){return jQuery.event.trigger(type,data,this[0],false,fn);}return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut);},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else{jQuery.readyList.push(function(){return fn.call(this,jQuery);});}return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound){return;}readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false);}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return;}try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return;}for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}}jQuery.ready();},false);}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return;}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length;}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode;}catch(error){parent=elem;}}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url)){return this.bind("load",url);}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);}self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data);}if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}}s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head){head.removeChild(script);}};}if(s.dataType=="script"&&s.cache==null){s.cache=false;}if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data){xml.setRequestHeader("Content-Type",s.contentType);}if(s.ifModified){xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend){s.beforeSend(xml);}if(s.global){jQuery.event.trigger("ajaxSend",[xml,s]);}var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes;}if(!jsonp){success();}}else{jQuery.handleError(s,xml,status);}complete();if(s.async){xml=null;}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xml){xml.abort();if(!requestDone){onreadystatechange("timeout");}}},s.timeout);}}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async){onreadystatechange();}function success(){if(s.success){s.success(data,status);}if(s.global){jQuery.event.trigger("ajaxSuccess",[xml,s]);}}function complete(){if(s.complete){s.complete(xml,status);}if(s.global){jQuery.event.trigger("ajaxComplete",[xml,s]);}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}return xml;},handleError:function(s,xml,status,e){if(s.error){s.error(xml,status,e);}if(s.global){jQuery.event.trigger("ajaxError",[xml,s,e]);}},active:0,httpSuccess:function(r){try{return !r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror";}if(type=="script"){jQuery.globalEval(data);}if(type=="json"){data=eval("("+data+")");}return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));}}}return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block";}elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false;}var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null){this.style.overflow="hidden";}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop);}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start;}e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type);}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn);}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.apply(this);}}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true);}timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}return this;}});var queue=function(elem,type,array){if(!elem){return undefined;}type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].apply(this);}});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}if(jQuery.isFunction(opt.old)){opt.old.apply(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.apply(this.elem,[this.now,this]);}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop];}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px";}jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){this.elem.style.display="none";}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p]);}}}if(done&&jQuery.isFunction(this.options.complete)){this.options.complete.apply(this.elem);}return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent);}if(!fixed&&jQuery.css(offsetParent,"position")=="fixed"){fixed=true;}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop);}if(mozilla&&jQuery.css(parent,"overflow")!="visible"){border(parent);}parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop);}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}}results={top:top,left:left};}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})();(function(k){var h=k.fn.height,l=k.fn.width;k.fn.extend({height:function(){if(this[0]==window){return self.innerHeight||k.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;}if(this[0]==document){return Math.max(document.body.scrollHeight,document.body.offsetHeight);}return h.apply(this,arguments);},width:function(){if(this[0]==window){return self.innerWidth||k.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;}if(this[0]==document){return Math.max(document.body.scrollWidth,document.body.offsetWidth);}return l.apply(this,arguments);},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-g(this,"borderTopWidth")-g(this,"borderBottomWidth"):this.height()+g(this,"paddingTop")+g(this,"paddingBottom");},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-g(this,"borderLeftWidth")-g(this,"borderRightWidth"):this.width()+g(this,"paddingLeft")+g(this,"paddingRight");},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight:this.height()+g(this,"borderTopWidth")+g(this,"borderBottomWidth")+g(this,"paddingTop")+g(this,"paddingBottom");},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth:this.width()+g(this,"borderLeftWidth")+g(this,"borderRightWidth")+g(this,"paddingLeft")+g(this,"paddingRight");},scrollLeft:function(a){if(a!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(a,k(window).scrollTop());}else{this.scrollLeft=a;}});}if(this[0]==window||this[0]==document){return self.pageXOffset||k.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;}return this[0].scrollLeft;},scrollTop:function(a){if(a!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(k(window).scrollLeft(),a);}else{this.scrollTop=a;}});}if(this[0]==window||this[0]==document){return self.pageYOffset||k.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;}return this[0].scrollTop;},position:function(a,r){var u=this[0],c=u.parentNode,s=u.offsetParent,a=k.extend({margin:false,border:false,padding:false,scroll:false},a||{}),d=u.offsetLeft,e=u.offsetTop,t=u.scrollLeft,b=u.scrollTop;if(k.browser.mozilla||k.browser.msie){d+=g(u,"borderLeftWidth");e+=g(u,"borderTopWidth");}if(k.browser.mozilla){do{if(k.browser.mozilla&&c!=u&&k.css(c,"overflow")!="visible"){d+=g(c,"borderLeftWidth");e+=g(c,"borderTopWidth");}if(c==s){break;}}while((c=c.parentNode)&&(c.tagName.toLowerCase()!="body"||c.tagName.toLowerCase()!="html"));}var v=j(u,a,d,e,t,b);if(r){k.extend(r,v);return this;}else{return v;}},offset:function(K,F){var G=0,H=0,c=0,B=0,b=this[0],I=this[0],J,L,d=k.css(b,"position"),e=k.browser.mozilla,E=k.browser.msie,C=k.browser.safari,x=k.browser.opera,D=false,y=false,K=k.extend({margin:true,border:false,padding:false,scroll:true,lite:false},K||{});if(K.lite){return this.offsetLite(K,F);}if(b.tagName.toLowerCase()=="body"){G=b.offsetLeft;H=b.offsetTop;if(e){G+=g(b,"marginLeft")+(g(b,"borderLeftWidth")*2);H+=g(b,"marginTop")+(g(b,"borderTopWidth")*2);}else{if(x){G+=g(b,"marginLeft");H+=g(b,"marginTop");}else{if(E&&jQuery.boxModel){G+=g(b,"borderLeftWidth");H+=g(b,"borderTopWidth");}}}}else{do{L=k.css(I,"position");G+=I.offsetLeft;H+=I.offsetTop;if(e||E){G+=g(I,"borderLeftWidth");H+=g(I,"borderTopWidth");if(e&&L=="absolute"){D=true;}if(E&&L=="relative"){y=true;}}J=I.offsetParent;if(K.scroll||e){do{if(K.scroll){c+=I.scrollLeft;B+=I.scrollTop;}if(e&&I!=b&&k.css(I,"overflow")!="visible"){G+=g(I,"borderLeftWidth");H+=g(I,"borderTopWidth");}I=I.parentNode;}while(I!=J);}I=J;if(I.tagName.toLowerCase()=="body"||I.tagName.toLowerCase()=="html"){if((C||(E&&k.boxModel))&&d!="absolute"&&d!="fixed"){G+=g(I,"marginLeft");H+=g(I,"marginTop");}if((e&&!D&&d!="fixed")||(E&&d=="static"&&!y)){G+=g(I,"borderLeftWidth");H+=g(I,"borderTopWidth");}break;}}while(I);}var a=j(b,K,G,H,c,B);if(F){k.extend(F,a);return this;}else{return a;}},offsetLite:function(a,q){var d=0,e=0,s=0,b=0,c=this[0],r,a=k.extend({margin:true,border:false,padding:false,scroll:true},a||{});do{d+=c.offsetLeft;e+=c.offsetTop;r=c.offsetParent;if(a.scroll){do{s+=c.scrollLeft;b+=c.scrollTop;c=c.parentNode;}while(c!=r);}c=r;}while(c&&c.tagName.toLowerCase()!="body"&&c.tagName.toLowerCase()!="html");var t=j(this[0],a,d,e,s,b);if(q){k.extend(q,t);return this;}else{return t;}}});var g=function(b,a){return parseInt(k.css(b.jquery?b[0]:b,a))||0;};var j=function(b,c,e,a,n,d){if(!c.margin){e-=g(b,"marginLeft");a-=g(b,"marginTop");}if(c.border&&(k.browser.safari||k.browser.opera)){e+=g(b,"borderLeftWidth");a+=g(b,"borderTopWidth");}else{if(!c.border&&!(k.browser.safari||k.browser.opera)){e-=g(b,"borderLeftWidth");a-=g(b,"borderTopWidth");}}if(c.padding){e+=g(b,"paddingLeft");a+=g(b,"paddingTop");}if(c.scroll){n-=b.scrollLeft;d-=b.scrollTop;}return c.scroll?{top:a-d,left:e-n,scrollTop:d,scrollLeft:n}:{top:a,left:e};};})(jQuery);function seoTracking(){var d=escape(document.referrer);var g=location.hostname;var e="http://na.decdna.net/n/3813/19546/www.kohler.com/18911c240025030000000006000000000460150b0000000000000000000000000000000100/i/c?0&1pixgif&referer="+d;if(d&&d.search(g)==-1){imageTR=new Image();imageTR.src=e;}}var check;var mayHideTab=true;var layerRef;var styleSwitch;var what;var timer;var detailImageSrc="";function getcookie(g){var h=""+document.cookie;var j=h.indexOf(g);if(j==-1||g==""){return"";}var e=h.indexOf(";",j);if(e==-1){e=h.length;}return unescape(h.substring(j+g.length+1,e));}function isLoggedIn(){public_keuser="";if(document.cookie){var b=getcookie("KEID");if(b!=""){public_keuser=b.substring(0,b.indexOf("|"));}}}var placement=0;var keepgoing="true";function scrollMe(c,d){timer=setInterval(function(){document.getElementById(c).scrollLeft+=d;},1);}function scrollMeSafari(j,e,h){var g=0;g=(h-3)*(-188)-1;placement+=e;if(placement>0){document.getElementById(j).style.left=0;placement=0;}else{if(placement<g){placement=g;}else{document.getElementById(j).style.left=placement;}}if(document.getElementById("keepgoing").value=="true"){scrollMe(j,e);}}function isNoFlash(){if(document.cookie){return getcookie("noflash")!="";}return false;}function init(){if(document.getElementById){layerRef="document.getElementById";styleSwitch=".style";what="dom1";}else{if(document.layers){layerRef="document.layers";styleSwitch="";what="ns4";}else{if(document.all){layerRef="document.all";styleSwitch=".style";what="ie4";}else{what="none";newbrowser=false;}}}check=true;}function isDefined(b){return(typeof b!="undefined");}function showHide(layerName,showHideToggle){if(check){if(what=="none"){return;}if(what=="dom1"){if(showHideToggle=="show"||(showHideToggle!="hide"&&document.getElementById(layerName).style.display!="block")){document.getElementById(layerName).style.display="block";}else{document.getElementById(layerName).style.display="none";}}else{if(showHideToggle=="show"||(showHideToggle!="hide"&&(eval(layerRef+'["'+layerName+'"]'+styleSwitch+".display")!="block"))){eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="block"');}else{eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display=""');}}}}function showHideTabTimed(){}function showHideTab(layerName,showHideToggle){return;if(check){if(!mayHideTab){return;}if(what=="none"){return;}else{if(what=="dom1"){if(showHideToggle=="hide"||(showHideToggle!="show"&&document.getElementById(layerName).style.display!="none")){document.getElementById(layerName).style.display="none";document.tab.src="/common/images/tab-myfolder.gif";}else{document.getElementById(layerName).style.display="block";document.tab.src="/common/images/tab-myfolder-active.gif";}}else{if(showHideToggle=="hide"||(showHideToggle!="show"&&eval(layerRef+'["'+layerName+'"]'+styleSwitch+".display")=="")){eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');}else{eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display=""');}}}}return;}function highlight(b){document.getElementById("icon-pulsating").src="/performanceshowers/images/icon-pulsating.gif";document.getElementById("icon-fullflow").src="/performanceshowers/images/icon-fullflow.gif";document.getElementById("icon-softaerated").src="/performanceshowers/images/icon-softaerated.gif";document.getElementById("icon-"+b).src="/performanceshowers/images/icon-"+b+"-a.gif";document.getElementById("text-default").style.display="none";document.getElementById("text-pulsating").style.display="none";document.getElementById("text-fullflow").style.display="none";document.getElementById("text-softaerated").style.display="none";document.getElementById("text-"+b).style.display="block";}function showAll(d){if(check){if(what=="none"){return;}else{if(what=="dom1"){for(var c=0;;c++){layerNelem=document.getElementById(d+c);if(layerNelem==null){break;}document.getElementById(d+"arrow"+c).src="/common/images/icon-contract-up.gif";if(layerNelem.style.display=="none"){layerNelem.style.display="block";}}}}}return;}function hideAllResults(d){if(check){if(what=="none"){return;}else{if(what=="dom1"){for(var c=0;;c++){layerNelem=document.getElementById(d+c);if(layerNelem==null){break;}document.getElementById(d+"arrow"+c).src="/common/images/icon-expand-down.gif";if(layerNelem.style.display!="none"){layerNelem.style.display="none";}}}}}return;}function showSection(d,c){if(check){if(what=="none"){return;}else{if(what=="dom1"){if(d=="kitchen"){document.getElementById("bathroom").style.display="none";if(c!="1"){document.getElementById("commercial").style.display="none";}document.getElementById("kitchen-button").src="/common/images/nav-inthekitchen-on.gif";document.getElementById("bathroom-button").src="/common/images/nav-inthebathroom.gif";if(c!="1"){document.getElementById("commercial-button").src="/common/images/nav-commercialuse.gif";}}else{if(d=="bathroom"){document.getElementById("kitchen").style.display="none";if(c!="1"){document.getElementById("commercial").style.display="none";}document.getElementById("kitchen-button").src="/common/images/nav-inthekitchen.gif";document.getElementById("bathroom-button").src="/common/images/nav-inthebathroom-on.gif";if(c!="1"){document.getElementById("commercial-button").src="/common/images/nav-commercialuse.gif";}}}if(c!="1"){document.getElementById(d).style.display="block";}}}}return;}function swapSubNav(k,h){var j;for(var e=1;;e++){j=document.getElementById(k+e);if(j==null){break;}if(j.style.display=="block"){j.style.display="none";document.getElementById(k+"-arrow"+e).src="/common/images/nav-arrow.gif";}}try{document.getElementById(k+h).style.display="block";document.getElementById(k+"-arrow"+h).src="/common/images/nav-arrow-on.gif";}catch(l){}}function divClicked(g,h,j,e){showHide(g);swapArrow(h);swap(e,j);if(jQuery){setTimeout(function(){if(jQuery("#"+g).css("display")=="block"){jQuery("#"+g).unbind("click");jQuery("#"+g).click(function(b){b.stopPropagation();});var a=function(b){if(jQuery(b.target).attr("id")==e){jQuery(document).one("click",function(c){a;});return;}showHide(g);swapArrow(h);swap(e,j);};jQuery(document).one("click",function(b){a(b);});}},100);}}function swap(c,d){if(d=="1"){if((document.getElementById(c).style.backgroundColor.indexOf("241")>0)||(document.getElementById(c).style.backgroundColor.indexOf("f1e")>0)){document.getElementById(c).style.backgroundColor="#E8DE95";}else{document.getElementById(c).style.backgroundColor="#F1ECC7";}}else{if(d=="2"){if((document.getElementById(c).style.backgroundColor.indexOf("220")>0)||(document.getElementById(c).style.backgroundColor.indexOf("dce")>0)){document.getElementById(c).style.backgroundColor="#BFCED6";}else{document.getElementById(c).style.backgroundColor="#DCE6EB";}}else{if(d=="3"){if((document.getElementById(c).style.backgroundColor.indexOf("243")>0)||(document.getElementById(c).style.backgroundColor.indexOf("f3f")>0)){document.getElementById(c).style.backgroundColor="#E1E1E2";}else{document.getElementById(c).style.backgroundColor="#F3F3F3";}}}}}function showHidePhotos(b){if(document.getElementById(b+"-hidden").style.display=="block"){document.getElementById(b+"-hidden").style.display="none";document.getElementById(b+"-show").style.display="block";document.getElementById(b+"-showHideToggle").innerHTML="Hide";if(document.getElementById(b+"-showHideToggle2")!=undefined){document.getElementById(b+"-showHideToggle2").innerHTML="Hide";}}else{document.getElementById(b+"-hidden").style.display="block";document.getElementById(b+"-show").style.display="none";document.getElementById(b+"-showHideToggle").innerHTML="Show";if(document.getElementById(b+"-showHideToggle2")!=undefined){document.getElementById(b+"-showHideToggle2").innerHTML="Show";}}}var tabsizes=["","-wide","-wider"];var activeTabNum=0;function setActiveTab(p,j,l){activeTabNum=p;for(var n=0;;n++){var k=document.getElementById("pn_tab"+n);if(!isDefined(k)||k==null){break;}if(n==p){k.style.display="block";}else{k.style.display="none";}var o=(n==0)?"":"-brd";var m=document.getElementById("tab"+n+tabsizes[j]);if(n==p){m.style.backgroundImage="url(../common/images/tab"+o+"-on"+tabsizes[j]+".gif)";m.style.color="#000000";m.style.textDecoration="none";}else{m.style.backgroundImage="url(../common/images/tab"+o+"-off-"+l+tabsizes[j]+".gif)";}}}function rolloverTab(g,h,j){if(activeTabNum!=g){var k=document.getElementById("tab"+g+tabsizes[h]);var l=(g==0)?"":"-brd";k.style.color="#990000";k.style.textDecoration="underline";k.style.backgroundImage="url(../common/images/tab"+l+"-over-"+j+tabsizes[h]+".gif)";}}function rolloutTab(g,h,j){if(activeTabNum!=g){var k=document.getElementById("tab"+g+tabsizes[h]);var l=(g==0)?"":"-brd";k.style.color="#000000";k.style.textDecoration="none";k.style.backgroundImage="url(../common/images/tab"+l+"-off-"+j+tabsizes[h]+".gif)";}}function reduceEnlarge(c,d){d=d.replace(/&ssm=1/g,"");if(c){d+="&ssm=1";}if(detailImageSrc!=null&&detailImageSrc.length>0){d=d.replace(/(&|\?)imgcolor=[^&]*/g,"$1");d=d.replace(/\?&/,"?");d=d.replace(/&$/,"");d+="&imgcolor="+detailImageSrc;}self.location=d;}function swapArrow(b){if(document.getElementById(b).src.indexOf("down.gif")>0){document.getElementById(b).src="/common/images/icon-contract-up.gif";}else{document.getElementById(b).src="/common/images/icon-expand-down.gif";}}function changeimage(d,c){if(document.images){if(d.filters){d.filters.blendTrans.apply();}d.src=c;if(d.filters){d.filters.blendTrans.play();}}c=c.replace(/.*\/(.*)$/,"$1");detailImageSrc=c;}function openWindow(g,e,d){window.open(g,e,d);}function popupPrivacy(){window.open("http://www.kohler.com/corp/privacy.html","","left=0,top=0,width=730,height=500,location=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes");}function vidplayer(e,h){var g=1010,j=590;if(typeof e=="undefined"||e==null){return false;}if(typeof h!="undefined"&&h=="notabs"){g=929;j=663;}window.open(e,"videos","left=0,top=0,width="+g+",height="+j+",location=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes");}function tradeSelect(){f=document.tradeLinks;if(f.tradeProfLinks.selectedIndex>0){window.location=f.tradeProfLinks[f.tradeProfLinks.selectedIndex].value;}return false;}function maybeOpenInNewWindow(b){if(b.length==0){return false;}if(b.indexOf("samewindow|")==0){this.location=b.substring(11);return false;}else{window.open(b);return false;}}function writeFlashMovie(q,p,o,k,r,n,l,m){document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+q+',0,0,0" ');document.write("  WIDTH="+o+" HEIGHT="+k);if(m!=undefined&&m.length>0){document.write('name="'+m+'" id="'+m+'"');}document.write(">");document.write(' <PARAM NAME=movie VALUE="'+p+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE='+r+">");if(n!=undefined&&n.length>0){document.write(' <param name="wmode" value="'+n+'" />');}if(l!=undefined&&l.length>0){document.write(' <param name="allowScriptAccess" value="'+l+'" />');}document.write(' <EMBED src="'+p+'" quality=high bgcolor='+r+" ");document.write(" swLiveConnect=FALSE WIDTH="+o+" HEIGHT="+k);if(n!=undefined&&n.length>0){document.write(' wmode="'+n+'" ');}if(l!=undefined&&l.length>0){document.write(' allowScriptAccess="'+l+'" ');}if(m!=undefined&&m.length>0){document.write(' id="'+m+'" name="'+m+'"');}document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');document.write(" </EMBED></OBJECT>");}function CreateControl(l,d,k,h){var j=document.getElementById(l);j.innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+d+'" height="'+k+'"><param name="movie" value="'+h+'"><param name="quality" value="high"><param name="wmode" value="opaque"><embed src="'+h+'" wmode="opaque" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+d+'" height="'+k+'"></embed></object>';}function clearDefault(b){if(b.value==" Keyword or item number"){b.value="";}}function newsletter(d){var c=new Array(4);c[0]="/newsletter/subscribe.jsp?id=PASPC0";c[1]="/newsletter/subscribe.jsp?id=PASPC1";c[2]="/newsletter/subscribe.jsp?id=PASPC2";c[3]="/newsletter/subscribe.jsp?id=PASPC3";window.location=c[d];}var imageUrlSrc125="/onlinecatalog/125x160/";var imageUrlSrc300="/onlinecatalog/300x350/";var imageUrlSrc350="/onlinecatalog/350x400/";var imageUrlSrc550="/onlinecatalog/550wide/";var imageUrlSrcChip="/common/images/colors/50x50/";var productNumberPrefix="K-";(function(ab){var T={};var M=[];var Q=[];var Y=[];var Z=[];var ac=[];var O;var U=null;ab(document).ready(function(){V();});function V(){var c;ab("#rightTabbedBoxTabs > .tab:not(.tabFiller)").click(function(n){ab(this).siblings(".tab").removeClass("tabOn");ab(this).removeClass("tabMouseOver tabMouseOverColor");ab(this).addClass("tabOn");c=this;var o=ab("#rightTabbedBoxTabs > .tab").index(this);ab("#rightTabbedBoxContent").children().css("display","none").eq(o).css("display","block");n.stopPropagation();return false;});ab("#rightTabbedBoxTabs > .tab").hover(function(){if(this!=c){ab(this).addClass("tabMouseOver tabMouseOverColor");}},function(){ab(this).removeClass("tabMouseOver tabMouseOverColor");});var e;ab("#lowerTabs > .tab:not(.tabPlaceHolder)").click(function(n){ab(this).siblings(".tab").removeClass("tabOn");ab(this).removeClass("tabMouseOver KPNA_20090330_dtv_AD tabMouseOverColor");ab(this).addClass("tabOn");e=this;var o=ab("#lowerTabs > .tab").index(this);ab("#lowerContent").children().css("display","none").eq(o).css("display","block");n.stopPropagation();return false;});ab("#lowerTabs > .tab").hover(function(){if(this!=e){ab(this).addClass("tabMouseOver tabMouseOverColor");}},function(){ab(this).removeClass("tabMouseOver tabMouseOverColor");});var l;ab("#colorGridColors > .colorTile").click(function(o){l=this;ab("#colorGridColors > .colorTile").removeClass("colorTileSelected");ab(this).addClass("colorTileSelected");var r=ab(this).children("div").html();var s=T[r];if(s==null){return;}var p=s.name+" (-"+r+")";ab("#colorGridText").html('<span class="bold">Color/Finish: </span>'+p);ab("#infoColorFinish").html(p);ab("#infoModelNumber").html(productNumberPrefix+s.prodNum);ab("#infoListPrice").html(s.price);if(s.webLink!=null&&s.webLink!=""){ab("#orderColorSample").attr("href",s.webLink);ab("#orderColorSample").css("display","block");}else{ab("#orderColorSample").css("display","none");}ab("#prodColorTile img").get(0).src=imageUrlSrcChip+s.gifSwatch;ab("#mainPhoto").get(0).src=imageUrlSrc300+s.prodPhoto;if(T&&T[ad()]&&ab("#detailMoreViews .detailMoreViewsPhoto img").size()>0){var n=T[ad()].prodPhoto;if(n&&n!=""){var q=imageUrlSrc550+n;if(ab("#detailMoreViews #detailMoreViewNoAlt").size()>0){q=imageUrlSrc550+n;ab("#detailMoreViews .detailMoreViewsPhoto img").get(0).src=q;}else{q=imageUrlSrc125+n;ab("#detailMoreViews #detailMoreViewsRight img:first").get(0).src=q;ab("#detailMoreViews #detailMoreViewsRight img:first").siblings().removeClass("detailMoreViewsSelected");ab("#detailMoreViews #detailMoreViewsRight img:first").addClass("detailMoreViewsSelected");q=imageUrlSrc350+n;ab("#detailMoreViews .detailMoreViewsPhoto img").get(0).src=q;q=imageUrlSrc550+n;ab("#detailMoreViews #detailMoreViewsEnlarge img").get(0).src=q;}}}if(T[ad()]==null||T[ad()].scene7Img==null||T[ad()].scene7Img.replace(" ","").length==0){ab("td.button:has(a.zoomIn)").css("display","none");}else{ab("td.button:has(a.zoomIn)").css("display","");if(U!=null){U.setImage("http://s7d4.scene7.com/is/image/Kohler/"+T[ad()].scene7Img+"?op_sharpen=1&qlt=75,1",true);}}o.stopPropagation();return false;});var d=new J();var j=[];function g(n){d.clear();d.set(function(){var u=ab(n).offset();var s=u.left-25+16+25;var t=u.top-9+14+9;for(var p=0;p<j.length;p++){j[p].remove();}var v=ab("#colorBalloon").clone();j.push(v);ab("body").append(v);v.unbind("mouseover").unbind("mouseout");v.find("#colorBalloonBase").hover(function(){},function(){v.fadeOut(250,function(){v.remove();});});var q=ab(n).children("div").html();var r=T[q];var o=r.name+" (-"+q+")";v.find("#infoColorFinish2").html(o);v.find("#infoModelNumber2").html(productNumberPrefix+r.prodNum);if(r.price!=null&&r.price.charAt(0)=="$"){v.find("#infoListPrice2").html(r.price);}else{v.find("#infoListPrice2").html("N/A");}v.find("#colorBalloonColorChip > img").get(0).src=imageUrlSrcChip+r.gifSwatch;v.css("top",t+"px");v.css("left",s+"px");if(ab.browser.msie){v.css("display","block");}else{v.fadeIn(250);}v.one("click",function(){ab(n).unbind("mouseover");v.fadeOut(250,function(){ab(n).one("mouseout",function(){g(n);ab(n).mouseover(function(){g(n);});});});ab(n).click();});},400);ab(n).mousemove(function(){d.reset();});ab(n).click(function(){d.clear();});}ab("#colorGridColors > .colorTile").mouseover(function(){g(this);});ab("#colorGridColors > .colorTile").mouseout(function(){d.clear();});if(ab("#colorFinishDimensions").size()==0){ab("#colorGrid").css("height","100%");}ab("#additionalItemsRequired").click(function(){ab("#lowerTabs > .tab").eq(1).click();return false;});var h={};var a=ab("#requiredItems").find("table").get();ab("#lowerTabs > .tab").eq(1).click(function(){for(var p=0;p<a.length;p++){var o=ab(a[p]);var q=p;if(o.find(".extraRelatedProds:first").css("display")=="none"){var n=o.height();o.find(".extraRelatedProds").css("display","");var r=o.height();h[q]=[n,r];o.find(".extraRelatedProds").css("display","none");}else{var r=o.height();o.find(".extraRelatedProds").css("display","none");var n=o.height();h[q]=[n,r];o.find(".extraRelatedProds").css("display","");}}});ab("#requiredItems").find("a.viewAll").click(function(){var q=ab(this).parents(".sectionHead").next("div.tableContainer");var o=q.children("table");var r=ab("#requiredItems").find("table").index(o.get(0));var n=h[r][0];var s=h[r][1];o.find(".extraRelatedProds").css("display","");q.height(n);var p=ab(this).parent();q.animate({height:s+"px"},500,function(){p.css("display","none");p.next(".showingInfo").css("display","block");});return false;});ab("#requiredItems").find("a.collapse").click(function(){var q=ab(this).parents(".sectionHead").next("div.tableContainer");var o=q.children("table");var r=ab("#requiredItems").find("table").index(o.get(0));var n=h[r][0];var s=h[r][1];q.height(s);var p=ab(this).parent();q.animate({height:n+"px"},500,function(){o.find(".extraRelatedProds").css("display","none");p.css("display","none");p.prev(".showingInfo").css("display","block");});return false;});ai();ab("#actionLinks #saveToFolder").click(function(){var p=true;for(var n=0;n<Y.length;n++){if(ab.isFunction(Y[n])){var o=Y[n]();if(o==false){p=false;}}}return p;});ab("#actionLinks #addToCart").click(function(){for(var n=0;n<Z.length;n++){if(ab.isFunction(Z[n])){Z[n]();}}});ab("a.moreViews").click(function(){ab("#detailMoreViews").css({display:"block",right:"-8px"});ab(document).bind("click.detailMoreViewsClose",function(n){if(ab(n.target).parents("#detailMoreViews").size()==0&&!ab(n.target).hasClass("moreViews")){ab("#detailMoreViews #detailMoreViewsClose").click();}});document.body.scrollTop=106;});ab("#detailMoreViews #detailMoreViewsClose").click(function(){ab("#detailMoreViews").css("display","none");ab(document).unbind("click.detailMoreViewsClose");});ab("#detailMoreViews #detailMoreViewsPrintBtn").click(function(){var t=ab(".detailMoreViewsPhoto img").get(0).src;t=t.substr(t.lastIndexOf("/")+1,t.length);var r=encodeURIComponent(ab("#detailPage #prodName h1").text());var n=encodeURIComponent(ab("#detailPage #infoModelNumber").text());var o=encodeURIComponent(ab("#detailPage #infoColorFinish").text());var s=encodeURIComponent(ab("#detailPage #infoListPrice").text());var p=encodeURIComponent(ab("#detailPage #photoCaption").text());var q="printPhoto.jsp?img="+t+"&prodName="+r+"&prodNum="+n+"&prodColor="+o+"&listPrice="+s+"&caption="+p;window.open(q,"_blank","");});ab("#detailMoreViews #detailMoreViewsRight img").click(function(){ab(this).siblings().removeClass("detailMoreViewsSelected");ab(this).addClass("detailMoreViewsSelected");var n=ab(this).get(0).src;n=n.substr(n.lastIndexOf("/"),n.length);var o="/onlinecatalog/550wide"+n;var p="/onlinecatalog/350x400"+n;ab(".detailMoreViewsPhoto img").get(0).src=p;ab("#detailMoreViews #detailMoreViewsEnlarge img").get(0).src=o;});ab("#detailMoreViews #detailMoreViewsEnlargeBtn").click(function(){ab("#detailMoreViews #detailMoreViewsEnlarge").css("display","block");ab("#detailMoreViews #detailMoreViewsEnlarge a.enlarge").one("click",function(){ab("#detailMoreViews #detailMoreViewsEnlarge").css("display","none");});});var m=0.5;var b=1;ab("#photoBox a.zoomIn").click(function(){var n=L()[ad()].scene7Img;ab("#zoomLayer").css("display","block");if(U==null){U=new SjZViewer("http://s7d4.scene7.com/is/image/Kohler/",n,556,472);U.setBackground("0xffffff");U.setTurnTime(m);U.setTransitionTime(m);U.setMaxZoom(100);U.setZoomStep(2);U.onEvent.onImageZoomedIn=U.onEvent.onImageZoomedOut=function(o){b=o;};}U.setImage("http://s7d4.scene7.com/is/image/Kohler/"+n+"?op_sharpen=1&qlt=75,1",true);ab(document).bind("click.zoomLayerViewsClose",function(o){if(ab(o.target).parents("#zoomLayer").size()==0&&!ab(o.target).hasClass("zoomIn")){ab("#zoomLayerClose").click();}});return false;});ab("#zoomLayerClose").click(function(){ab("#zoomLayer").css("display","none");ab(document).unbind("click.zoomLayerViewsClose");return false;});ab("#zoomLayer #zoomLayer-zoomIn").click(function(){if(U!=null){U.zoomIn();}return false;});ab("#zoomLayer #zoomLayer-zoomOut").click(function(){if(U!=null){U.zoomOut();}return false;});ab("#zoomLayer div[id^=zoomLayer-pan]").click(function(){var n=ab(this).attr("id");var o=n.substring(13,n.length).toLowerCase();if(U!=null){U.pan(o,1/b*2);}return false;});ab("#zoomLayer #zoomLayer-reset").click(function(){if(U!=null){U.reset();}return false;});for(var k=0;k<ac.length;k++){ac[k]();}}function S(a){O=a;}function X(a){ac.push(a);}function W(a){T=a;}function L(){return T;}function ae(a){ab("#colorGridColors > .colorTile > div").each(function(){if(ab(this).text()==a){ab(this).parent().click();}});}ab("#detailMoreViews").css({display:"block",right:"-8px"});function ad(){var a=ab("#colorGridColors > .colorTile").get();if(a.length==0){return"NA";}for(var b=0;b<a.length;b++){if(ab(a[b]).hasClass("colorTileSelected")){return ab(a[b]).children("div").text();}}return ab("#colorGridColors > .colorTile:first").children("div").text();}function ah(a,b){if(a!=undefined){ab("#rightTabbedBoxTabs > .tab").eq(a).click();}if(b!=undefined){ab("#lowerTabs > .tab").eq(b).click();}}function aa(){for(var a=0;a<M.length;a++){if(ab.isFunction(M[a])){M[a]();}}K();}function P(){for(var a=0;a<Q.length;a++){if(ab.isFunction(Q[a])){Q[a]();}}ai();}function ai(){var a=ab("#actionLinks #addToCompare");a.parent().removeClass("remove");a.parent().addClass("add");a.html("Add to Compare");a.unbind("click");a.click(function(){aa();});}function K(){var a=ab("#actionLinks #addToCompare");a.parent().removeClass("add");a.parent().addClass("remove");a.html("Delete from Compare");a.unbind("click");a.click(function(){P();});}function N(a){M.push(a);}function aj(a){Q.push(a);}function G(a){Y.push(a);}function H(a){Z.push(a);}function af(){var a="";var b=document.cookie.split("; ");for(var c=0;c<b.length;c++){var d=b[c].split("=");if(d.length>=2&&d[0]=="printZipCode"){a=d[1];}}if(a==""){ag();}else{R({printZip:a,prodColor:ad()});}}function ag(){ab("#printDlg").css("display","block");ab("#printDlg #printZip").focus();ab("#printDlg #printDlgClose, #printDlg #printGo").one("click",function(){ab("#printDlg").css("display","none");});ab("#printDlg #printGo").one("click",function(){var a=ab("#printDlg #printZip").val();if(ab("#printDlg #printAsk:checked").size()>0){R({printZip:a,prodColor:ad(),printAsk:"1"});}else{R({printZip:a,prodColor:ad()});}return false;});ab("#printDlg").unbind("keypress");ab("#printDlg").keypress(function(a){if(a.which==13){ab("#printDlg #printGo").click();}});ab("#printDlg").click(function(a){a.stopPropagation();});ab(document).unbind("click.printClose");ab(document).bind("click.printClose",function(){ab("#printDlg #printDlgClose").click();});}function R(a){var b=ab("#printDlg #printGo").attr("href");b=I(b,a);window.open(b);return false;}function I(k,b){var h={};var a=k.indexOf("?");if(a>0){var g=k.substring(a,k.length);var e=g.split("&");for(var d=0;d<e.length;d++){var j=e[d].split("=");if(j.length>=2){h[j[0]]=j[1];}}k=k.substring(0,a);}else{k=k+"?";}for(var d in b){h[d]=b[d];}var c=0;for(var d in h){if(c>0){k=k+"&";}k=k+d+"="+h[d];c++;}return k;}window.detail={setEnvironment:S,onInit:X,setColorData:W,getColorData:L,setColor:ae,getColor:ad,setTabs:ah,showAddToCompare:ai,showRemoveFromCompare:K,onAddToCompare:N,onRemoveFromCompare:aj,onSaveToFolder:G,onAddToCart:H,print:af};function J(){this.timer=null;var b;var a;this.set=function(d,c){this.clear();b=d;a=c;this.timer=window.setTimeout(d,c);};this.clear=function(){if(this.timer){window.clearTimeout(this.timer);}this.timer=null;b=null;a=null;};this.reset=function(){if(b==null||a==null){return;}this.set(b,a);};}})(jQuery);if(typeof ooe_color=="undefined"){ooe_color="#990000";}var custom_var,_sp="%3A\\/\\/",_rp="%3A//",_poE=0,_poX=0,_sH=screen.height,_d=document,_w=window,_ht=escape(_w.location.href),_hr=_d.referrer,_tm=(new Date()).getTime(),_kp=0,_sW=screen.width;_d.onkeypress=_fK;function _fK(d){if(!d){d=_w.event;}var c=(typeof d.which=="number")?d.which:d.keyCode;if((_kp==15&&c==12)){_w.open("https://secure.opinionlab.com/pageviewer/pv_controlboard.html?url="+_fC(_ht),"PageViewer","height=529,width=705,screenX="+((_sW-705)/2)+",screenY="+((_sH-529)/2)+",top="+((_sH-529)/2)+",left="+((_sW-705)/2)+",status=yes,toolbar=no,menubar=no,location=no,resizable=yes");}_kp=c;}function _fC(_u){_aT=_sp+",\\/,\\.,-,_,"+_rp+",%2F,%2E,%2D,%5F";_aA=_aT.split(",");for(i=0;i<5;i++){eval("_u=_u.replace(/"+_aA[i]+"/g,_aA[i+5])");}return _u;}function O_LC(){_w.open("https://secure.opinionlab.com/ccc01/comment_card.asp?time1="+_tm+"&time2="+(new Date()).getTime()+"&prev="+_fC(escape(_hr))+"&referer="+_fC(_ht)+"&height="+_sH+"&width="+_sW+"&custom_var="+custom_var,"comments","width=535,height=192,screenX="+((_sW-535)/2)+",screenY="+((_sH-192)/2)+",top="+((_sH-192)/2)+",left="+((_sW-535)/2)+",resizable=yes,copyhistory=yes,scrollbars=no");}function _fPe(){if(Math.random()>=1-_poE){O_LC();_poX=0;}}function _fPx(){if(Math.random()>=1-_poX){O_LC();}}window.onunload=_fPx;function O_GoT(b){_d.write("<a href='javascript:void(0);' onclick='if(typeof(s.Survey.launch) == \"function\") { s.Survey.launch(\"1060\"); }' class='red-no-line' style='font-size:10px; color:"+ooe_color+"; '>Help us improve this page</a>");_fPe();}sj=[];sj.path="../dhtml/";if(typeof(sj_codebase)!="undefined"){if(sj_codebase.substring(sj_codebase.length-1)!="/"&&sj_codebase!=""){sj_codebase+="/";}sj.path=sj_codebase;}sj.setPath=function(a){if(a.substring(a.length-1)!="/"&&a!=""){a+="/";}sj.path=a;};sj.include=function(a){a=a.replace(/\:/g,"/");document.write('<script language="javascript" type="text/javascript" src="'+sj.path+a+'.js"><\/script>');};sj_resource=new Object();sj_resource.getResource=function(d){var c=d;for(var b in this){if(typeof b=="string"){var a;do{a=c;c=c.replace("%"+b+"%",this[b]);}while(a!=c);}}return c;};sj_resource.NOT_FOUND="Not found";sj_resource.INVALID_PARAMETER="Invalid parameter";sj_resource.IMAGE_IS_NOT_SPECIFIED="image is not specified";sj_resource.CONTEXT_PROCESSING_FAILED="context processing FAILED";sj_resource.ERROR="Error";sj_resource.THERE_WAS_A_PROBLEM_RETRIEVING_DATA="There was a problem retrieving data";sj_resource.ERROR_LOADING_CONTEXT="Error loading context";sj_resource.PROBLEMS="Problems";sj_resource.HANDLER_COULD_NOT_BE_ATTACHED="Handler could not be attached";sj_resource.HANDLER_COULD_NOT_BE_REMOVED="Handler could not be removed";sj_resource.TO_PREVIOUS_PAGE="To previous page";sj_resource.TO_NEXT_PAGE="To next page";function S7ConfigObject(b,c,a){this.isVersion=b||"2.8";this.isViewerRoot=c||"/is-viewers";this.isRoot=a||"/is/image/";}var S7Config=new S7ConfigObject();var sjroot=S7Config.isViewerRoot;var sjimageServer=S7Config.isRoot;function SjDetectBrowser(){var a=navigator.userAgent.toLowerCase();this.isGecko=(a.indexOf("gecko")!=-1&&a.indexOf("safari")==-1);this.isAppleWebKit=(a.indexOf("applewebkit")!=-1);this.isKonqueror=(a.indexOf("konqueror")!=-1);this.isWebTV=(a.indexOf("webtv")!=-1);this.isSafari=(a.indexOf("safari")!=-1);this.isOmniweb=(a.indexOf("omniweb")!=-1);this.isOpera=(a.indexOf("opera")!=-1);this.isIcab=(a.indexOf("icab")!=-1);this.isAol=(a.indexOf("aol")!=-1);this.isIE=(a.indexOf("msie")!=-1&&!this.isOpera&&(a.indexOf("webtv")==-1));this.isMozilla=(this.isGecko&&a.indexOf("gecko/")+14==a.length);this.isFirebird=(a.indexOf("firebird/")!=-1);this.isNS=((this.isGecko)?(a.indexOf("netscape")!=-1):((a.indexOf("mozilla")!=-1)&&!this.isOpera&&!this.isSafari&&(a.indexOf("spoofer")==-1)&&(a.indexOf("compatible")==-1)&&(a.indexOf("webtv")==-1)&&(a.indexOf("hotjava")==-1)));this.isIECompatible=((a.indexOf("msie")!=-1)&&!this.isIE);this.isNSCompatible=((a.indexOf("mozilla")!=-1)&&!this.isNS&&!this.isMozilla);this.geckoVersion=((this.isGecko)?a.substring((a.lastIndexOf("gecko/")+6),(a.lastIndexOf("gecko/")+14)):-1);this.equivalentMozilla=((this.isGecko)?parseFloat(a.substring(a.indexOf("rv:")+3)):-1);this.appleWebKitVersion=((this.isAppleWebKit)?parseFloat(a.substring(a.indexOf("applewebkit/")+12)):-1);this.versionMinor=parseFloat(navigator.appVersion);if(this.isGecko&&!this.isMozilla){this.versionMinor=parseFloat(a.substring(a.indexOf("/",a.indexOf("gecko/")+6)+1));}else{if(this.isMozilla){this.versionMinor=parseFloat(a.substring(a.indexOf("rv:")+3));}else{if(this.isIE&&this.versionMinor>=4){this.versionMinor=parseFloat(a.substring(a.indexOf("msie ")+5));}else{if(this.isKonqueror){this.versionMinor=parseFloat(a.substring(a.indexOf("konqueror/")+10));}else{if(this.isSafari){this.versionMinor=parseFloat(a.substring(a.lastIndexOf("safari/")+7));}else{if(this.isOmniweb){this.versionMinor=parseFloat(a.substring(a.lastIndexOf("omniweb/")+8));}else{if(this.isOpera){this.versionMinor=parseFloat(a.substring(a.indexOf("opera")+6));}else{if(this.isIcab){this.versionMinor=parseFloat(a.substring(a.indexOf("icab")+5));}}}}}}}}this.versionMajor=parseInt(this.versionMinor);this.isDOM1=(document.getElementById);this.isDOM2Event=(document.addEventListener&&document.removeEventListener);this.mode=document.compatMode?document.compatMode:"BackCompat";this.isWin=(a.indexOf("win")!=-1);this.isWin32=(this.isWin&&(a.indexOf("95")!=-1||a.indexOf("98")!=-1||a.indexOf("nt")!=-1||a.indexOf("win32")!=-1||a.indexOf("32bit")!=-1||a.indexOf("xp")!=-1));this.isMac=(a.indexOf("mac")!=-1);this.isUnix=(a.indexOf("unix")!=-1||a.indexOf("sunos")!=-1||a.indexOf("bsd")!=-1||a.indexOf("x11")!=-1);this.isLinux=(a.indexOf("linux")!=-1);this.isNS4x=(this.isNS&&this.versionMajor==4);this.isNS40x=(this.isNS4x&&this.versionMinor<4.5);this.isNS47x=(this.isNS4x&&this.versionMinor>=4.7);this.isNS4up=(this.isNS&&this.versionMinor>=4);this.isNS6x=(this.isNS&&this.versionMajor==6);this.isNS6up=(this.isNS&&this.versionMajor>=6);this.isNS7x=(this.isNS&&this.versionMajor==7);this.isNS7up=(this.isNS&&this.versionMajor>=7);this.isIE4x=(this.isIE&&this.versionMajor==4);this.isIE4up=(this.isIE&&this.versionMajor>=4);this.isIE5x=(this.isIE&&this.versionMajor==5);this.isIE55=(this.isIE&&this.versionMinor==5.5);this.isIE5up=(this.isIE&&this.versionMajor>=5);this.isIE6x=(this.isIE&&this.versionMajor==6);this.isIE6up=(this.isIE&&this.versionMajor>=6);this.isIE4xMac=(this.isIE4x&&this.isMac);this.hasAll=(document.all)?true:false;this.hasAnchors=(document.anchors)?true:false;this.hasCookies=(document.cookie)?true:false;this.hasDocumentElement=(document.documentElement)?true:false;this.hasForms=(document.forms)?true:false;this.hasFrames=(window.frames)?true:false;this.hasGetElementById=(document.getElementById)?true:false;this.hasGetElementsByTagName=(document.getElementsByTagName)?true:false;this.hasImages=(document.images)?true:false;this.hasJava=navigator.javaEnabled();this.hasLayers=(document.layers)?true:false;this.hasLinks=(document.links)?true:false;this.hasOption=(window.Option)?true:false;this.hasRegexp=(window.RegExp)?true:false;this.hasScreen=(window.screen)?true:false;}SjDetectBrowser.prototype.getCookieVal=function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length;}return unescape(document.cookie.substring(b,a));};SjDetectBrowser.prototype.fixCookieDate=function(b){var c=new Date(0);var a=c.getTime();if(a>0){b.setTime(b.getTime()-a);}};SjDetectBrowser.prototype.getCookie=function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;while(e<a){var c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c);}e=document.cookie.indexOf(" ",e)+1;if(e==0){break;}}return"";};SjDetectBrowser.prototype.setCookie=function(b,d,a,g,c,e){document.cookie=b+"="+escape(d)+((a)?"; expires="+a:"")+((g)?"; path="+g:"")+((c)?"; domain="+c:"")+((e)?"; secure":"");};SjDetectBrowser.prototype.deleteCookie=function(a,c,b){if(this.getCookie(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}};var sjIS=new SjDetectBrowser();var sjDetectBrowserIncluded=true;if(Array.prototype.push&&([0].push(true)==true)){Array.prototype.push=null;}if(!Array.prototype.push){function array_push(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a];}return this.length;}Array.prototype.push=array_push;}if(!Array.prototype.pop){function array_pop(){lastElement=this[this.length-1];this.length=Math.max(this.length-1,0);return lastElement;}Array.prototype.pop=array_pop;}String.prototype.doubleNewlines=function(){return this.replace(/(\r?\n|\r){1,2}/g,"\n\n");};function sjPBreak(a){return((a.indexOf("?")>=0?"&":"?"));}sjDelimList=[" ","\n","\r"];function sjGetKeyValue(b,c){var a=b.indexOf(c);if(a==-1){return null;}var g=b.indexOf("=",a+c.length);if(g==-1){return null;}var e=g+1;while((d<b.length)&&(b.charAt(e)==" ")){e++;}if(e>=b.length-1){return null;}var d=e+1;while((d<b.length)&&!sjIsLineDelim(b.charAt(d))){d++;}return b.substring(e+1,d);}function sjIsLineDelim(b){for(var a=0;a<sjDelimList.length;a++){if(b==sjDelimList[a]){return true;}}return false;}function sjGetElement(a){if(typeof(a)!="string"){return a;}if(document.getElementById){return document.getElementById(a);}else{if(document.all){return document.all[a];}else{if(document.layers){return document[a];}else{a=null;}}}return a;}function sjGetElementDoc(a){if(document.getElementById){return document.getElementById(a).ownerDocument;}else{if(document.all){return document.all[a].document;}else{if(document.layers){return document[a].document;}else{a=null;}}}return a;}function sjGetElementStyle(a){if(document.getElementById){return document.getElementById(a).style;}if(document.all){return document.all[a].style;}if(document.layers){return document[a];}}function sjGetObj(a){if(document.getElementById){this.obj=document.getElementById(a);this.style=document.getElementById(a).style;}else{if(document.all){this.obj=document.all[a];this.style=document.all[a].style;}else{if(document.layers){this.obj=document.layers[a];this.style=document.layers[a];}}}}function sjGetTextContent(e){var c="";var b=e.childNodes;for(var a=0;a<b.length;a++){var d=b[a];if(d.nodeType==3){c+=d.data;}else{c+=sjGetTextContent(d);}}return c;}function sjCreateDiv(d,a){var c=null;if(d!=null){c=sjGetElement(d);}if(document.all){if(c==null){c=document.body;}c.insertAdjacentHTML("afterBegin",' <div unselectable="on" id="'+a+'" style="position:absolute;text-align:left;overflow:hidden;"> </div> ');}else{if(document.layers){if(c==null){document.layers[a]=new Layer(0);}else{c.document.layers[a]=new Layer(0,c);}}else{if(document.getElementById){if(c==null){c=document.body;}var b=document.createElement("div");b.setAttribute("id",a);b.setAttribute("style","position:absolute;text-align:left;overflow:hidden;");c.appendChild(b);}}}}function sjGetWidth(a){if(document.getElementById){return document.getElementById(a).style.width;}if(document.all){return document.all[a].offsetWidth;}if(document.layers){return document[a].document.width;}}function sjGetHeight(a){if(document.getElementById){return document.getElementById(a).style.height;}if(document.all){return document.all[a].offsetHeight;}if(document.layers){return document[a].document.height;}}function sjGetX(a){a=sjGetElementStyle(a);if(document.getElementById){return parseInt(a.left);}if(document.all){return a.pixelLeft;}if(document.layers){return a.x;}}function sjGetY(a){a=sjGetElementStyle(a);if(document.getElementById){return parseInt(a.top);}if(document.all){return a.pixelTop;}if(document.layers){return a.y;}}function sjSetClip(g,c,j,e,h,a,d){g=sjGetElementStyle(g);if(document.getElementById){g.clip="rect("+e+"px "+h+"px "+a+"px "+d+"px)";}else{if(document.all){g.clip="rect("+e+"px "+h+"px "+a+"px "+d+"px)";g.pixelLeft=c;g.pixelTop=j;g.overflow="hidden";}else{if(document.layers){g.clip.top=e;g.clip.right=h;g.clip.bottom=a;g.clip.left=d;g.moveTo(c,j);}}}}function sjSetWidth(b,a){b=sjGetElementStyle(b);if(document.getElementById){b.width=parseInt(a)+"px";}else{if(document.all){b.posWidth=parseInt(a)+"px";}else{if(b.clip){b.clip.width=a;}}}}function sjSetHeight(a,b){a=sjGetElementStyle(a);if(document.getElementById){a.height=parseInt(b)+"px";}else{if(document.all){a.posHeight=parseInt(b)+"px";}else{if(a.clip){a.clip.height=b;}}}}function sjZoomMap(c,h,b){if(c){if(document.all){var k=document.all[c];if(k){var e=k.all.tags("AREA");}}else{if(document.getElementsByName){var k=document.getElementsByName(c)[0];if(k){var e=k.getElementsByTagName("AREA");}}}if(e){for(var d=0;d<e.length;d++){var g=e[d].getAttribute("coords").split(/\s*,\s*/);if(e[d].getAttribute("shape").toLowerCase()=="rect"||e[d].getAttribute("shape").toLowerCase()=="poly"){for(var j=0;j<g.length;j+=2){g[j]=Math.round(g[j]*h);g[j+1]=Math.round(g[j+1]*b);}}else{if(e[d].getAttribute("shape").toLowerCase()=="circle"){g[0]=Math.round(g[0]*h);g[1]=Math.round(g[1]*b);g[2]=Math.round(g[2]*(h<b?h:b));}}e[d].setAttribute("coords",g.join(", "));}}}}function sjResetMap(b){if(b){if(document.all){var g=document.all[b];if(g){var d=g.all.tags("AREA");}}else{if(document.getElementsByName){var g=document.getElementsByName(b)[0];if(g){var d=g.getElementsByTagName("AREA");}}}if(d){for(var c=0;c<d.length;c++){var e=d[c].getAttribute("origcoords").split(/\s*,\s*/);d[c].setAttribute("coords",e.join(", "));}}}}function sjSetLayerHTML(layer,html){if(navigator.userAgent.indexOf("MSIE 5.0")&&navigator.userAgent.indexOf("Mac")!=-1){html+="\n";}if(document.getElementById){document.getElementById(layer).innerHTML=html;}else{if(document.all){layer=eval(layer);layer.innerHTML=html;}else{if(document.layers){var doc=sjGetElementDoc(layer);doc.open();doc.writeln(html);doc.close();}}}}function sjGetLayerHTML(layer){if(document.getElementById){return document.getElementById(layer).innerHTML;}else{if(document.all){layer=eval(layer);return layer.innerHTML;}}}function sjSetXY(b,a,c){b=sjGetElementStyle(b);if(document.getElementById){b.left=parseInt(a)+"px";b.top=parseInt(c)+"px";}else{if(document.all){b.pixelLeft=parseInt(a)+"px";b.pixelTop=parseInt(c)+"px";}else{if(document.layers){b.moveTo(a,c);}}}}function sjCenter(a,b){sjSetXY(a,Math.round((width-getWidth(a)-leftMargin-rightMargin)/2)+leftMargin,b);}function sjSetCursor(d){var a=navigator.userAgent.toLowerCase();var b=(a.indexOf("msie")!=-1);var c=(a.indexOf("mac")!=-1);document.body.style.cursor=((!b||c)&&d=="hand")?"pointer":d;}function sjSetVisibility(a,b){a=sjGetElementStyle(a);if(document.layers){a.visibility=b;}else{if(a){a.visibility=b;}}}function sjGetVisibility(a){a=sjGetElementStyle(a);if(document.layers){var b=a.visibility;if(b=="show"){return"visible";}else{if(b=="hide"){return"hidden";}else{return b;}}}else{if(a){return a.visibility;}}}function sjGetZIndex(a){a=sjGetElementStyle(a);if(document.layers){return(a.zIndex);}else{if(a){return(a.zIndex);}}}function sjSetZIndex(a,b){a=sjGetElementStyle(a);if(document.layers){a.zIndex=b;}else{if(a){a.zIndex=b;}}}function sjSetBackColor(b,a){if(a.toLowerCase()=="transparent"){a="";}b=sjGetElementStyle(b);if(b.background){b.background=a;}else{if(document.layers){b.bgColor=a;}else{if(document.all||document.getElementById){b.backgroundColor=a;}}}}sjSetBackImage=function(b,a){b=sjGetElementStyle(b);if(b.background){b.background.src=a=="none"?null:a;}else{if(document.layers){b.background.src=a=="none"?null:a;}else{if(document.all||document.getElementById){b.backgroundImage=a=="none"?"none":"url("+a+")";}}}};function sjSetBorder(b,d,c,a){stl=sjGetElementStyle(b);stl.borderWidth=d+"px"||0;stl.borderStyle=c||"solid";stl.borderColor=a||"black";}function sjOpacity(a,b){if(b!=null){stl=sjGetElementStyle(a);if(b<0){b=0;}if(b>99){b=99;}stl.opacity=(b/100);stl.MozOpacity=(b/100);stl.KhtmlOpacity=(b/100);stl.filter="alpha(opacity="+b+")";return stl.opacity;}}function sjGetMouseXY(b){var a={x:0,y:0};if(document.all){a.x=event.clientX+document.body.scrollLeft;a.y=event.clientY+document.body.scrollTop;}else{a.x=b.pageX;a.y=b.pageY;}return a;}function sjGetPageCoords(a){var b={x:0,y:0};while(a){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent;}return b;}function sjGetOffsets(a){if(a){if(typeof a.offsetX!="undefined"){return{x:a.offsetX,y:a.offsetY};}else{if(a.target){if(window.opera){var b=a.target;}else{var b=a.target.nodeType==1?a.target:a.target.parentNode;}var c={x:a.clientX+window.pageXOffset,y:a.clientY+window.pageYOffset};var d=sjGetPageCoords(b);return{x:c.x-d.x,y:c.y-d.y};}}}}function sjAddObjectEvent(e,d,c,a){var e=sjGetElement(e.getElementId());if(e.addEventListener){e.addEventListener(d,c,a);return true;}else{if(e.attachEvent){var b=e.attachEvent("on"+d,c);return b;}else{alert(sj_resource.getResource("%HANDLER_COULD_NOT_BE_ATTACHED%"));}}}function sjRemoveObjEvent(e,d,c,a){var e=sjGetElement(e.getElementId());if(e.removeEventListener){e.removeEventListener(d,c,a);return true;}else{if(e.detachEvent){var b=e.detachEvent("on"+d,c);return b;}else{alert(sj_resource.getResource("%HANDLER_COULD_NOT_BE_REMOVED%"));}}}sjAddKeyHandler=function sjAddKeyHandler(b){b._keyObject=new Array();b._keyObject.keydown=new Array();b._keyObject.keyup=new Array();b._keyObject.keypress=new Array();b.addKeyDown=function(d,c){b._keyObject.keydown[d]=c;};b.removeKeyDown=function(c){b._keyObject.keydown[c]=null;};b.addKeyUp=function(d,c){b._keyObject.keyup[d]=c;};b.removeKeyUp=function(c){b._keyObject.keyup[c]=null;};b.addKeyPress=function(d,c){b._keyObject.keypress[d]=c;};b.removeKeyPress=function(c){b._keyObject.keypress[c]=null;};function a(){var c=window.event.type;var d=window.event.keyCode;if(b._keyObject[c][d]!=null){b._keyObject[c][d]();}}b.onkeypress=a;b.onkeydown=a;b.onkeyup=a;};function sjGetKey(c,a){var b=document.all?event.keyCode:a.keyCode?a.keyCode:a.charCode?a.charCode:a.which?a.which:void 0;return b;}function getScrollBarWidth(){try{var b=document.createElement("DIV");b.id="asdf";b.style.width=100;b.style.height=100;b.style.overflow="scroll";b.style.position="absolute";b.style.visibility="hidden";b.style.top="0";b.style.left="0";document.body.appendChild(b);scrollWidth=sjGetElement("asdf").offsetWidth-sjGetElement("asdf").clientWidth;document.body.removeChild(b);delete b;}catch(a){return false;}return scrollWidth;}function getRowIndex(a){return document.all?a.parentElement.rowIndex:a.parentNode.rowIndex;}function SjTextLoader(){this._id=SjTextLoader._cnt++;this.req=null;this.tid=null;this.text=null;this.IFrameDoc=null;this.first=false;this.json=false;this.counter=0;SjTextLoader.all[this._id]=this;if(document.childNodes&&document.createElement){sjCreateDiv(null,"datadiv"+this._id);var c="datadiv"+this._id;var a="loader"+this._id;var b=" <div id="+c+' style="position:absolute;visibility:hidden"><iframe src="about:blank" id='+a+" name="+a+' onload=""></iframe> </div> ';sjSetLayerHTML("datadiv"+this._id,b);}}SjTextLoader.prototype.load=function(inURL,firstLoading){if(inURL.indexOf("json")>=0){this.json=true;tljson=this;loadCtx(tljson,inURL);this.counter=0;clearInterval(this.tid);}else{this.json=false;if(!firstLoading){if(window.XMLHttpRequest){this.req=new XMLHttpRequest();eval("this.req.onreadystatechange = function() { SjTextLoader.all["+this._id+"]._onLoadText(); }");this.req.open("GET",inURL,true);this.req.send(null);}else{var elm=sjGetElement("loader"+this._id);if(elm){if(typeof elm.src!="undefined"){elm.src=inURL;}else{if(typeof elm.location!="undefined"){elm.location=inURL;}}this.tid=setInterval(this+".checkLoad()",100);}}}else{image=new Object;metadata=new Object;protocol=new Object;context=new Object;this.first=true;document.write("<script language='javascript' src='"+inURL+",javascript'><\/script>");this.tid=setInterval(this+".checkLoad()",100);}}};SjTextLoader.prototype._onLoadText=function(){if(this.req.readyState==4){if(this.req.status==200){this.text=this.req.responseText;if(this.onLoadText){this.onLoadText();}}else{alert(sj_resource.getResource("%THERE_WAS_A_PROBLEM_RETRIEVING_DATA%:\n")+this.req.statusText);}}};function dumpProps(c,a){var d="",b="";for(b in c){d+=a+"."+b+" = "+c[b]+"\n";}return d;}SjTextLoader.prototype.checkLoad=function(){if(this.first==true){if(image.rect){this.text=dumpProps(image,"image");if(metadata){this.text+=dumpProps(metadata,"metadata");}if(protocol){this.text+=dumpProps(protocol,"protocol");}if(context){this.text+=dumpProps(context,"context");}if(this.onLoadText){this.onLoadText();}this.counter=0;clearInterval(this.tid);}else{if(this.counter<100){this.counter++;}else{alert(sj_resource.getResource("%ERROR_LOADING_CONTEXT%!"));this.counter=0;clearInterval(this.tid);}}}else{var b=sjGetElement("loader"+this._id);if(b!=null){if(document.frames){if(document.frames[b.name]){this.IFrameDoc=document.frames[b.name].document;}}else{if(b.contentDocument){this.IFrameDoc=b.contentDocument;}else{if(b.contentWindow){this.IFrameDoc=b.contentWindow.document;}else{alert(sj_resource.getResource("%PROBLEMS%....."));clearInterval(this.tid);return true;}}}}var a=sjGetTextContent(this.IFrameDoc);if(a){this.text=a;if(this.onLoadText){this.onLoadText();}clearInterval(this.tid);}}};SjTextLoader.prototype.clearText=function(c){var d=c;if((d!=null)&&(d!="")){var b=d;var e=d.substring(d.indexOf("<"),d.indexOf(">")+1);var a=d.indexOf(e);while(a!=-1){b=b.substring(0,a)+""+b.substring(a+e.length);d=b;a=-1;e=d.substring(d.indexOf("<"),d.indexOf(">")+1);if(e!=""){a=d.indexOf(e);b=d;}}d=d.replace("&lt;","<");d=d.replace("&gt;",">");this.text=d;}return this.text;};SjTextLoader.prototype.toString=function(){return"SjTextLoader.all["+this._id+"]";};SjTextLoader.all=[];SjTextLoader._cnt=0;var sjCallbacks=new Object();var sjErrCallbacks=new Object();function sjGetResponse(d,c,a,h){var b="";var g=c.indexOf("?");if(g>=0){b=c+"&"+d;}else{b=c+"?"+d;}var j=sjHashCode(b);b+="&id="+j;if(typeof a!="undefined"){sjCallbacks[j]=a;}if(typeof h!="undefined"){sjErrCallbacks[j]=h;}var e=document.getElementById("sjScript_"+j);if(e){document.getElementsByTagName("head")[0].removeChild(e);}e=document.createElement("script");e.type="text/javascript";e.id="sjScript_"+j;e.src=b;if(typeof e!="undefined"){document.getElementsByTagName("head")[0].appendChild(e);}}function s7jsonResponse(b,a){sjCallbacks[a](b);}function s7jsonError(b,a){if(typeof sjErrCallbacks[a]!="undefined"){sjErrCallbacks[a](b);}else{alert(b.message);}}function sjDebug(d,a,c,b){}function sjHashCode(j){if(!j||j==""){return 1;}var b=0,e=0;for(var a=j.length-1;a>=0;a--){var k=parseInt(j.charCodeAt(a));b=((b<<6)&268435455)+k+(k<<14);if((e=b&266338304)!=0){b=(b^(e>>21));}}return b;}function loadCtx(a,b){sjGetResponse("req=ctx,json&scl=1",b,function(c){a.text=dumpProps(c,"");if(a.onLoadText){a.onLoadText();}},function(c){alert("failed loading ctx for image ["+b+"]: "+c.message);});}function addAreaToMAp(e,h,b,c,d){var a=document.getElementById(e);if(typeof a!="undefined"){var g=document.createElement("area");g.shape=h;g.coords=b;g.href=c;g.alt=d;g.title=d;g.setAttribute("origcoords",g.coords);if(typeof g!="undefined"){a.appendChild(g);}}}function loadMap(a,d,c,b){sjGetResponse("req=map,json&scl=1",a,function(j){var e=document.getElementById("s7map_"+b);if(j!=null){if((typeof e!="undefined")&&(e!=null)){for(var g=e.childNodes.length-1;g>=0;g--){e.removeChild(e.childNodes[g]);}for(var h=0;h<j.length;h++){addAreaToMAp("s7map_"+b,j[h].shape,j[h].coords,j[h].href,j[h].alt);}sjResetMap("s7map_"+b);sjZoomMap("s7map_"+b,d,c);}}else{if(typeof e!="undefined"){for(var g=e.childNodes.length-1;g>=0;g--){e.removeChild(e.childNodes[g]);}}}},function(e){alert("failed loading map for image ["+a+"]: "+e.message);});}function SjHashtable(){this.hashtable=new Array();}SjHashtable.prototype.clear=function(){this.hashtable=new Array();for(var a in this.hashtable){this.remove(a);}};SjHashtable.prototype.containsKey=function(b){var c=false;for(var a in this.hashtable){if(a==b&&this.hashtable[a]!=null){c=true;break;}}return c;};SjHashtable.prototype.indexOfKey=function(c){var a=-1;var d=false;for(var b in this.hashtable){a++;if(b==c){if(this.hashtable[b]!=null){d=true;break;}}}return d?a:-1;};SjHashtable.prototype.containsValue=function(c){var b=false;if(c!=null){for(var a in this.hashtable){if(this.hashtable[a]==c){b=true;break;}}}return b;};SjHashtable.prototype.indexOfValue=function(d){var a=-1;var c=false;if(d!=null){for(var b in this.hashtable){a++;if(this.hashtable[b]==d){c=true;break;}}}return c?a:-1;};SjHashtable.prototype.get=function(a){return this.hashtable[a];};SjHashtable.prototype.isEmpty=function(){return(this.size==0)?true:false;};SjHashtable.prototype.keys=function(){var b=new Array();for(var a in this.hashtable){if(this.hashtable[a]!=null){b.push(a);}}return b;};SjHashtable.prototype.put=function(a,b){if(a==null||b==null){throw"NullPointerException {"+a+"},{"+b+"}";}else{this.hashtable[a]=b;}};SjHashtable.prototype.remove=function(a){var b=this.hashtable[a];this.hashtable[a]=null;return b;};SjHashtable.prototype.size=function(){var b=0;for(var a in this.hashtable){if(this.hashtable[a]!=null){b++;}}return b;};SjHashtable.prototype.toString=function(){var a="";for(var b in this.hashtable){if(this.hashtable[b]!=null){a+="{"+b+"},{"+this.hashtable[b]+"}\n";}}return a;};SjHashtable.prototype.values=function(){var a=new Array();for(var b in this.hashtable){if(this.hashtable[b]!=null){a.push(this.hashtable[b]);}}return a;};function SjElement(b,a){if(arguments[0]=="empty"){return;}this._parent=b||self;this.window=(b&&b.window)||self;this.document=(b&&b.document)||self.document;this.name=this._elementId=a||"SjElement"+parseInt(SjElement.Count++);this.tag=null;this._x=0;this._y=0;this._z=0;this._width=0;this._height=0;this._visible=false;this._opacity=100;this._fadeTime=2000;this._color="";this._backColor="";this._backImage="";this._fadeid=null;this._content=sjGetElement(this._elementId);if(this._content){this._content._draggable=false;}SjElement.all[this._elementId]=this;}SjElement.prototype.getParent=function(){return this._parent;};SjElement.prototype.getElementId=function(){return this._elementId;};SjElement.prototype.getElement=function(){return sjGetElement(this._elementId);};SjElement.prototype.toString=function(){return'SjElement.all["'+this._elementId+'"]';};SjElement.prototype.visible=function(a){var b=sjGetElementStyle(this._elementId);if(a!=null&&b){this._visible=a;if(a){b.visibility="inherit";}else{b.visibility="hidden";}}return this._visible;};SjElement.prototype.pageXY=function(){return sjGetPageCoords(sjGetElement(this._elementId));};SjElement.prototype.left=function(a){if(a==null){return this._x;}else{if(document.getElementById){this._content.style.left=parseInt(a)+"px";}else{if(document.all){this._content.style.pixelLeft=parseInt(a)+"px";}else{if(document.layers){this._content.moveTo(parseInt(a),parseInt(inY));}}}this._x=parseInt(a);return this._x;}};SjElement.prototype.top=function(a){if(a==null){return this._y;}else{if(document.getElementById){this._content.style.top=parseInt(a)+"px";}else{if(document.all){this._content.style.pixelTop=parseInt(a)+"px";}else{if(document.layers){this._content.moveTo(parseInt(inX),parseInt(a));}}}this._y=parseInt(a);return this._y;}};SjElement.prototype.toXY=function(c,a){var b={x:this.left(c),y:this.top(a)};this.fireEvent("setXY");return b;};SjElement.prototype.width=function(a){if(a==null){return this._width;}else{if(document.getElementById){this._content.style.width=a+"px";}else{if(document.all){this._content.style.posWidth=a+"px";}else{if(layer.clip){this._content.clip.width=a;}}}this._width=a;return this._width;}};SjElement.prototype.height=function(a){if(a==null){return this._height;}else{if(document.getElementById){this._content.style.height=a+"px";}else{if(document.all){this._content.style.posHeight=a+"px";}else{if(layer.clip){this._content.clip.height=a;}}}this._height=a;return this._height;}};SjElement.prototype.setSize=function(a,c){var b={w:this.width(a),h:this.height(c)};this.fireEvent("setSize");return b;};SjElement.prototype.clip=function(b,e,a,d){var c=sjGetElementStyle(this._elementId);var g=parseInt(c.borderWidth);if(g){sjSetClip(this._elementId,this._x,this._y,e,a+2*g,d+2*g,b);}else{sjSetClip(this._elementId,this._x,this._y,e,a,d,b);}};SjElement.prototype.setBorder=function(c,b,a){stl=sjGetElementStyle(this._elementId);stl.borderWidth=c+"px"||0;stl.borderStyle=b||"solid";stl.borderColor=a||"#000000";};SjElement.prototype.getBorder=function(){stl=sjGetElementStyle(this._elementId);return parseInt(stl.borderWidth);};SjElement.prototype.opacity=function(b){if(b!=null){var a=sjGetElement(this._elementId);if(b<0){b=0;}if(b>99){b=99;}a.style.opacity=(b/100);a.style.MozOpacity=(b/100);a.style.KhtmlOpacity=(b/100);a.style.filter="alpha(opacity="+b+")";this._opacity=b;}};SjElement.prototype.zIndex=function(a){if(a==null){return this._z;}else{sjSetZIndex(this._elementId,a);this._z=a;return sjGetZIndex(this._elementId);}};SjElement.prototype.setFadeTime=function(a){this._fadeTime=a;};SjElement.prototype.fadeIn=function(a){if(this._fadeid){clearTimeout(this._fadeid);this._fadeid=null;}this._opacity=0;this.fadeStartTime=new Date().getTime();this.fadeStartOpacity=this._opacity;this.fadeTo(99,a);};SjElement.prototype.fadeOut=function(a){if(this._fadeid){clearTimeout(this._fadeid);this._fadeid=null;}this._opacity=99;this.fadeStartTime=new Date().getTime();this.fadeStartOpacity=this._opacity;this.fadeTo(0,a);};SjElement.prototype.fadeTo=function(d,a){if(this._opacity==null){return;}var b=new Date().getTime()-this.fadeStartTime;if(b>=a){this.opacity(d);this.visible((this._opacity>0)?true:false);clearTimeout(this._fadeid);this._fadeid=null;if(this.afterFade){this.afterFade();}return;}else{var c=Math.round(this.fadeStartOpacity+(d-this.fadeStartOpacity)*b/a);this.opacity(c);this.visible((this._opacity>0)?true:false);this._fadeid=setTimeout(this+".fadeTo("+d+","+a+")",5);}};SjElement.prototype.color=function(a){if(a==null){return this._color;}else{sjSetBackColor(this._elementId,a);this._color=a;return this._color;}};SjElement.prototype.background=function(a,b){if(a){this._backColor=a;}if(b){this._backImage=b;}};SjElement.prototype.addEventHandler=function(b,c){var d=this;var a=0;var e=0;this._content=sjGetElement(this._elementId);this._content["on"+b.toLowerCase()]=function(g){if(!g){var g=window.event;}var h=null;if(g.target){h=(g.target.nodeType==3)?g.target.parentNode:g.target;}else{h=g.srcElement;}if(g.modifiers){g.shiftKey=((g.modifiers&Event.SHIFT_MASK)!=0);g.altKey=((g.modifiers&Event.ALT_MASK)!=0);g.ctrlKey=((g.modifiers&Event.CONTROL_MASK)!=0);g.button=g.which;g.keyCode=g.which;}if(g.pageX||g.pageY){g.posx=g.pageX;g.posy=g.pageY;}else{if(g.clientX||g.clientY){g.posx=g.clientX+document.body.scrollLeft;g.posy=g.clientY+document.body.scrollTop;}}return c(d,g,h);};};SjElement.prototype.removeEventHandler=function(a,b){if(document.layers){this.releaseEvents(Event[a.toUpperCase()]);delete this._content[Event[a.toUpperCase()]];}this._content["on"+a.toLowerCase()]=null;};SjElement.prototype.makeEventObject=function(a){var b=new Object();b.type=a[0];b.target=this;for(i=1;i<a.length;i+=2){b[a[i]]=a[i+1];}return b;};SjElement.prototype.addEventListener=function(d,c){d=d.toLowerCase();if(!this.hashtable_eventlisteners){this.hashtable_eventlisteners=new SjHashtable();}var b=this.hashtable_eventlisteners.get(d);if(!b){b=new Array();this.hashtable_eventlisteners.put(d,b);}var a=this.indexOfEventListener(d,c);if(a==-1){b.push(c);}};SjElement.prototype.removeEventListener=function(g,e){g=g.toLowerCase();if(this.hashtable_eventlisteners){var d=this.hashtable_eventlisteners.get(g);if(d){var a=this.indexOfEventListener(g,e);if(a!=-1){var c=new Array();for(var b=0;b<d.length;b++){if(d[b]!=e){c.push(d[b]);}}this.hashtable_eventlisteners.put(g,c);}}}};SjElement.prototype.fireEventObject=function(a){if(this.hashtable_eventlisteners&&this.hashtable_eventlisteners.size()>0){var c=this.hashtable_eventlisteners.get(a.type.toLowerCase());if(c){var b;for(b=0;b<c.length;b++){c[b](a);}}}};SjElement.prototype.fireEvent=function(){var a=this.makeEventObject(arguments);this.fireEventObject(a);};SjElement.prototype.indexOfEventListener=function(e,d){var a=-1;e=e.toLowerCase();var b;if(this.hashtable_eventlisteners){var c=this.hashtable_eventlisteners.get(e);if(c){for(b=0;b<c.length;b++){if(c[b]==d){a=b;break;}}}}return a;};SjElement.Count=0;SjElement.all=[];function SjLayer(b,a){if(arguments[0]=="empty"){return;}this.SjElement=SjElement;this.SjElement(b,a);if(this._parent&&this._parent._elementId){sjCreateDiv(this._parent._elementId,this._elementId);}else{sjCreateDiv(null,this._elementId);}this._content=sjGetElement(this._elementId);}SjLayer.prototype=new SjElement("empty");function SjPicture(e,c,b,d,a){if(arguments[0]=="empty"){return;}this.SjElement=SjElement;this.SjElement(e,c);if(this._parent&&this._parent._elementId){sjCreateDiv(this._parent._elementId,this._elementId);}else{sjCreateDiv(null,this._elementId);}if(typeof tsj!="undefined"){this.codePath=tsj.path;}else{if(typeof sj!="undefined"){this.codePath=sj.path;}else{this.codePath="../dhtml/";}}this.transparency=a||false;this._imageWidth=0;this._imageHeight=0;this._stretch=false;this.scale=1;this.loaded=false;this.img=new Image();this.img._uId=this._elementId+"_img";this.img.src="";this.img.str=" <img";this.img.str+=" id="+this.img._uId;this.img.str+=" name="+this.img._uId;this.img.str+=" border="+0;this.img.str+=' style="position:absolute;left:0;top:0;"';this.img.str+="> ";sjSetLayerHTML(this._elementId,this.img.str);this._content=sjGetElement(this._elementId);this.imageElm=sjGetElement(this.img._uId);this.imageElm._parent=this;this.useMap="";this.imageElm.useMap="";this.img._parent=this;}SjPicture.prototype=new SjElement("empty");SjPicture.prototype.load=function(inURL){if(inURL==this.img.src){if(this.loaded==true){eval("document."+this.img._uId+".onload=this.onLoad;");eval("document."+this.img._uId+".style.width=this._imageWidth;");eval("document."+this.img._uId+".style.height=this._imageHeight;");eval("document."+this.img._uId+".onload();");}return;}this.loaded=false;if(document.all){sjGetElement(this.img._uId).outerHTML=this.img.str;this.imageElm=sjGetElement(this.img._uId);this.imageElm._parent=this;this.img._parent=this;}else{eval("document."+this.img._uId+".style.width=null;");eval("document."+this.img._uId+".style.height=null;");}this.img.src=inURL;eval("document."+this.img._uId+".onload=this.onLoad;");eval("document."+this.img._uId+".onerror=this.onError;");eval("document."+this.img._uId+".onabort=this.onAbort;");eval("document."+this.img._uId+".src = inURL;");this.imageElm.useMap=this.useMap;};SjPicture.prototype.onLoad=function(){this._parent.loaded=true;this._parent._imageWidth=this.width;this._parent._imageHeight=this.height;this._parent.stretch(this._parent.stretch());var l=parseFloat(navigator.appVersion.split("MSIE")[1]);var h=null;if((l>=5.5)&&(l<8)){try{h=document.body.filters;}catch(k){}}if((l>=5.5)&&(l<8)&&(h!=null)){var g=this;var n=this.src.toUpperCase();if(this._parent.transparency){var j=(g.id)?"id='"+g.id+"' ":"";var n=(g.name)?"name='"+g.name+"' ":"";var b=(g.border)?"border='"+g.border+"' ":"";var m="display:inline-block;"+g.style.cssText;var d=(g.title)?"title='"+g.title+"' ":"title='"+g.alt+"' ";var c=(g.alt)?"alt='"+g.alt+"' ":"alt='"+g.alt+"' ";if(g.useMap){strAddMap='<img style="position:relative; left:-'+g.width+"px;height:"+g.height+"px;width:"+g.width+'" src="'+this._parent.codePath+'images/spacer.gif" usemap="'+g.useMap+'" border="'+g.border+'">';}var a="<img "+j+n+d+c+b+" src="+this._parent.codePath+'images/spacer.gif style="'+m+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g.src+"', sizingMethod='scale');\">";if(g.useMap){a+=strAddMap;}g.outerHTML=a;}}this._parent.fireEvent("load");};SjPicture.prototype.onError=function(){this._parent.loaded=false;this._parent.fireEvent("error");};SjPicture.prototype.onAbort=function(){this._parent.loaded=false;this._parent.fireEvent("abort");};SjPicture.prototype.stretch=function(c){if(c!=null){this._stretch=c;var a=this.width();var b=this.height();if(this._stretch){sjSetWidth(this.img._uId,this._width);sjSetHeight(this.img._uId,this._height);}else{sjSetWidth(this.img._uId,this._imageWidth);sjSetHeight(this.img._uId,this._imageHeight);}sjZoomMap(this.imageElm.useMap.substring(1),this.width()/a,this.height()/b);}return this._stretch;};SjPicture.prototype.super_width=SjPicture.prototype.width;SjPicture.prototype.width=function(b){var a=this.super_width();var d=this.super_height();var c=this.super_width(b);if(b!=null){if(this._stretch){sjSetWidth(this.img._uId,this._width);sjSetHeight(this.img._uId,this._height);}sjZoomMap(this.imageElm.useMap.substring(1),this.width()/a,this.height()/d);}return c;};SjPicture.prototype.super_height=SjPicture.prototype.height;SjPicture.prototype.height=function(d){var a=this.super_width();var c=this.super_height();var b=this.super_height(d);if(d!=null){if(this._stretch){sjSetWidth(this.img._uId,this._width);sjSetHeight(this.img._uId,this._height);}sjZoomMap(this.imageElm.useMap.substring(1),this.width()/a,this.height()/c);}return b;};SjPicture.prototype.map=function(a){if(a!=null){this.imageElm.useMap=this.useMap="#"+a;}else{return this.imageElm.useMap;}};SjPicture.prototype.clearMap=function(){this.imageElm.useMap=this.useMap="";};function SjZoomNav(e,c,d,b,g,a){this.SjElement=SjElement;if((typeof g=="undefined")){g="izNav";}if(sjGetElement(g)){this.SjElement(sjGetElement(g),null);if(this._parent){sjCreateDiv(sjGetElement(g),this._elementId);}else{sjCreateDiv(null,this._elementId);}this.elem=sjGetElement(this._elementId);this.elem._elementId=this._elementId;this._content=sjGetElement(this._elementId);this.setSize(sjGetElement(g).offsetWidth||50,sjGetElement(g).offsetHeight||50);sjSetWidth(g,this.width());sjSetHeight(g,this.height());this.toXY(0,0);}else{this.SjElement(e,null);if(this._parent&&this._parent._elementId){sjCreateDiv(this._parent._elementId,this._elementId);}else{sjCreateDiv(null,this._elementId);}this.elem=sjGetElement(this._elementId);this.elem._elementId=this._elementId;this._content=sjGetElement(this._elementId);this.setSize(c||50,d||50);}this.transparency=a;this.navObj=null;this.dblnavImage=new SjPicture(this.elem,null,null,null,this.transparency);this.dblnavImage.setSize(c||50,d||50);this.dblnavImage.visible(false);this.navImage=new SjPicture(this.elem,null,null,null,this.transparency);this.navImage.visible(false);sjSetBorder(this._elementId,1,"solid","#666666");this.navImage.setSize(c||50,d||50);this.dragImage=new SjLayer(this);this.dragImage.zIndex(100);this.dragImage.visible(false);this.dragImage.setSize(c||50,d||50);this.borderWidth=2;this.borderColor="#ff0000";var h="<img id="+this.dragImage._elementId+'_img  src="" style="left:2px;top:2px;width:'+this.dragImage.width()+"px;height:"+this.dragImage.height()+'px;">';sjSetLayerHTML(this.dragImage._elementId,h);sjGetElementStyle(this.dragImage._elementId+"_img").border="#ff0000 2px solid";this.visible(false);this.position=b||"absolute";if(this.position=="absolute"){sjGetElementStyle(this._elementId).position="absolute";}else{}this.initialLoading=true;}SjZoomNav.prototype=new SjElement();SjZoomNav.prototype.setViewer=function(a){this.navObj=a;if(this.navObj){this.navObj.navLayer=this;sjGetElement(this.dragImage._elementId+"_img").src=this.navObj.codePath+"images/spacer.gif";this.initHandlers();if((this.navObj.navloadURL)&&(this.navObj.imgServerWidth)&&(this.navObj.imgServerHeight)){this.navObj.navDefaultScl=Math.max(Math.max(this.navObj.imgServerWidth/(this.width()-5),this.navObj.imgServerHeight/(this.height()-5)),1);this.navObj.navloadURL+="&scl="+(this.navObj.navDefaultScl)+this.navObj.idStr;this.dblnavImage.load(this.navObj.navloadURL);}}};SjZoomNav.prototype.update=function(a,k,b,d){if(this.navObj){this.navObj.navigatorScl=Math.max(b/this.navImage.width(),d/this.navImage.height());var g=Math.max(-a/this.navObj.navigatorScl,0);var e=Math.max(-k/this.navObj.navigatorScl,0);this.dragImage.toXY(g+this.navImage.left(),e+this.navImage.top());var j=Math.min(this.navObj.width()/this.navObj.navigatorScl,this.navImage.width());var c=Math.min(this.navObj.height()/this.navObj.navigatorScl,this.navImage.height());this.dragImage.setSize(j,c);sjGetElementStyle(this.dragImage._elementId+"_img").width=parseInt(((this.dragImage.width()-this.borderWidth*2)<1?1:(this.dragImage.width()-this.borderWidth*2)))+"px";sjGetElementStyle(this.dragImage._elementId+"_img").height=parseInt(((this.dragImage.height()-this.borderWidth*2)<1?1:(this.dragImage.height()-this.borderWidth*2)))+"px";}};SjZoomNav.prototype.moving=false;SjZoomNav.prototype.startDrag=false;SjZoomNav.prototype.initHandlers=function(){var b=this;var a=this.navObj;this.dblnavImage.addEventListener("load",function(){var c=1;b.dblnavImage.stretch(true);b.dblnavImage.setSize(b.dblnavImage.img.width*c,b.dblnavImage.img.height*c);b.dblnavImage.toXY((b.width()-b.dblnavImage.width())/2,(b.height()-b.dblnavImage.height())/2);b.dblnavImage.visible(true);b.navImage.load(b.dblnavImage.img.src);return false;});this.navImage.addEventListener("load",function(){var c=1;b.navImage.stretch(true);b.navImage.setSize(b.navImage.img.width*c,b.navImage.img.height*c);b.navImage.toXY((b.width()-b.navImage.width())/2,(b.height()-b.navImage.height())/2);b.dragImage.setSize(b.navImage.width(),b.navImage.height());var e=(b.navImage.width()-b.dragImage.width())/2;var d=(b.navImage.height()-b.dragImage.height())/2;b.dragImage.toXY(e+b.navImage.left(),d+b.navImage.top());sjGetElementStyle(b.dragImage._elementId+"_img").width=parseInt(((b.dragImage.width()-b.borderWidth*2)<1?1:(b.dragImage.width()-b.borderWidth*2)))+"px";sjGetElementStyle(b.dragImage._elementId+"_img").height=parseInt(((b.dragImage.height()-b.borderWidth*2)<1?1:(b.dragImage.height()-b.borderWidth*2)))+"px";b.dragImage.visible(true);if(b.navObj){if(!b.initialLoading){if(b.dblnavImage.loaded){b.dblnavImage.fadeOut(b.navObj.turnTime/2);}b.navImage.fadeIn(b.navObj.turnTime/2);b.navImage.visible(true);}else{b.navImage.visible(true);b.dblnavImage.visible(false);}}b.initialLoading=false;return false;});this.dragImage.addEventHandler("mousedown",function(d,c){a.storeImagesXY();ex=c.posx;ey=c.posy;b.startDrag=true;sjSetCursor("hand");return false;});this.dragImage.addEventHandler("mousemove",function(g,c){if(b.startDrag){b.moving=true;var e=c.posx-ex;var d=c.posy-ey;a.setPosition(a.backImage,a.bx-e*a.navigatorScl,a.by-d*a.navigatorScl,a.currentScl);a.foreImage.left(a.currentX-a.bx+a.fx);a.foreImage.top(a.currentY-a.by+a.fy);}return false;});this.dragImage.addEventHandler("mouseup",function(d,c){if(b.moving){b.moving=false;a.updateForeImage();}else{if(c.ctrlKey){}else{}}b.startDrag=false;sjSetCursor("default");return false;});this.navImage.addEventHandler("mousedown",function(d,c){a.storeImagesXY();ex=c.posx;ey=c.posy;b.startDrag=true;sjSetCursor("hand");return false;});this.navImage.addEventHandler("mousemove",function(g,c){if(b.startDrag){b.moving=true;var e=c.posx-ex;var d=c.posy-ey;a.setPosition(a.backImage,a.bx-e*a.navigatorScl,a.by-d*a.navigatorScl,a.currentScl);a.foreImage.left(a.currentX-a.bx+a.fx);a.foreImage.top(a.currentY-a.by+a.fy);}return false;});this.navImage.addEventHandler("mouseup",function(d,c){if(b.moving){b.moving=false;a.updateForeImage();}else{if(c.ctrlKey){}else{}}b.startDrag=false;sjSetCursor("default");return false;});this.addEventHandler("mouseout",function(d,c){if(b.moving){b.moving=false;a.updateForeImage();}else{if(c.ctrlKey){}else{}}b.startDrag=false;sjSetCursor("default");return false;});};SjZoomNav.prototype.setBorder=function(a,b){if((b.indexOf("#")==-1)&&((b.indexOf("0x")==-1))){b="#"+b;}else{if(b.indexOf("0x")!=-1){b=b.replace("0x","#");}}this.borderColor=b||"#ff0000";this.borderWidth=parseInt(a)||2;sjGetElementStyle(this.dragImage._elementId+"_img").border=""+this.borderColor+" "+parseInt(this.borderWidth)+"px solid";sjGetElementStyle(this.dragImage._elementId+"_img").width=parseInt(((this.dragImage.width()-this.borderWidth*2)<1?1:(this.dragImage.width()-this.borderWidth*2)))+"px";sjGetElementStyle(this.dragImage._elementId+"_img").height=parseInt(((this.dragImage.height()-this.borderWidth*2)<1?1:(this.dragImage.height()-this.borderWidth*2)))+"px";};function SjZoom(j,c,b,d,e,g,a,h){this.SjElement=SjElement;this.SjElement(j,null);if(this._parent&&this._parent._elementId){sjCreateDiv(this._parent._elementId,this._elementId);}else{sjCreateDiv(null,this._elementId);}this._content=sjGetElement(this._elementId);if(typeof tsj!="undefined"){this.codePath=tsj.path;}else{if(typeof sj!="undefined"){this.codePath=sj.path;}else{this.codePath="../dhtml/";}}this.mainURL=c||this.codePath+"images/spacer.gif";this.foreURL=null;this.loadURL=null;this.waitIconURL=null;this.imgFolder=this.codePath+"images/default/";this.viewSize={width:b||200,height:d||200};this.currentX=null;this.currentY=null;this.initialScl=1;this.defaultScl=1;this.currentScl=1;this.lastScl=1;this.nextScl=1;this.prevScl=1;this.imgServerWidth=null;this.imgServerHeight=null;this.prevImgServerWidth=null;this.prevImgServerHeight=null;this.initialLoading=true;this.changingImage=false;this.initRGNZone=null;this.RGNtype="rgna";this.format="jpeg";this.cachingModel="on,off";this.infotxt="";this.buttonSpace=0;this.buttonOffset=0;this.imgBorder=0;this.tileSize={width:128,height:128};this.panStep=128;this.maxWait=15000;this.max_zoom=100;this.zoom_factor=2;this.transitionTime=500;this.fadeTime=150;this.magnifier={width:150,height:150,factor:2,st:true};this.navInfo={pos:1,x:5,y:5,width:75,height:75};this.spinnerCou=0;this.orig_max_zoom=5;this.totalzoom=1;this.zoom_factor_limit=0;this.waitIconTimer={showDelay:3000,hideDelay:100};this.waitIconTimerId=null;this.panPercision=3;this.curZoomPower=0;this.navigatorScl;this.withNav=e||false;this.withMagnifier=g||false;this.closebutton_w=20;this.closebutton_h=20;this.closebutton_x=5;this.closebutton_y=5;this.closebutton_pos=0;this.setSize(this.viewSize.width,this.viewSize.height);this.clip(0,0,this.viewSize.width+2,this.viewSize.height+2);this.transparency=h||false;this.navLayer=null;this.foreImage=new SjPicture(this,"foreImage"+this._elementId,null,null,this.transparency);this.foreImage.visible(false);this.foreImage.setSize(this.viewSize.width,this.viewSize.height);this.foreImage.stretch(true);this.foreImage.zIndex(this.zIndex()+1);this.foreImage.afterFade=function(){this._parent.checkPendingChangeContext();};this.backImage=new SjPicture(this,"backImage"+this._elementId,null,null,this.transparency);this.backImage.visible(false);this.backImage.setSize(this.viewSize.width,this.viewSize.height);this.backImage.stretch(true);this.mapImage=new SjPicture(this,"mapImage"+this._elementId);this.mapImage.visible(false);this.mapImage.setSize(this.viewSize.width,this.viewSize.height);this.mapImage.stretch(true);this.mapImage.zIndex(this.foreImage.zIndex()+1);this.mapImage.load(this.codePath+"images/spacer.gif");this.waitIcon=new SjPicture(this,"waitIcon"+this._elementId);this.waitIcon.visible(false);this.waitIcon.zIndex(this.foreImage.zIndex()+1);this.waitIcon.setSize(10,10);this.closeButton=new SjPicture(this._parent,"closeButton"+this._elementId);this.plusButton=new SjPicture(this._parent,"plusButton"+this._elementId);this.minusButton=new SjPicture(this._parent,"minusButton"+this._elementId);this.resetButton=new SjPicture(this._parent,"resetButton"+this._elementId);this.infoButton=new SjPicture(this._parent,"infoButton"+this._elementId);this.closeButton.zIndex(this.foreImage.zIndex()+10);this.plusButton.zIndex(this.foreImage.zIndex()+10);this.minusButton.zIndex(this.foreImage.zIndex()+10);this.resetButton.zIndex(this.foreImage.zIndex()+10);this.infoButton.zIndex(this.foreImage.zIndex()+10);this.closeButton.setSize(20,20);this.plusButton.setSize(20,20);this.minusButton.setSize(20,20);this.resetButton.setSize(20,20);this.infoButton.setSize(20,20);this.closeButton.visible(false);this.plusButton.visible(false);this.minusButton.visible(false);this.resetButton.visible(false);this.infoButton.visible(false);this.visible(true);this.stack=null;this.state="create";this.oldImage=null;this.currentRGN=null;this.pendingChangeContext=null;this.currentCrop=null;this.alignX=0;this.alignY=0;this.broshure=null;this.navloadURL=null;this.navDefaultScl=1;this.clickToZoom=true;this.zoomSclArray=new Array();this.zoomIdx=null;this.zoomScl=false;this.enableZoom=true;this.hotSpotEnable=false;this.oimgLabel="";this.imgLabel="";this.turnTime=150;}SjZoom.prototype=new SjElement();SjZoom.prototype.initialising=function(k,j,d,e){this.defaultScl=this.initialScl=Math.max(Math.max(this.imgServerWidth/this.viewSize.width,this.imgServerHeight/this.viewSize.height),1);if(e!=null){this.defaultScl=this.initialScl=e;}this.bgImgScl=this.defaultScl;if(d==null){this.currentScl=this.defaultScl;}else{var g=scl1=Math.max(this.imgServerWidth/this.viewSize.width,this.imgServerHeight/this.viewSize.height);var a=scl0=Math.max(this.prevImgServerWidth/this.viewSize.width,this.prevImgServerHeight/this.viewSize.height);g=Math.max(g,1);a=Math.max(a,1);var l=Math.pow(this.zoom_factor,this.max_zoom);var c=g/l;var b=a/l;d=d*c/b;this.currentScl=d;}this.defaultX=(this.viewSize.width-this.imgServerWidth/this.defaultScl)/2;if(k==null){this.currentX=(this.viewSize.width-this.imgServerWidth/this.currentScl)/2;}else{this.currentX=k;}this.defaultY=(this.viewSize.height-this.imgServerHeight/this.defaultScl)/2;if(j==null){this.currentY=(this.viewSize.height-this.imgServerHeight/this.currentScl)/2;}else{this.currentY=j;}if(!this.zoomScl){this.zoomSclArray=new Array();for(var h=0;h<=this.max_zoom;h++){this.zoomSclArray.push(this.defaultScl/Math.pow(this.zoom_factor,h));}}this.idStr="";if(this.imageVersion){this.idStr="&id="+this.imageVersion;}this.loadURL=this.navloadURL=this.mainURL+sjPBreak(this.mainURL)+"rgn="+Math.round(0)+","+Math.round(0)+","+Math.round(this.imgServerWidth)+","+Math.round(this.imgServerHeight);this.loadURL+="&scl="+(this.bgImgScl)+this.idStr;this.backImage.visible(false);this.backImage.load(this.loadURL);if(this.navLayer){this.navDefaultScl=Math.max(Math.max(this.imgServerWidth/(this.navLayer.width()-5),this.imgServerHeight/(this.navLayer.height()-5)),1);this.navloadURL+="&scl="+(this.navDefaultScl)+this.idStr;this.navLayer.navImage.visible(false);this.navLayer.dblnavImage.visible(false);this.navLayer.dblnavImage.load(this.navloadURL);}};SjZoom.prototype.changeContext=function(l,k,g,c,d,h,j,a,b){this.oldImage=this.mainURL;this.currentHost=location.host;var m=new SjURL(l);if(!this.initialLoading){if(this.changingImage||(!this.foreImage.loaded)||(this.foreImage._fadeid!=null)||(this._animeid)){this.pendingChangeContext={url:l,x:k,y:g,scale:c,defaultScl:d,width:h,height:j,version:a,pageId:b};return;}else{if(l==this.mainURL){return;}tTime=(new Date()).getTime();this.changingImage=true;}}if((h)&&(j)){this.prevImgServerWidth=this.imgServerWidth;this.prevImgServerHeight=this.imgServerHeight;this.imgServerWidth=h;this.imgServerHeight=j;if(a){this.imageVersion=a;}else{this.imageVersion=null;}if(b){this.pageId=b;}else{this.pageId="page0";}this.mainURL=mainURL=l;this.initialising(k,g,c,d);this.state="changeContext";this.fireEvent("endZoom");}else{if((this.currentHost!=(m.host+""+m.port))&&(m.host!="")&&(!this.initialLoading)){this.prevImgServerWidth=this.imgServerWidth;this.prevImgServerHeight=this.imgServerHeight;if(a){this.imageVersion=a;}else{this.imageVersion=null;}if(b){this.pageId=b;}else{this.pageId="page0";}this.mainURL=mainURL=l;this.initialising(k,g,c,d);this.state="changeContext";this.fireEvent("endZoom");}else{if(b){this.pageId=b;}else{this.pageId="page0";}var n=l+sjPBreak(l)+"req=ctx,json";var e=null;e=new SjTextLoader();e.parent=this;e.onLoadText=function(){if(e.clearText(e.text)!=null){var s=sjGetKeyValue(e.text,"image.rect");var p=s.split(",");var q=p[2];var o=p[3];var r=sjGetKeyValue(e.text,"image.version");var t=sjGetKeyValue(e.text,"metadata.version");this.parent.prevImgServerWidth=this.parent.imgServerWidth;this.parent.prevImgServerHeight=this.parent.imgServerHeight;this.parent.imgServerWidth=q;this.parent.imgServerHeight=o;if(r){this.parent.imageVersion=r;}else{this.parent.imageVersion=null;}if(t){this.parent.metaVersion=t;}else{this.parent.metaVersion=null;}this.parent.mainURL=mainURL=l;this.parent.initialising(k,g,c,d);this.parent.state="changeContext";this.parent.fireEvent("endZoom");}return false;};if(this.initialLoading){e.load(n,true);}else{e.load(n,false);}}}};SjZoom.prototype.checkPosition=function(a,h,e){var g=a;var d=h;var c=this.imgServerWidth/e/2;var b=this.imgServerHeight/e/2;if(g<(this.viewSize.width-this.imgServerWidth/e)){g=(this.viewSize.width-this.imgServerWidth/e);}if(d<(this.viewSize.height-this.imgServerHeight/e)){d=(this.viewSize.height-this.imgServerHeight/e);}if(this.viewSize.width>this.imgServerWidth/e){g=(this.viewSize.width-this.imgServerWidth/e)/2+(this.alignX*c);if(g+this.imgServerWidth/e>this.viewSize.width){g=(this.viewSize.width-this.imgServerWidth/e);}if(g<0){g=0;}}else{if(g>0){g=0;}}if(this.viewSize.height>this.imgServerHeight/e){d=(this.viewSize.height-this.imgServerHeight/e)/2+(this.alignY*b);if(d+this.imgServerHeight/e>this.viewSize.height){d=(this.viewSize.height-this.imgServerHeight/e);}if(d<0){d=0;}}else{if(d>0){d=0;}}return({nx:g,ny:d});};SjZoom.prototype.setPosition=function(b,a,j,g){var d=b.left();var c=b.top();var h=this.checkPosition(a,j,g).nx;var e=this.checkPosition(a,j,g).ny;this.currentX=b.left(h);this.currentY=b.top(e);this.fireEvent("setPosition");if(this.navLayer){this.navLayer.update(this.currentX,this.currentY,this.backImage.width(),this.backImage.height());}sjResetMap("s7map_"+this._elementId);sjZoomMap("s7map_"+this._elementId,1/this.currentScl,1/this.currentScl);return({ox:d,oy:c,nx:h,ny:e});};SjZoom.prototype._animeid=null;SjZoom.prototype.func=new Function();SjZoom.prototype.animFix=function(d,j,h,l,a,e){if(this._animeid){clearTimeout(this._animeid);this._animeid=null;}var g=this.currentScl;var m=parseInt(this.currentX);var k=parseInt(this.currentY);var c=parseInt(this.checkPosition(j,h,l).nx);var b=parseInt(this.checkPosition(j,h,l).ny);this.zoomStartTime=new Date().getTime();if((m!=c)||(k!=b)||(g!=l)||(!this.foreImage.loaded)){if(this.foreImage._fadeid){clearTimeout(this.foreImage._fadeid);this.foreImage._fadeid=null;this.checkPendingChangeContext();}this.foreImage.visible(false);this.mapImage.visible(false);sjSetCursor("wait");this.requestShowWaitIcon();this.animFixTo(d,m,k,c,b,g,l,a,e);}else{if(this.foreImage._fadeid){clearTimeout(this.foreImage._fadeid);this.foreImage._fadeid=null;this.checkPendingChangeContext();}this.foreImage.visible(true);this.mapImage.visible(true);sjSetCursor("default");this.requestHideWaitIcon();}};SjZoom.prototype.animFixTo=function(g,r,q,e,d,m,h,a,k){var b=new Date().getTime()-this.zoomStartTime;if(b>=a){this.currentScl=h;this.setPosition(g,e,d,this.currentScl);g.setSize(this.imgServerWidth/this.currentScl,this.imgServerHeight/this.currentScl);if(this._animeid){clearTimeout(this._animeid);this._animeid=null;}if(k){this.fireEvent("endZoom");this.fireEvent("setPosition");this.updateForeImage();}sjSetCursor("default");this.requestHideWaitIcon();return;}else{var p=1/m;var c=1/h;var j=p+(c-p)*b/a;var o=1/j;this.currentScl=o;var n=(r+(e-r)*b/a);var l=(q+(d-q)*b/a);this.currentX=n;this.currentY=l;g.setSize(this.imgServerWidth/o,this.imgServerHeight/o);g.toXY(n,l);this.fireEvent("setPosition");if(this.navLayer){this.navLayer.update(this.currentX,this.currentY,this.backImage.width(),this.backImage.height());}sjResetMap("s7map_"+this._elementId);sjZoomMap("s7map_"+this._elementId,1/this.currentScl,1/this.currentScl);this._animeid=setTimeout(this+".animFixTo("+g+","+r+","+q+","+e+","+d+","+m+","+h+","+a+","+this.func+")",25);return;}};SjZoom.prototype.ZoomAt=function(d,m,l,k){var e=false;if(!this.zoomScl){e=false;}else{if(k>1){if(this.zoomIdx==0){e=false;}else{for(var c=this.zoomSclArray.length-1;c>=0;c--){if((this.zoomSclArray[c]-this.currentScl)>0){k=this.zoomSclArray[c]/this.currentScl;e=false;break;}else{e=true;}}}}else{if(k<1){for(var c=0;c<this.zoomSclArray.length;c++){if((this.zoomSclArray[c]-this.currentScl)<0){k=this.zoomSclArray[c]/this.currentScl;e=false;break;}else{e=true;}}}}}var n=this.currentScl*k;if(this.zoom_factor_limit!=0){n=Math.max(n,1/this.zoom_factor_limit);}n=Math.min(this.defaultScl,n);var o=Math.pow(this.zoom_factor,this.max_zoom);var a=this.defaultScl/o;n=Math.max(n,a);var h=this.viewSize.width/2-m/(n/this.currentScl);var g=this.viewSize.height/2-l/(n/this.currentScl);var j=this.imgServerWidth/n;var b=this.imgServerHeight/n;if(!e){if((n!=this.currentScl)||(k==1)||(Math.round(h)!=Math.round(this.currentX))||(Math.round(g)!=Math.round(this.currentY))){if(!this.initialLoading){this.animFix(d,h,g,n,this.transitionTime,this.updateForeImage);}else{this.animFix(d,h,g,n,0,this.updateForeImage);}if(n<this.currentScl){if(this.zoomScl){if(this.zoomIdx<this.zoomSclArray.length){this.zoomIdx++;}}else{this.zoomIdx++;}}else{if(n>this.currentScl){if(this.zoomIdx>0){this.zoomIdx--;}}}}else{sjSetCursor("default");}}};SjZoom.prototype.ZoomIn=function(a){var c=this.viewSize.width/2-this.currentX;var b=this.viewSize.height/2-this.currentY;this.ZoomAt(a,c,b,1/this.zoom_factor);this.state="zoomIn";this.fireEvent("zoomIn","image",a,"currentScl",this.currentScl,"factor",1/this.zoom_factor);};SjZoom.prototype.ZoomOut=function(a){var c=this.viewSize.width/2-this.currentX;var b=this.viewSize.height/2-this.currentY;this.ZoomAt(a,c,b,this.zoom_factor);this.state="zoomOut";this.fireEvent("zoomOut","image",a,"currentScl",this.currentScl,"factor",this.zoom_factor);};SjZoom.prototype.pan=function(a,d,b,c){this.panStep=Math.sqrt(this.viewSize.width*this.viewSize.width+this.viewSize.height*this.viewSize.height)/2;var g=this.viewSize.width/2-this.currentX+d*c*this.panStep;var e=this.viewSize.height/2-this.currentY+b*c*this.panStep;this.ZoomAt(a,g,e,1);this.state="zoomPan";this.fireEvent("zoomPan","image",a,"directionX",d,"directionY",b,"amount",c);};SjZoom.prototype.PanLeft=function(a){this.pan(a,-1,0,1);};SjZoom.prototype.PanUp=function(a){this.pan(a,0,-1,1);};SjZoom.prototype.PanDown=function(a){this.pan(a,0,1,1);};SjZoom.prototype.PanRight=function(a){this.pan(a,1,0,1);};SjZoom.prototype.PanLeftUp=function(a){this.pan(a,-1,-1,1);};SjZoom.prototype.PanRightUp=function(a){this.pan(a,1,-1,1);};SjZoom.prototype.PanLeftDown=function(a){this.pan(a,-1,1,1);};SjZoom.prototype.PanRightDown=function(a){this.pan(a,1,1,1);};SjZoom.prototype.ResetView=function(a){this.state="reset";if(this.initRGNZone){this.ZoomSet(this.initRGNZone,this.RGNtype);}else{this.zoomIdx=0;this.ZoomAt(a,this.defaultX,this.defaultY,this.defaultScl/this.currentScl);}this.fireEvent("zoomReset","image",a);};SjZoom.prototype.xImageToScreen=function(a){return a/this.currentScl+this.currentX;};SjZoom.prototype.yImageToScreen=function(a){return a/this.currentScl+this.currentY;};SjZoom.prototype.widthImageToScreen=function(a){return this.xImageToScreen(a)-this.xImageToScreen(0);};SjZoom.prototype.heightImageToScreen=function(a){return this.yImageToScreen(a)-this.yImageToScreen(0);};SjZoom.prototype.xScreenToImage=function(a){return(a-this.currentX)*this.currentScl;};SjZoom.prototype.yScreenToImage=function(a){return(a-this.currentY)*this.currentScl;};SjZoom.prototype.widthScreenToImage=function(a){return this.xScreenToImage(a)-this.xScreenToImage(0);};SjZoom.prototype.heightScreenToImage=function(a){return this.yScreenToImage(a)-this.yScreenToImage(0);};SjZoom.prototype.ZoomSet=function(b,k){if(!this.changingImage){var g=b.split(",");if(g.length==4){var a=this.imgServerWidth/this.imgServerHeight;if(k=="rgnn"){g[0]=g[0]*this.imgServerWidth;g[1]=g[1]*this.imgServerHeight;g[2]=g[2]*this.imgServerWidth;g[3]=g[3]*this.imgServerHeight;}else{if(k=="rgn"){g[0]=g[0]/a*this.imgServerWidth;g[1]=g[1]*this.imgServerHeight;g[2]=g[2]/a*this.imgServerWidth;g[3]=g[3]*this.imgServerHeight;}}var j=this.xImageToScreen(g[0]);var h=this.yImageToScreen(g[1]);var l=this.widthImageToScreen(g[2]);var c=this.heightImageToScreen(g[3]);var n=Math.max(l/this.viewSize.width,c/this.viewSize.height);if(this.foreImage._fadeid){clearTimeout(this.foreImage._fadeid);this.foreImage._fadeid=null;this.checkPendingChangeContext();}var e=j+l/2-this.currentX;var d=h+c/2-this.currentY;this.currentRGN=g;this.state="setRGN";this.ZoomAt(this.backImage,e,d,n);}}else{this.state="setRGN";var m={name:"ZoomSet",args:arguments};this.stack=m;}};SjZoom.prototype.checkRect=function(l,j,n,d){var g={x:0,y:0,w:0,h:0,scl:null,url:null};var p=this.currentScl;if(p<=1){p=1;}g.x=Math.max(0,-l);g.w=Math.min(this.viewSize.width,n);g.y=Math.max(0,-j);g.h=Math.min(this.viewSize.height,d);if((g.h<=0)||(g.w<=0)){return null;}else{var r=this.tileSize.width*Math.ceil(Math.round(this.tileSize.width*this.currentScl)/this.tileSize.width);var k=g.x*this.currentScl;var e=g.y*this.currentScl;var m=g.w*this.currentScl;var a=g.h*this.currentScl;img_x=r*Math.floor(k/r);img_w=r*Math.ceil((k+m)/r)-img_x;img_y=r*Math.floor(e/r);img_h=r*Math.ceil((e+a)/r)-img_y;img_x=Math.max(img_x,0);img_y=Math.max(img_y,0);if((img_x+img_w)>this.imgServerWidth){img_w=this.imgServerWidth-img_x;}if((img_y+img_h)>this.imgServerHeight){img_h=this.imgServerHeight-img_y;}var c=img_x+img_w/2;var b=img_y+img_h/2;var q=k+m/2;var o=e+a/2;this.shiftX=(q-c);this.shiftY=(o-b);this.lastScl=p;g.url=this.mainURL;g.scl=p;g.x=Math.round(img_x);g.y=Math.round(img_y);g.w=Math.round(img_w);g.h=Math.round(img_h);this.currentCrop=g;return g;}};SjZoom.prototype.getRect=function(l,j,n,d){var g={x:0,y:0,w:0,h:0,url:null};var p=this.currentScl;if(p<=1){p=1;}g.x=Math.max(0,-l);g.w=Math.min(this.viewSize.width,n);g.y=Math.max(0,-j);g.h=Math.min(this.viewSize.height,d);if((g.h<=0)||(g.w<=0)){return null;}else{var r=this.tileSize.width*Math.ceil(Math.round(this.tileSize.width*this.currentScl)/this.tileSize.width);var k=g.x*this.currentScl;var e=g.y*this.currentScl;var m=g.w*this.currentScl;var a=g.h*this.currentScl;img_x=r*Math.floor(k/r);img_w=r*Math.ceil((k+m)/r)-img_x;img_y=r*Math.floor(e/r);img_h=r*Math.ceil((e+a)/r)-img_y;img_x=Math.max(img_x,0);img_y=Math.max(img_y,0);if((img_x+img_w)>this.imgServerWidth){img_w=this.imgServerWidth-img_x;}if((img_y+img_h)>this.imgServerHeight){img_h=this.imgServerHeight-img_y;}var c=img_x+img_w/2;var b=img_y+img_h/2;var q=k+m/2;var o=e+a/2;this.shiftX=(q-c);this.shiftY=(o-b);this.lastScl=p;this.idStr="";if(this.imageVersion){this.idStr="&id="+this.imageVersion;}g.url=this.mainURL+sjPBreak(this.mainURL)+"rgn="+Math.round(img_x)+","+Math.round(img_y)+","+Math.round(img_w)+","+Math.round(img_h)+"&scl="+(p)+this.idStr;this.foreURL=this.mainURL+sjPBreak(this.mainURL)+"rgn="+Math.round(img_x)+","+Math.round(img_y)+","+Math.round(img_w)+","+Math.round(img_h)+"&scl="+(p)+this.idStr;this.foreMagURL=this.mainURL+sjPBreak(this.mainURL)+"rgn="+Math.round(img_x)+","+Math.round(img_y)+","+Math.round(img_w)+","+Math.round(img_h)+"&scl="+(p/this.magnifier.factor)+this.idStr;return g;}};SjZoom.prototype.updateForeImage=function(b){var c={x:0,y:0,w:0,h:0,scl:null,url:null};c=this.checkRect(this.backImage.left(),this.backImage.top(),this.backImage.width(),this.backImage.height());this.mapImage.toXY(this.backImage.left(),this.backImage.top());this.mapImage.setSize(this.backImage.width(),this.backImage.height());this.idStr="";if(this.imageVersion){this.idStr="&id="+this.imageVersion;}var d=c.url+sjPBreak(c.url)+"rgn="+(c.x)+","+(c.y)+","+(c.w)+","+(c.h)+"&scl="+(c.scl)+this.idStr;if(this.foreImage._fadeid){clearTimeout(this.foreImage._fadeid);this.foreImage._fadeid=null;this.checkPendingChangeContext();}this.foreImage.visible(false);this.mapImage.visible(false);sjSetCursor("wait");this.requestShowWaitIcon();var a=this.currentCrop.x/this.currentScl;var e=this.currentCrop.y/this.currentScl;this.foreImage.toXY(this.backImage.left()+a,this.backImage.top()+e);if(((typeof b!="undefined")&&((b!=d)||(b!=this.foreURL)))||(d!=this.foreURL)){this.foreImage.load(b||d);}else{this.foreImage.load(this.foreURL);}};SjZoom.prototype.bx=0;SjZoom.prototype.by=0;SjZoom.prototype.fx=0;SjZoom.prototype.fy=0;SjZoom.prototype.ex=0;SjZoom.prototype.ey=0;SjZoom.prototype.moving=false;SjZoom.prototype.startDrag=false;SjZoom.prototype.storeImagesXY=function(){this.bx=this.backImage.left();this.by=this.backImage.top();this.fx=this.foreImage.left();this.fy=this.foreImage.top();};function sjCrossEvent(a){if(!a){var a=window.event;}if(a.pageX||a.pageY){a.posx=a.pageX;a.posy=a.pageY;}else{if(a.clientX||a.clientY){a.posx=a.clientX+document.body.scrollLeft;a.posy=a.clientY+document.body.scrollTop;}}a.returnValue=false;a.stopPropagation=function(){this.propagate=false;};a.preventBubble=function(){this.bubble=false;};a.preventDefault=function(){this.defaultValue=false;};a.preventDefault();a.preventBubble();a.stopPropagation();return a;}SjZoom.prototype.initHandlers=function(){var e=this;function d(){document.onmousemove=null;document.onmouseup=null;}function a(l,h){e.storeImagesXY();e.ex=h.posx;e.ey=h.posy;e.startDrag=true;sjSetCursor("hand");document.onmousemove=function(m){c(l,sjCrossEvent(m));return false;};document.onmouseup=function(m){b(l,sjCrossEvent(m));return false;};if(document.all){var k=document.all[e.pageId];if(k){var j=k.all.tags("AREA");}}else{if(document.getElementsByName){var k=document.getElementsByName(e.pageId)[0];if(k){var j=k.getElementsByTagName("AREA");}}}if(j){for(var g=0;g<j.length;g++){j[g].onmousedown=function(m){e.storeImagesXY();e.ex=sjCrossEvent(m).posx;e.ey=sjCrossEvent(m).posy;e.startDrag=true;return false;};j[g].onmouseup=document.onmouseup;j[g].onmousemove=document.onmousemove;}}return false;}function c(l,h){if(e.startDrag){e.moving=true;var k=h.posx-e.ex;var j=h.posy-e.ey;e.setPosition(e.backImage,e.bx+k,e.by+j,e.currentScl);var g=e.currentX-e.bx+e.fx;var m=e.currentY-e.by+e.fy;e.foreImage.toXY(g,m);}return false;}function b(l,h){if(e.moving){e.moving=false;e.state="endPan";e.fireEvent("endZoom");e.updateForeImage();}else{if(e.startDrag){var g=sjGetPageCoords(sjGetElement(e._elementId)).x;var n=sjGetPageCoords(sjGetElement(e._elementId)).y;var m=h.posx-e.currentX-g;var k=h.posy-e.currentY-n;if((e.clickToZoom)&&(e.enableZoom)){if(h.ctrlKey){e.state="zoomOut";e.ZoomAt(e.backImage,m,k,e.zoom_factor);}else{if(!h.altKey){var j=Math.max(1/e.zoom_factor_limit,e.defaultScl/Math.pow(e.zoom_factor,e.max_zoom));if(Math.abs(j-e.currentScl)>0.000001){e.state="zoomIn";e.ZoomAt(e.backImage,m,k,1/e.zoom_factor);}}else{if(h.altKey){e.ResetView(e.backImage);}}}}}}e.startDrag=false;sjSetCursor("default");d();return false;}this.waitIcon.addEventListener("load",function(){e.waitIcon.setSize(e.waitIcon._imageWidth,e.waitIcon._imageHeight);var h=(e.viewSize.width-e.waitIcon.width())/2;var g=(e.viewSize.height-e.waitIcon.height())/2;e.waitIcon.toXY(h,g);return false;});this.waitIcon.addEventHandler("mousedown",a);this.waitIcon.addEventHandler("mouseup",b);this.mapImage.addEventListener("load",function(){e.mapImage.visible(true);return false;});this.mapImage.addEventHandler("mousedown",a);this.mapImage.addEventHandler("mousemove",c);this.mapImage.addEventHandler("mouseup",b);this.backImage.addEventListener("load",function(){e.setPosition(e.backImage,e.currentX,e.currentY,e.currentScl);e.backImage.setSize(e.imgServerWidth/e.currentScl,e.imgServerHeight/e.currentScl);e.setPosition(e.mapImage,e.currentX,e.currentY,e.currentScl);e.mapImage.setSize(e.imgServerWidth/e.currentScl,e.imgServerHeight/e.currentScl);e.backImage.visible(true);e.mapImage.visible(false);if(e.initRGNZone){e.changingImage=false;e.checkPendingChangeContext();e.ZoomSet(e.initRGNZone,e.RGNtype);if(!e.initialLoading){e.foreImage.fadeOut(e.turnTime/2);}}else{if(!e.initialLoading){e.foreImage.fadeOut(e.turnTime/2);setTimeout(e+".updateForeImage()",e.turnTime/2);}else{e.updateForeImage(e.backImage.img.src);}}e.initialLoading=false;return false;});this.foreImage.addEventListener("load",function(){var g=e.currentCrop.x/e.currentScl;var l=e.currentCrop.y/e.currentScl;var k=e.currentScl;if(k<1){k/=e.lastScl;e.foreImage.height(e.foreImage._imageHeight/k);e.foreImage.width(e.foreImage._imageWidth/k);}else{e.foreImage.height(e.foreImage._imageHeight);e.foreImage.width(e.foreImage._imageWidth);}var h;if(e.changingImage){h=e.turnTime/2;setTimeout(e+".changingImage=false;"+e+".checkPendingChangeContext();"+e+".callStack();",h);}else{h=e.fadeTime;}if(!e._animeid){e.foreImage.fadeIn(h);e.foreImage.visible(true);e.mapImage.visible(true);}sjSetCursor("default");e.requestHideWaitIcon();if(e.navLayer){e.navLayer.update(e.currentX,e.currentY,e.backImage.width(),e.backImage.height());}var j="";if(e.metaVersion){j="&id="+e.metaVersion;}if(e.hotSpotEnable){loadMap(e.mainURL+j,1/e.currentScl,1/e.currentScl,e._elementId);e.mapImage.map("s7map_"+e._elementId);e.setMapper("s7map_"+e._elementId,function(){e.enableZoom=false;return false;},function(){e.enableZoom=true;return false;});}e.state="zoomForeImageLoad";e.fireEvent("endZoom");e.checkPendingChangeContext();return false;});this.foreImage.addEventHandler("mousedown",a);this.foreImage.addEventHandler("mouseup",b);this.closeButton.addEventHandler("click",function(j,g){var h=confirm("The Web page you are viewing is trying to close the window\n \nDo you want to close this DHTMLZoomViewer window?");if(h){top.close();}return false;});this.plusButton.addEventHandler("click",function(h,g){e.ZoomIn(e.backImage);return false;});this.minusButton.addEventHandler("click",function(h,g){e.ZoomOut(e.backImage);return false;});this.resetButton.addEventHandler("click",function(h,g){e.ResetView(e.backImage);return false;});this.infoButton.addEventHandler("click",function(h,g){e.showInformation();return false;});};SjZoom.prototype.ZoomInit=function(a,b){if((b=="rgnn")||(b=="rgna")||(b=="rgn")){if(b=="rgnn"){this.RGNtype="rgnn";}else{if(b=="rgn"){this.RGNtype="rgn";}else{if(b=="rgna"){this.RGNtype="rgna";}}}this.initRGNZone=a;}};SjZoom.prototype.setMaxZoom=function(c,b,a){if(""+b=="undefined"||b==null){b=2;}if(b<=1){b=1.1;}this.zoom_factor=b;this.max_zoom=c;this.orig_max_zoom=c;this.zoom_factor_limit=a||0;};SjZoom.prototype.advanced=function(b,a,e,d,c){this.zoom_factor=Math.max(1.1,b);this.panPercision=Math.max(1,parseInt(e));if(c||c==0){this.tileSize.width=Math.max(0,c);}};SjZoom.prototype.enableNav=function(b,h,g,c,e){if(this.navLayer==null){var d=null;if(b>=1&&b<=4){d=new SjZoomNav(this._parent,null,null,"absolute",null,this.transparency);}else{if(b>4){d=new SjZoomNav(this._parent,c||null,e||null,"absolute",null,this.transparency);}}d.setViewer(this);if(this.navloadURL){d.dblnavImage.load(this.navloadURL);}}var a=this.left();var j=this.top();this.navInfo.width=c||this.navInfo.width;this.navInfo.height=e||this.navInfo.height;if(b>=1&&b<=4){this.navInfo.pos=b;switch(b){case 1:this.navInfo.x=a+5;this.navInfo.y=j+5;break;case 2:this.navInfo.x=a+this.width()-this.navLayer.width()-5;this.navInfo.y=j+5;break;case 3:this.navInfo.x=a+this.width()-this.navLayer.width()-5;this.navInfo.y=j+this.height()-this.navLayer.height()-5;break;case 4:this.navInfo.x=a+5;this.navInfo.y=j+this.height()-this.navLayer.height()-5;break;}}else{if(b>4){this.navInfo.x=a+h||0;this.navInfo.y=j+g||0;}}if(this.navLayer){this.navLayer.setSize(this.navInfo.width,this.navInfo.height);this.navLayer.toXY(this.navInfo.x,this.navInfo.y);this.navLayer.visible(true);this.navLayer.zIndex(this.foreImage.zIndex()+10);}return(this.navLayer);};SjZoom.prototype.NavigBox=function(){if(this.navLayer){this.navLayer.visible(!this.navLayer.visible());}};SjZoom.prototype.setFormat=function(a){this.format=a;};SjZoom.prototype.setCachingModel=function(a){this.cachingModel=a;};SjZoom.prototype.addInformation=function(a){this.infotxt="alert('"+a+"')";};SjZoom.prototype.showInformation=function(){if(this.infotxt.length!=0){eval(this.infotxt);}else{window.open("../dhtml/helppage.html","DHTMLZoomInfo","width=300,height=400");}};SjZoom.prototype.setHelpPage=function(c,a,b){if(""+c=="undefined"){this.infotxt="window.open('../dhtml/helppage.html','DHTMLZoomInfo','width="+a+",height="+b+"')";}else{this.infotxt="window.open('"+c+"','DHTMLZoomInfo','width="+a+",height="+b+"')";}};SjZoom.prototype.enableUI=function(b,d,e){if(""+this.imgFolder=="undefined"){this.imgFolder=null;}this.imgFolder=b||"../dhtml/images/default/";if(this.imgFolder.substring(this.imgFolder.length-1,this.imgFolder.length)!="/"){this.imgFolder+="/";}if(""+d=="undefined"){d=0;}if(""+e=="undefined"){e=0;}this.buttonOffset=0||d;this.buttonSpace=0||e;if(this.imgFolder!=null){var c=(this.infotxt!=""?1:0);var a=new Array(20,20);this.plusButton.toXY(this.viewSize.width-1-(3+c)*(a[0]+this.buttonSpace),this.viewSize.height-this.buttonOffset);this.minusButton.toXY(this.viewSize.width-1-(2+c)*(a[0]+this.buttonSpace),this.viewSize.height-this.buttonOffset);this.resetButton.toXY(this.viewSize.width-1-(1+c)*(a[0]+this.buttonSpace),this.viewSize.height-this.buttonOffset);if(this.infotxt!=""){this.infoButton.toXY(this.viewSize.width-1-c*(a[0]+this.buttonSpace),this.viewSize.height-this.buttonOffset);}this.plusButton.load(this.imgFolder+"zoomin.gif");this.minusButton.load(this.imgFolder+"zoomout.gif");this.resetButton.load(this.imgFolder+"reset.gif");this.infoButton.load(this.imgFolder+"info.gif");this.plusButton.visible(true);this.minusButton.visible(true);this.resetButton.visible(true);if(this.infotxt!=""){this.infoButton.visible(true);}}};SjZoom.prototype.setWaitIconURL=function(a){if(this.waitIcon){this.waitIconURL=a||null;this.waitIcon.load(this.waitIconURL);}};SjZoom.prototype.setWaitIconTimer=function(a,b){this.waitIconTimer.showDelay=a||500;this.waitIconTimer.hideDelay=b||100;};SjZoom.prototype.requestHideWaitIcon=function(){if(this.waitIconTimerId){clearTimeout(this.waitIconTimerId);this.waitIconTimerId=null;}if(this.waitIconURL){this.waitIconTimerId=setTimeout(this+".waitIcon.visible(false)",this.waitIconTimer.hideDelay);}};SjZoom.prototype.requestShowWaitIcon=function(){if(this.waitIconTimerId){clearTimeout(this.waitIconTimerId);this.waitIconTimerId=null;}if(this.waitIconURL){this.waitIconTimerId=setTimeout(this+".waitIcon.visible(true)",this.waitIconTimer.showDelay);}};SjZoom.prototype.enableCloseButton=function(a){this.closebutton_pos=a;if(this.closebutton_pos>=1&&this.closebutton_pos<=4){this.closeButton.load(this.imgFolder+"close.gif");this.closebutton_x=5;this.closebutton_y=5;if(this.closebutton_pos==2||this.closebutton_pos==3){this.closebutton_x=this.viewSize.width-this.closebutton_w-5;}if(this.closebutton_pos==3||this.closebutton_pos==4){this.closebutton_y=this.viewSize.height-this.closebutton_h-5;}this.closeButton.toXY(this.closebutton_x,this.closebutton_y);this.closeButton.visible(true);}};SjZoom.prototype.callStack=function(){if(this.stack){var str="";for(var i=0;i<this.stack.args.length;i++){if(i>0){str+=","+this+".stack.args["+i+"]";}else{str+=this+".stack.args["+i+"]";}}eval(this+"."+this.stack.name+"("+str+")");this.stack=null;}};SjZoom.prototype.checkPendingChangeContext=function(){if(this.pendingChangeContext!=null){var a=this.pendingChangeContext.url;var j=this.pendingChangeContext.x;var h=this.pendingChangeContext.y;var d=this.pendingChangeContext.scale;var e=this.pendingChangeContext.defaultScl;var b=this.pendingChangeContext.width;var k=this.pendingChangeContext.height;var g=this.pendingChangeContext.version;var c=this.pendingChangeContext.pageId;this.pendingChangeContext=null;this.changeContext(a,j,h,d,e,b,k,g,c);}};SjZoom.prototype.setAlign=function(b,a){this.alignX=b||0;this.alignY=a||0;};function SjEvent(a){this.viewer=a;}SjEvent.prototype.onEvent=function(b,a){this.viewer.addEventListener(b,a);};SjEvent.prototype.onZoom=function(a){this.viewer.addEventListener(a,inHandler);};function SjURL(c){if(c.length==0){return null;}this.url=c;this.port="";this.protocol="";this.host="";var e=this.url.indexOf("://");if(e>=0){this.protocol=this.url.substring(0,e).toLowerCase();this.host=this.url.substring(e+3);if(this.host.indexOf("/")>=0){this.host=this.host.substring(0,this.host.indexOf("/"));}var g=this.host.indexOf("@");if(g>=0){var d=this.host.substring(0,g);var b=d.indexOf(":");if(b>=0){this.username=d.substring(0,b);this.password=d.substring(b);}else{this.username=d;}this.host=this.host.substring(g+1);}var a=this.host.indexOf(":");if(a>=0){this.port=this.host.substring(a);this.host=this.host.substring(0,a);}this.file=this.url.substring(e+3);this.file=this.file.substring(this.file.indexOf("/"));}else{this.file=this.url;}}SjZoom.prototype.getImageWidth=function(){return(this.imgServerWidth);};SjZoom.prototype.getImageHeight=function(){return(this.imgServerHeight);};SjZoom.prototype.setClickToZoom=function(a){return(this.clickToZoom=a);};function compareNumbers(d,c){return c-d;}function compareNumbersDesc(d,c){return c-d;}SjZoom.prototype.setZoomScl=function(b){if(typeof b!="undefined"){this.zoomSclArray=new Array();if(b[0]==0){this.zoomScl=false;}else{this.zoomScl=true;this.zoomSclArray[0]=this.defaultScl/Math.pow(this.zoom_factor,0);for(var a=0;a<b.length;a++){this.zoomSclArray.push(b[a]);}}this.zoomSclArray.sort(compareNumbersDesc);}else{this.zoomScl=false;}};SjZoom.prototype.setMapper=function(b,d,g){if(b){if(document.all){var h=document.all[b];if(h){var e=h.all.tags("AREA");}}else{if(document.getElementsByName){var h=document.getElementsByName(b)[0];if(h){var e=h.getElementsByTagName("AREA");}}}if(e){for(var c=0;c<e.length;c++){e[c].onmouseover=d;e[c].onmouseout=g;e[c].onmousedown=function(){return false;};}}}};function SjZViewer(o,k,c,p,j,b,e,a,m,h,g){this.baseServerUrl=o;this.onEvent=new Object();this.SjElement=SjElement;this.SjElement();if(typeof tsj!="undefined"){this.codePath=tsj.path;}else{if(typeof sj!="undefined"){this.codePath=sj.path;}else{this.codePath="../dhtml/";}}if((typeof m=="undefined")||(m==null)){m="izView";}if(sjGetElement(m)){c=parseInt(sjGetElement(m).offsetWidth);p=parseInt(sjGetElement(m).offsetHeight);var l="";l+=" <div id="+this._elementId+"_base";l+=' STYLE="position:relative;width:'+c+"px;height:"+p+'px;">';l+="<table id="+this._elementId+'_tbl_base STYLE="width:'+c+"px;height:"+p+'px;border:0px solid #ffffff;"  cellspacing=0 cellpadding=0 >';l+=' <tr style="HEIGHT:'+p+'px;"><td>';l+="<img id="+this._elementId+"_img";l+=" src="+this.codePath+"images/spacer.gif";l+=' STYLE="position:absolute;left:0px;top:0px;width:'+c+"px;height:"+0+'px;"';l+=' border="0"';l+=" >";l+=" <div  id="+this._elementId;l+=' STYLE="position:absolute;left:0px;top:0px;width:'+c+"px;height:"+p+'px;">';l+=" </div> ";l+=" </td></tr>";l+=" </table> ";l+=" </div> ";sjSetLayerHTML(m,l);this.elem=sjGetElement(this._elementId);this.elem._elementId=this._elementId;this.elem_base=sjGetElement(this._elementId+"_base");this.elem_base._elementId=this._elementId+"_base";this.x=0;this.y=0;}else{var l="";l+=" <div id="+this._elementId+"_base";l+=' STYLE="position:relative;width:'+c+"px;height:"+p+'px;">';l+="<table id="+this._elementId+'_tbl_base STYLE="width:'+c+"px;height:"+p+'px;border:0px solid #ffffff;"  cellspacing=0 cellpadding=0 >';l+=' <tr style="HEIGHT:'+p+'px;"><td>';l+="<img id="+this._elementId+"_img";l+=" src="+this.codePath+"images/spacer.gif";l+=' STYLE="position:absolute;left:0px;top:0px;width:'+c+"px;height:"+0+'px;"';l+=' border="0"';l+=" >";l+=" <div  id="+this._elementId;l+=' STYLE="position:absolute;left:0px;top:0px;width:'+c+"px;height:"+p+'px;">';l+=" </div> ";l+=" </td></tr>";l+=" </table> ";l+=" </div> ";document.write(l);this.elem=sjGetElement(this._elementId);this.elem._elementId=this._elementId;this.elem_base=sjGetElement(this._elementId+"_base");this.elem_base._elementId=this._elementId+"_base";this.x=0;this.y=0;}this.transparency=e;if(g){this.params=this.makeParamObject(g);if(typeof this.params.persistence!="undefined"){this.cookieExpiration=getExpDate(0,0,this.params.persistence);}var q=sjIS.getCookie(escape(k+".state"));this.state=q.split(";");}this.zviewer=new SjZoom(this.elem,o+k,c,p,true,true,true,this.transparency);var d=document.getElementById("s7map_"+this.zviewer._elementId);if(d){document.body.removeChild(d);}d=document.createElement("map");d.id="s7map_"+this.zviewer._elementId;d.name="s7map_"+this.zviewer._elementId;if(typeof d!="undefined"){if(document.all){document.body.insertAdjacentHTML("afterBegin",' <map id="'+d.id+'" name="'+d.name+'"></map> ');}else{if(document.getElementById){document.body.appendChild(d);}}}this.zviewer.toXY(0,0);this.zviewer.initHandlers();if(((o)&&(k))&&((j)&&(b))){this.zviewer.changeContext(o+k,null,null,null,null,j,b,a,h);}else{if((o)&&(k)){this.zviewer.changeContext(o+k,null,null,null,null,null,null,h);}}var n=this;this.zviewer.addEventListener("endZoom",function(r){switch(r.target.state){case"zoomIn":if(n.onEvent.onImageZoomedIn){n.onEvent.onImageZoomedIn(1+Math.log(r.target.defaultScl/r.target.currentScl)/Math.log(r.target.zoom_factor));}break;case"zoomOut":if(n.onEvent.onImageZoomedOut){n.onEvent.onImageZoomedOut(1+Math.log(r.target.defaultScl/r.target.currentScl)/Math.log(r.target.zoom_factor));}break;case"reset":if(n.onEvent.onImageResetted){n.onEvent.onImageResetted(1+Math.log(r.target.defaultScl/r.target.currentScl)/Math.log(r.target.zoom_factor));}break;case"changeContext":if(n.onEvent.onImageChanged){n.onEvent.onImageChanged(r.target.oldImage,r.target.mainURL);}break;case"setRGN":if(n.onEvent.onRegionSet){n.onEvent.onRegionSet(r.target.currentRGN);}break;}return false;});}SjZViewer.prototype=new SjElement();SjZViewer.prototype.addToPage=function(a){};SjZViewer.prototype.enableNav=function(a,e,d,b,c){if(a>=1&&a<=4){return(this.zviewer.enableNav(a,null,null,50,50));}else{if(a>4){return(this.zviewer.enableNav(a,e,d,b||50,c||50));}}};SjZViewer.prototype.setBorderNav=function(a,b){if(this.zviewer.navLayer){this.zviewer.navLayer.setBorder(a,b);}};SjZViewer.prototype.setBackground=function(a){if(a.toLowerCase()=="transparent"){a="";}if(""+a!="undefined"&&""+a.length>6){this.zviewer.color("#"+a.substr(a.length-6));if(this.zviewer.navLayer){this.zviewer.navLayer.color("#"+a.substr(a.length-6));}}else{this.zviewer.color(a);if(this.zviewer.navLayer){this.zviewer.navLayer.color(a.substr(a.length-6));}}};SjZViewer.prototype.setImage=function(c,g,e,a,d,b){if(this.zviewer.foreImage._fadeid){clearTimeout(this.zviewer.foreImage._fadeid);this.zviewer.foreImage._fadeid=null;}if(g||(this.zviewer.initialScl==this.zviewer.currentScl)){this.zviewer.changeContext(c,null,null,null,null,e,a,d,b);}else{this.zviewer.changeContext(c,this.zviewer.currentX,this.zviewer.currentY,this.zviewer.currentScl,null,e,a,d,b);}};SjZViewer.prototype.setBrochureImage=function(c,h,e,g,a,d,b){if(this.zviewer.foreImage._fadeid){clearTimeout(this.zviewer.foreImage._fadeid);this.zviewer.foreImage._fadeid=null;}if(h||(this.zviewer.initialScl==this.zviewer.currentScl)){this.zviewer.changeContext(c,null,null,null,e,g,a,d,b);}else{this.zviewer.changeContext(c,this.zviewer.currentX,this.zviewer.currentY,this.zviewer.currentScl,e,g,a,d,b);}};SjZViewer.prototype.setFadeTime=function(a){this.zviewer.fadeTime=a*1000;};SjZViewer.prototype.setTurnTime=function(a){this.zviewer.turnTime=a*1000;};SjZViewer.prototype.setTransitionTime=function(a){this.zviewer.transitionTime=a*1000;};SjZViewer.prototype.setWaitIconTimer=function(b){var a=b.split(",");this.zviewer.waitIconTimer.showDelay=(a[0]-0)*1000;this.zviewer.waitIconTimer.hideDelay=(a[1]-0)*1000;};SjZViewer.prototype.setMaxZoom=function(a){this.zviewer.setMaxZoom(this.zviewer.max_zoom,this.zviewer.zoom_factor*a/100,a/100);};SjZViewer.prototype.setZoomStep=function(a){if(a==0){var b=this.zviewer.defaultScl/Math.pow(this.zviewer.zoom_factor,0);this.zviewer.setMaxZoom(1,b);}else{this.zviewer.setMaxZoom(this.zviewer.max_zoom,Math.pow(2,1/a),this.zviewer.zoom_factor_limit);}};SjZViewer.prototype.zoomOut=function(){this.zviewer.ZoomOut(this.zviewer.backImage);};SjZViewer.prototype.zoomIn=function(){this.zviewer.ZoomIn(this.zviewer.backImage);};SjZViewer.prototype.pan=function(d,c){var b=0;var a=0;switch(d){case"leftup":b=-1;a=-1;break;case"up":b=0;a=-1;break;case"rightup":b=1;a=-1;break;case"left":b=-1;a=0;break;case"right":b=1;a=0;break;case"leftdown":b=-1;a=1;break;case"down":b=0;a=1;break;case"rightdown":b=1;a=1;break;}this.zviewer.pan(this.zviewer.backImage,b,a,c);};SjZViewer.prototype.reset=function(){this.zviewer.ResetView(this.zviewer.backImage);};SjZViewer.prototype.initialRGN=function(a){this.zviewer.ZoomInit(a,"rgn");};SjZViewer.prototype.initialRGNN=function(a){this.zviewer.ZoomInit(a,"rgnn");};SjZViewer.prototype.initialRGNA=function(a){this.zviewer.ZoomInit(a,"rgna");};SjZViewer.prototype.setRGN=function(a){this.zviewer.ZoomSet(a,"rgn");};SjZViewer.prototype.setRGNN=function(a){this.zviewer.ZoomSet(a,"rgnn");};SjZViewer.prototype.setRGNA=function(a){this.zviewer.ZoomSet(a,"rgna");};SjZViewer.prototype.setBorder=function(d,c){var a=parseInt(sjGetWidth(this.elem_base._elementId));var b=parseInt(sjGetHeight(this.elem_base._elementId));var c=c||"#666666";var d=d||0;if(""+c!="undefined"&&""+c.length>6){sjSetBackColor(this._elementId+"_img","#"+c.substr(c.length-6));sjSetBorder(this._elementId+"_tbl_base",d,"solid","#"+c.substr(c.length-6));if(this.zviewer.navLayer){sjSetBorder(this.zviewer.navLayer._elementId,1,"solid","#"+c.substr(c.length-6));}}else{sjSetBackColor(this._elementId+"_img",c);sjSetBorder(this._elementId+"_tbl_base",d,"solid",c);if(this.zviewer.navLayer){sjSetBorder(this.zviewer.navLayer._elementId,1,"solid",c);}}sjSetWidth(this.elem_base._elementId,a+2*d);sjSetHeight(this.elem_base._elementId,b+2*d);sjSetWidth(this._elementId+"_tbl_base",a+2*d);sjSetHeight(this._elementId+"_tbl_base",b+2*d);sjSetXY(this.elem._elementId,d,d);this.zviewer.imgBorder=d;};SjZViewer.prototype.setFormat=function(a){this.zviewer.setFormat(a);};SjZViewer.prototype.setCachingModel=function(a){this.zviewer.setCachingModel(a);};SjZViewer.prototype.addInformation=function(a){this.zviewer.addInformation(a);};SjZViewer.prototype.setHelpPage=function(c,a,b){this.zviewer.setHelpPage(c,a,b);};SjZViewer.prototype.initialRGN=function(a){this.zviewer.ZoomInit(a,"rgn");};SjZViewer.prototype.initialRGNN=function(a){this.zviewer.ZoomInit(a,"rgnn");};SjZViewer.prototype.initialRGNA=function(a){this.zviewer.ZoomInit(a,"rgna");};SjZViewer.prototype.advanced=function(b,a,e,d,c){this.zviewer.advanced(b,a,e,d,c);};SjZViewer.prototype.enableUI=function(a,b,c){sjSetHeight(this.elem_base._elementId,parseInt(sjGetHeight(this._elementId+"_tbl_base"))+20-Math.min(20,b)+1);sjSetHeight(this._elementId+"_img",20-Math.min(20,b)+1);sjSetWidth(this._elementId+"_img",parseInt(sjGetWidth(this._elementId+"_tbl_base")));sjSetXY(this._elementId+"_img",0,parseInt(sjGetHeight(this._elementId+"_tbl_base")));this.zviewer.enableUI(a,b,c);};SjZViewer.prototype.enableCloseButton=function(a){this.zviewer.enableCloseButton(a);};SjZViewer.prototype.showInformation=function(){this.zviewer.showInformation();};SjZViewer.prototype.setClickToZoom=function(a){return(this.zviewer.clickToZoom=a);};SjZViewer.prototype.setAltText=function(a){if(this.zviewer.mapImage){sjGetElement(this.zviewer.mapImage.img._uId).alt=a;sjGetElement(this.zviewer.mapImage.img._uId).title=a;}else{if(this.zviewer.foreImage){sjGetElement(this.zviewer.foreImage.img._uId).alt=a;sjGetElement(this.zviewer.foreImage.img._uId).title=a;}}};SjZViewer.prototype.getViewerState=function(){var b=-1;var a=0;for(b=0;b<this.zviewer.pageId.length;b++){if(this.zviewer.pageId.charAt(b).charCodeAt(0)>=48&&this.zviewer.pageId.charAt(b).charCodeAt(0)<=57){break;}}if(b<this.zviewer.pageId.length){a=parseInt(this.zviewer.pageId.substring(b));}var c="";c+='<state version="1">';c+="<ilc>";c+="<currentImageIdx>"+a+"</currentImageIdx>";c+="</ilc>";c+="<zpc>";c+="<scale>"+this.zviewer.currentScl+"</scale>";c+="<center>";c+="<x>"+Math.round(this.zviewer.currentScl*(-this.zviewer.currentX+this.zviewer.viewSize.width/2))+"</x>";c+="<y>"+Math.round(this.zviewer.currentScl*(-this.zviewer.currentY+this.zviewer.viewSize.height/2))+"</y>";c+="</center>";c+="</zpc>";c+="</state>";return c;};SjZViewer.prototype.makeParamObject=function(a){var c=null;if((typeof a!="undefined")&&(a!=null)){var c=new Object();for(var b=0;b<a.length;b+=2){c[a[b]]=a[b+1];}}return c;};SjZViewer.prototype.setHotSpotEnable=function(a){return(this.zviewer.hotSpotEnable=a);};SjZViewer.prototype.imageLabel=function(a){if(typeof a!="undefined"){this.zviewer.oimgLabel=this.zviewer.imgLabel;this.zviewer.imgLabel=a;}return this.zviewer.imgLabel;};
