// encoded 29/05/2007 23:18:39 by nexencoder
var nex_layer_objects=[];var nex_layer_drag_object;function layer_object(v11, v47, v48, v49){if(!window.bw||!bw.dhtml)return false;var v1=(v48)?v48:self;this.name=v11;this.hier=(v47)?v47.split('.'):[];this.nest=v47;this.elm=null;this.create= function(arg){var l=(arg.x)?arg.x:0;var t=(arg.y)?arg.y:0;var w=arg.width;var h=arg.height;var z=arg.zindex;var vis=arg.vis;var parent=arg.parent;var pos=arg.pos?arg.pos:'absolute';var tag=arg.tag?arg.tag:'DIV';var obj;if(bw.layers){if(parent==null)parent=window;obj=new Layer(w,parent);with(obj){top=t;left=l;if(z)zIndex=z;if(h)resizeTo(w,h);visibility=(vis)?(vis==2)?'inherit':'show':'hide';}}else if(bw.ie4){var str_pos=pos=='relative'?'':'top:'+t+';left:'+l+';';var str_html='<'+tag+' id="'+this.name+'" style="position:'+pos+';'+str_pos+'width:'+w+';'+((h)?'height:'+h+';':'')+''+((z)?'z-index:'+z+';':'')+'visibility:'+((vis)?(vis==2)?'inherit':'visible':'hidden')+';"></'+tag+'>';if(parent)parent.insertAdjacentHTML('BeforeEnd',str_html);else document.body.insertAdjacentHTML('BeforeEnd',str_html);obj=document.all(this.name);}else if(bw.dom){obj=document.createElement(tag);if(parent){if(parent.elm)parent.elm.appendChild(obj);else parent.appendChild(obj);}else{if(document.body&&document.body.appendChild)document.body.appendChild(obj);}with(obj){id=this.name;with(style){position=pos;visibility=(vis)?(vis==2)?'inherit':'visible':'hidden';if(pos!='relative'){left=l+'px';top=t+'px';}if(w)width=w+'px';if(h)height=h+'px';if(z)zIndex=z;}}}this.elm=obj;nex_set_dom_update();};if(v47&&bw.layers){this.nest=v1.document;for(var v15=0;v15<this.hier.length;v15++)this.nest=this.nest.layers[this.hier[v15]];}if(v49!=null){this.create(v49);this.name=this.elm.id;}else if(typeof(v11)=='object'&&v11.appendChild)this.elm=v11;else this.elm=bw.dom?v1.document.getElementById(v11):bw.ie4?v1.document.all[v11]:bw.layers?v47?this.nest.layers[v11]:v1.document.layers[v11]:false;if(!this.elm&&bw.layers)this.elm=nex_get_object(v11,v1.document);if(!this.elm){if(window.debug_mode)alert('Could not create layer object: '+v11+((v47)?' ('+v47+')':''));return false;}this.css=bw.layers?this.elm:(bw.dom||bw.ie4)?this.elm.style:false;this.doc=(bw.dom||bw.ie4)?v1.document:bw.layers?this.elm.document:false;this.event=bw.layers?this.doc:this.elm;this.visible=(this.css.visibility=='visible'||this.css.visibility=='show'||this.css.visibility=='inherit')?true:false;this.displayed=this.css.display=='none'?false:true;this.win=v1;this.id=nex_layer_objects.length;this.obj='nex_layer_objects['+this.id+']';nex_layer_objects[this.id]=this;this.size_pos_suffix='';if(document.doctype&&document.doctype.publicId&&document.doctype.publicId.indexOf('XHTML'))this.size_pos_suffix='px';this.width=0;this.height=0;this.inner_width=0;this.inner_height=0;this.height=0;this.x=0;this.y=0;this.clip_width=0;this.clip_height=0;this.get_props= function(){this.clip_width=bw.layers?this.css.clip.width:this.elm.offsetWidth;this.clip_height=bw.layers?this.css.clip.height:this.elm.offsetHeight;this.width=bw.layers?(this.clip_width?this.clip_width:this.doc.width):this.elm.offsetWidth;this.height=bw.layers?(this.clip_height?this.clip_height:this.doc.height):this.elm.offsetHeight;this.inner_width=this.elm.clientWidth?this.elm.clientWidth:this.width;this.inner_height=this.elm.clientHeight?this.elm.clientHeight:this.height;this.x=bw.layers?parseInt(this.css.left):this.elm.offsetLeft;this.y=bw.layers?parseInt(this.css.top):this.elm.offsetTop;};this.get_computed_style= function(v1){if(bw.dom)return get_elements_computed_style(this.elm,v1);else return false;};this.absolute= function(){var v1=this.x;var v2=this.y;var v3='';if(bw.ns60)return{x:this.elm.offsetLeft,y:this.elm.offsetTop};else if(bw.dom){var v4=this.elm.offsetParent;while(v4&&v4!=null){v1+=v4.offsetLeft;v2+=v4.offsetTop;if(v4.nodeName!='BODY'&&v4.scrollLeft)v1-=v4.scrollLeft;if(v4.nodeName!='BODY'&&v4.scrollTop)v2-=v4.scrollTop;v4=v4.offsetParent;}}else for(var v5=0;v5<this.hier.length;v5++){var v6=new layer_object(this.hier[v5],v3.substring(1,v3.length),this.window);v3+='.'+this.hier[v5];v1+=v6.x;v2+=v6.y;}return{x:v1,y:v2};};this.within= function(v4,v5,v6){if(v6)var v1=this.absolute();var v2=v6?v1.x:this.x;var v3=v6?v1.y:this.y;if(check_within(v4,v5,v2,v2+this.width,v3,v3+this.height))return true;else return false;};this.move= function(v1,v2){this.x=v1;this.y=v2;this.css.left=Math.round(this.x)+this.size_pos_suffix;this.css.top=Math.round(this.y)+this.size_pos_suffix;};this.shift= function(v1,v2){v1=Math.round(v1*100)/100;v2=Math.round(v2*100)/100;this.move(this.x+v1,this.y+v2);};this.resize= function(v3,v4){var v1=!bw.ie?this.width-this.inner_width:0;var v2=!bw.ie?this.height-this.inner_height:0;if(v3!==null&&v3!='auto'&&v1>0)v3-=v1;if(v4!==null&&v4!='auto'&&v2>0)v4-=v2;if(bw.div){if(v3!==null)this.css.width=v3+this.size_pos_suffix;if(v4!==null)this.css.height=v4+this.size_pos_suffix;}else if(bw.layers)this.elm.resizeTo(v3,v4);this.get_props();};this.clip= function(v1,v2,v3,v4){if(bw.layers){this.css.clip.bottom=v3;this.css.clip.left=v4;this.css.clip.top=v1;this.css.clip.right=v2;}else if(bw.div)this.css.clip='rect('+v1+' '+v2+' '+v3+' '+v4+')';this.clip_height=v3;this.clip_width=v2;};this.show= function(v1){if(v1==1){this.css.visibility='visible';this.visible=true;}else if(v1==2){this.css.visibility='inherit';this.visible=true;}else{this.css.visibility='hidden';this.visible=false;}};this.display= function(v1){if(v1==1){this.css.display='block';this.displayed=true;}else{this.css.display='none';this.displayed=false;}};this.write= function(v1){if(bw.opera&&bw.vendver<7)return;if(bw.layers){this.doc.open();this.doc.write(v1);this.doc.close();if(this.drag_active!=null){this.event.onmousedown=f15_7;this.event.onmouseup=f15_9;this.event.ondblclick=f15_10;this.doc.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.DBLCLICK);this.event.instance=nex_layer_objects[this.id];}}else if(bw.div)this.elm.innerHTML=v1;nex_set_dom_update();};this.set_bgcolor= function(v1){if(!v1||v1=='#')v1=(bw.layers)?document.bgColor:'transparent';if(bw.layers)this.doc.bgColor=v1;else this.css.backgroundColor=v1;};this.set_border= function(v4){if(!bw.layers){var v1=v4.split(' ');var v2=0;for(var v3=0;v3<v1.length;v3++){if(v1[v3].match(/px/))v2=parseInt(v1[v3].replace(/px/,''));}this.border_width=v2;if(bw.ie){this.inner_width-=v2*2;this.inner_height-=v2*2;this.client_width-=v2*2;this.client_height-=v2*2;}this.css.border=v4;}};this.set_bgimage= function(v1, v2){if(bw.layers)this.doc.background=v1;else if(v2&&bw.ie&&bw.vendver<7){this.css.backgroundImage='none';this.css.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+v1+"',sizingMethod='scale')";}else this.css.backgroundImage='url('+v1+')';};this.set_opacity= function(v2){if(!bw.opacity)return;var v1=v2<=1?Math.round(v2*100):parseInt(v2);this.opacity=v1/100;this.css.opacity=v1/100;if(bw.ie&&v1==100)this.css.filter='';else if(bw.ie)this.css.filter='alpha(opacity:'+v1+')';else if(bw.safari||(bw.konq&&bw.ver<5))this.css.KhtmlOpacity=v1/100;else if(bw.konq)this.css.opacity=v1/100;else if(bw.mz)this.css.MozOpacity=v1/100;};this.set_style= function(v1, v2){this.css[v1]=v2;this.get_props();};this.fade= function(v5, v6, v7){if(!bw.opacity||!v6){this.show((this.visible?0:1));return;}if(typeof(v7)=='undefined')v7=this.visible?'out':'in';this.fade_timers=[];if(v7=='out'){var v1=1/v5;var v2=v6/v5;var v3=0;this.set_opacity(1-v1);for(var v4=1;v4<v5-1;v4++)this.fade_timers[v3++]=setTimeout(this.obj+'.set_opacity(1-'+((v4+1)*v1)+')',Math.round((v4+1)*v2));this.fade_timers[v3++]=setTimeout(this.obj+'.show(0);'+this.obj+'.set_opacity(1)',v6);}else{var v1=0.98/v5;var v2=v6/v5;var v3=0;this.show(1);this.set_opacity(v1);for(var v4=1;v4<v5;v4++)this.fade_timers[v3++]=setTimeout(this.obj+'.set_opacity('+((v4+1)*v1)+')',Math.round((v4+1)*v2));}};this.fade_abort= function(v2){if(typeof(this.fade_timers)!='undefined'){for(var v1=0;v1<this.fade_timers.length;v1++)clearTimeout(this.fade_timers[v1]);this.fade_timers=[];}if(typeof(v2)!='undefined'){this.set_opacity(v2?1:0);this.show(v2);}};this.slide= function(v6, v7, v8, v9, v10){if(!v8)v8=10;if(!v9)v9=20;var v1=v6-this.x;var v2=v7-this.y;var v3=Math.sqrt(Math.pow(v1,2)+Math.pow(v2,2))/v8;if(v3==0){eval(v10);return;}var v4=v1/v3;var v5=v2/v3;if(!v10)v10=null;this.slide_active=true;this.slide_int=1;if(this.intvl)window.clearInterval(this.intvl);this.intvl=window.setInterval(this.obj+'.do_slide('+v4+','+v5+','+v6+','+v7+','+v3+',\''+v10+'\')',v9);};this.do_slide= function(v1,v2,v3,v4,v5,v6){if(!this.slide_active)return;if(this.slide_int++<v5)this.shift(v1,v2);else{window.clearInterval(this.intvl);this.slide_active=false;this.move(v3,v4);eval(v6);}};this.glide= function(v8, v9, v10, v11, v12, v13, v14, v15){var v1=v8-this.x;var v2=v9-this.y;var slantangle=(v8==this.x)?90:(v9==this.y)?0:Math.abs(Math.atan(v2/v1)*180/Math.PI);var v3=Math.sqrt(Math.pow(v1,2)+Math.pow(v2,2));if(v8>=this.x)slantangle=(v9>this.y)?360-slantangle:slantangle;else slantangle=(v9>this.y)?180+slantangle:180-slantangle;slantangle*=Math.PI/180;this.glide_speed=(!v11)?v11:20;this.glide_active=true;if(!v14)v14='';if(!v15)v15='';if(v12=='fast'){this.glide_angle=0;var v4=this.x;var v5=this.y;var v3=(v13=='fast')?v3/2:v3;var v6=90;var v7=(v13=='fast')?1:0;}else{this.glide_angle=-90;var v4=(v13=='fast')?this.x:this.x+v1/2;var v5=(v13=='fast')?this.y:this.y+v2/2;var v3=(v13=='fast')?v3:v3/2;var v6=(v13=='fast')?0:90;var v7=0;}this.glide_step(v3,v4,v5,slantangle,v10);if(this.intvl)window.clearInterval(this.intvl);this.intvl=window.setInterval(this.obj+'.do_glide('+v7+','+v3+','+v6+','+v4+','+v5+','+slantangle+','+v8+','+v9+','+v1+','+v2+','+v10+',\''+v14+'\',\''+v15+'\')',this.glide_speed);};this.do_glide= function(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14){if(!this.glide_active)return;if(this.glide_angle<v4&&this.glide_active)this.glide_step(v3,v5,v6,v7,v12,v14);else{window.clearInterval(this.intvl);if(v2==1){this.glide_angle=-90;v5=this.x+v10/2;v6=this.y+v11/2;this.glide_step(v3,v5,v6,v7,v12,v14);var v1=v7+','+v8+','+v9+','+v10+','+v11+','+v12+',\''+v13+'\',\''+v14+'\'';this.intvl=window.setInterval(this.obj+'.do_glide(0,'+v3+',0,'+v5+','+v6+','+v1+')',this.glide_speed);}else{this.glide_active=false;this.move(v8,v9);eval(v13);}}};this.glide_step= function(amplitude, center_x, center_y, slantangle, angleinc, step_action){if(!this.glide_active)return;this.glide_angle+=angleinc;var u=amplitude*Math.sin(this.glide_angle*Math.PI/180);var x=Math.round(Number(center_x)+u*Math.cos(slantangle));var y=Math.round(Number(center_y)-u*Math.sin(slantangle));this.move(x,y);if(step_action)eval(step_action);};this.load= function(v1, v2, v3){if(v2==null)v2='';if(v3)v2=v3;if(bw.opera&&bw.vendver<7)return;if(!window.nex_remote_load_manager)nex_remote_load_manager=new f15_6();nex_remote_load_manager.call(this.obj,v1,v2);};this.above= function(v1){if(v1==this)return;if(v1.css.zIndex=='')v1.css.zIndex=0;this.css.zIndex=parseInt(v1.css.zIndex)+1;if(this.elm.moveAbove)this.elm.moveAbove(v1.elm);};this.dblclick= function(v1){if(v1!=null){this.event.ondblclick=f15_10;if(bw.layers)this.doc.captureEvents(Event.DBLCLICK);if(this.drag_actions!=undefined)this.drag_actions.dblclick=v1;else this.drag_actions={dblclick:v1};this.event.instance=nex_layer_objects[this.id];}else{this.event.ondblclick=null;if(bw.layers)this.doc.releaseEvents(Event.DBLCLICK);if(this.drag_actions!=undefined)this.drag_actions.dblclick=null;}};this.draggable= function(v1, v2, v3, v4){if(v1){this.drag_active=false;this.drag_boundaries=v4;this.event.onmousedown=f15_7;this.event.onmouseup=f15_9;this.event.ondblclick=f15_10;if(bw.layers)this.doc.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.DBLCLICK);this.event.instance=nex_layer_objects[this.id];if(v2)this.prior=true;if(v3)this.drag_actions=v3;}else{this.drag_active=null;this.event.onmousedown=null;this.event.onmouseup=null;this.event.ondblclick=null;if(bw.layers)this.doc.releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.DBLCLICK);this.prior=false;this.drag_actions=null;}};this.get_props();}function layer_form(v2, v3, v4){if(bw.layers){if(v4==null)v4=false;var v1=new layer_object(v3,v4);this.elm=v1.doc.forms[v2];}else this.elm=document.forms[v2];return this;}window.mk_layer_object=layer_object;window.mk_layer_form=layer_form;function check_within(v1,v2,v3,v4,v5,v6){if(v1>=v3&&v1<v4&&v2>=v5&&v2<v6)return true;else return false;}var transfer_loaded=false;function f15_6(){this.load_id=0;this.stack=[];this.timeout=20;this.running=false;this.processing=false;this.current_load=0;var v1='layerRemoteBridge';if(document.all&&!window.opera){var v2='<iframe name="'+v1+'" src="/global/images/blank.gif" style="width:0; height:0; visibility:hidden"></iframe>';document.body.insertAdjacentHTML('BeforeEnd',v2);this.bridge=window.frames[v1];}else if(document.getElementById){var v3=document.createElement('iframe');v3.name=v1;v3.width=0;v3.height=0;v3.style.visibility='hidden';document.body.appendChild(v3);this.bridge=window.frames[v1]?window.frames[v1]:v3;}this.call= function(v1, v2, v3){this.load_id++;this.stack[this.load_id]={layer:v1,url:v2,action:v3,loaded:false,finished:false,timer:setTimeout('nex_remote_load_manager.kill('+this.load_id+')',this.timeout*1000)};this.wakeup();};this.sleep= function(v1){this.current_load=0;this.running=false;};this.wakeup= function(){if(!this.running){this.running=true;this.check();}};this.check= function(){if(!this.running)return;var v1=0;for(var v2=this.stack.length-1;v2>0;v2--)if(!this.stack[v2].loaded&&!this.stack[v2].finished&&v2!=this.current_load)v1=v2;if(this.processing&&transfer_loaded){this.stack[this.current_load].loaded=true;window.clearTimeout(this.stack[this.current_load].timer);this.onload(this.current_load);}else if(!this.processing&&v1>0){var v3=this.stack[v1].url;if(bw.layers){var v4=eval(this.stack[v1].layer);v4.elm.load(v3,v4.width);}else if(bw.opera)this.bridge.src=v3;else this.bridge.location.replace(v3);this.current_load=v1;this.processing=true;transfer_loaded=false;}if(this.processing||v1>0)setTimeout('nex_remote_load_manager.check()',200);else this.sleep();};this.onload= function(v8){if(!bw.layers){var v1,v2;var v3=eval(this.stack[v8].layer);var scode=this.bridge.contentDocument&&this.bridge.contentDocument.body?this.bridge.contentDocument.body.innerHTML:this.bridge.document.body.innerHTML;var v4,v5;var v6=scode.toLowerCase();var v7=0;while(v7<100&&(v4=v6.indexOf('<scr'+'ipt'))>=0){v7++;v5=v6.indexOf('</scr'+'ipt',v4);if(v5>v4){scode=scode.substring(0,v4)+scode.substring(v5+9,scode.length);v6=scode.toLowerCase();}}v3.write(scode);}this.stack[v8].finished=true;this.processing=false;transfer_loaded=false;if(this.stack[v8].action)eval(this.stack[v8].action);};this.kill= function(v1){this.stack[v1].finished=true;this.processing=false;if(this.stack[v1].action)eval(this.stack[v1].action);};}function f15_7(v10){v10=nex_get_event(v10);var v1=this.instance;var v2=get_mouse_pos(v10).x;var v3=get_mouse_pos(v10).y;var v4=false;var v5=(v10&&v10.which)?v10.which:(v10?event.button:0);var v6=v10.target?v10.target:(v10?v10.srcElement:null);if(v6!=null&&(v6.form||v6.nodeName=='INPUT'||v6.nodeName=='SELECT'))return true;v1.abs=v1.absolute();if(v5>1||((v5==1||v5==0)&&check_altkey(v10)))v4=true;else if(check_within(v2,v3,v1.abs.x,v1.abs.x+v1.width,v1.abs.y,v1.abs.y+v1.height)){v1.drag_active=true;v1.x_offset=v2-v1.x;v1.y_offset=v3-v1.y;if(document.onmousemove)v1.event_stack_move=document.onmousemove;document.onmousemove=f15_8;if(!bw.layers&&document.onmouseup)v1.event_stack_up=document.onmouseup;if(!bw.layers)document.onmouseup= function(v1){if(window.nex_layer_drag_object)f15_9(v1,true);};if(bw.layers)document.captureEvents(Event.MOUSEMOVE);if(v1.prior){var v7=(v1.css.zIndex!='')?v1.css.zIndex:0;var v8=null;for(var v9 in nex_layer_objects)if(nex_layer_objects[v9].drag_active!=null&&nex_layer_objects[v9]!=v1&&nex_layer_objects[v9].css.zIndex>=v7){v7=nex_layer_objects[v9].css.zIndex;v8=nex_layer_objects[v9];}if(v8!=null)v1.above(v8);nex_layer_drag_object=nex_layer_objects[v1.id];}v4=true;nex_layer_drag_object=nex_layer_objects[v1.id];}if(v4){if(v1.drag_actions&&v1.drag_actions.down)return v1.drag_actions.down(v1,v2,v3,v10);return false;}return true;}function f15_8(v4){mX=get_mouse_pos(v4).x;mY=get_mouse_pos(v4).y;if(nex_layer_drag_object&&nex_layer_drag_object.drag_active){var v1=nex_layer_drag_object;var v2=mX-v1.x_offset;var v3=mY-v1.y_offset;if(v1.drag_boundaries){if(v3<v1.drag_boundaries.min_y)v3=v1.drag_boundaries.min_y;if(v3>v1.drag_boundaries.max_y)v3=v1.drag_boundaries.max_y;if(v2<v1.drag_boundaries.min_x)v2=v1.drag_boundaries.min_x;if(v2>v1.drag_boundaries.max_x)v2=v1.drag_boundaries.max_x;}v1.move(v2,v3);if(v1.drag_actions&&v1.drag_actions.move)return v1.drag_actions.move(v1,mX,mY,v4);return false;}return true;}function f15_9(v4, v5){var v1=false;var v2=v5?nex_layer_drag_object:this.instance;var v3=(v4&&v4.which)?v4.which:(window.event)?event.button:0;if(v3>1||((v3==1||v3==0)&&check_altkey(v4)))v1=true;else if(v2&&v2==nex_layer_drag_object&&v2.drag_active){v2.drag_active=false;nex_layer_drag_object=null;v1=true;}document.onmousemove=(v2.event_stack_move)?v2.event_stack_move:null;if(!bw.layers)document.onmouseup=(v2.event_stack_up)?v2.event_stack_up:null;if(v1){if(v2.drag_actions&&v2.drag_actions.up)return v2.drag_actions.up(v2,v2.x,v2.y,v4);return false;}return true;}function f15_10(v7){v7=nex_get_event(v7);var v1=this.instance;var v2=get_mouse_pos(v7).x;var v3=get_mouse_pos(v7).y;var v4=false;var v5=(v7&&v7.which)?v7.which:(v7?event.button:0);var v6=v7.target?v7.target:(v7?v7.srcElement:null);if(v6!=null&&(v6.form||v6.nodeName=='INPUT'||v6.nodeName=='SELECT'))return true;v1.abs=v1.absolute();if(v5>1||((v5==1||v5==0)&&check_altkey(v7)))v4=true;else if(check_within(v2,v3,v1.abs.x,v1.abs.x+v1.width,v1.abs.y,v1.abs.y+v1.height)){v1.x_offset=v2-v1.x;v1.y_offset=v3-v1.y;if(bw.layers)document.captureEvents(Event.DBLCLICK);v4=true;}if(v4){if(v1.drag_actions&&v1.drag_actions.dblclick)return v1.drag_actions.dblclick(v1,v2,v3,v7);return false;}return true;}
