
function SKResizeContainer(id,options)
{var container=document.getElementById(id);SKResizeContainerObject(container,options);}
function SKResizeContainerObject(container,options)
{if(typeof options=='undefined'){options={};}
if(typeof options.ResizeIfShorter=='undefined'){options.ResizeIfShorter=1;}
if(typeof options.ResizeAlways=='undefined'){options.ResizeAlways=0;}
var children=container.childNodes;var children_width=0;for(var i=0;i<children.length;i++){var w=parseInt(children[i].offsetWidth);if(!isNaN(w)){var margin_left=parseInt(children[i].style.marginLeft);var margin_right=parseInt(children[i].style.marginRight);var padding_left=parseInt(children[i].style.paddingLeft);var padding_right=parseInt(children[i].style.paddingRight);if(isNaN(margin_left)){margin_left=0;}
if(isNaN(margin_right)){margin_right=0;}
if(isNaN(padding_left)){padding_left=0;}
if(isNaN(padding_right)){padding_right=0;}
children_width+=w+margin_left+margin_right+padding_left+padding_right;}}
if(options.ResizeAlways==1||(options.ResizeIfShorter==1&&parseInt(container.offsetWidth)<children_width)){container.style.width=children_width+"px";}}


SK.Actions.SelectiveMenu={openForEditing:function(fh,obj){var selective_menu=SK.Singletons.env.get('selective_menu');SK.Actions.openForEditing(fh,obj,{selective_nav_area_node_id:selective_menu!=''?selective_menu.parent_id:''});},isSelectiveAreaEditEnabled:function(fh,obj){return SK.Singletons.env.get('selective_menu')=='';},del:function(fh,obj){var selective_menu=SK.Singletons.env.get('selective_menu');if(selective_menu==""){return;}
SK.Actions.SelectiveMenu.delConfirm(selective_menu.name,selective_menu.node_id,selective_menu.parent_id,$defined(selective_menu.nav_menu_node_id_prop_name)?selective_menu.nav_menu_node_id_prop_name:"");fh.notifyCallbackFinished(obj);},delConfirm:function(menu_name,node_id,parent_id,nav_menu_node_id_prop_name){var all_pages_button=new ConfirmationButton('Remove permanently from all pages',function(){SK.Actions.SelectiveMenu.execDelete('SelectiveMenuForm'+node_id,menu_name,node_id,parent_id,0,nav_menu_node_id_prop_name);});var this_page_button=new ConfirmationButton('Delete',function(){SK.Actions.SelectiveMenu.execDelete('SelectiveMenuForm'+node_id,menu_name,node_id,parent_id,1,nav_menu_node_id_prop_name);});var cancel_button=new ConfirmationButton('Cancel','void(null)');var buttons=new Array(this_page_button,cancel_button,all_pages_button);ConfirmationBox('/Shared/Html/confirmation_box.html',"Are you sure you want to delete the per-page navigation <b>{menu_name}</b> from the current page?".substitute({menu_name:menu_name}),buttons);},execDelete:function(form_name,menu_name,node_id,parent_id,remove_tmp,nav_menu_node_id_prop_name){var msg="You are about to delete the per-page navigation {menu_name} permanently from your site.\r\nThis action is not reversible.\r\nAre you sure you want to proceed?".substitute({menu_name:menu_name});var form=document.forms[form_name];form.do_nm_remove.value="go";form.nm_node_id.value=node_id;form.parent_id.value=parent_id;form.nav_menu_node_id_prop_name.value=nav_menu_node_id_prop_name;if(remove_tmp==0){SKConfirm(msg,function(){form.remove_tmp.value=remove_tmp;SK.Actions.Common.displayProgress("Permanently deleting item...",function(){form.submit();});});}else{SK.Actions.Common.displayProgress("Deleting item...",function(){form.submit();});}}};


Fx.Slide=new Class({Extends:Fx,options:{mode:'vertical'},initialize:function(element,options){this.addEvent('complete',function(){this.open=(this.wrapper['offset'+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419)this.element.dispose().inject(this.wrapper);},true);this.element=this.subject=$(element);this.parent(options);var wrapper=this.element.retrieve('wrapper');this.wrapper=wrapper||new Element('div',{styles:$extend(this.element.getStyles('margin','position'),{'overflow':'hidden'})}).wraps(this.element);this.element.store('wrapper',this.wrapper).setStyle('margin',0);this.now=[];this.open=true;},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight;},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth;},set:function(now){this.element.setStyle(this.margin,now[0]);this.wrapper.setStyle(this.layout,now[1]);return this;},compute:function(from,to,delta){var now=[];var x=2;x.times(function(i){now[i]=Fx.compute(from[i],to[i],delta);});return now;},start:function(how,mode){if(!this.check(arguments.callee,how,mode))return this;this[mode||this.options.mode]();var margin=this.element.getStyle(this.margin).toInt();var layout=this.wrapper.getStyle(this.layout).toInt();var caseIn=[[margin,layout],[0,this.offset]];var caseOut=[[margin,layout],[-this.offset,0]];var start;switch(how){case'in':start=caseIn;break;case'out':start=caseOut;break;case'toggle':start=(this.wrapper['offset'+this.layout.capitalize()]==0)?caseIn:caseOut;}
return this.parent(start[0],start[1]);},slideIn:function(mode){return this.start('in',mode);},slideOut:function(mode){return this.start('out',mode);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){return this.start('toggle',mode);}});Element.Properties.slide={set:function(options){var slide=this.retrieve('slide');if(slide)slide.cancel();return this.eliminate('slide').store('slide:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('slide')){if(options||!this.retrieve('slide:options'))this.set('slide',options);this.store('slide',new Fx.Slide(this,this.retrieve('slide:options')));}
return this.retrieve('slide');}};Element.implement({slide:function(how,mode){how=how||'toggle';var slide=this.get('slide'),toggle;switch(how){case'hide':slide.hide(mode);break;case'show':slide.show(mode);break;case'toggle':var flag=this.retrieve('slide:flag',slide.open);slide[(flag)?'slideOut':'slideIn'](mode);this.store('slide:flag',!flag);toggle=true;break;default:slide.start(how,mode);}
if(!toggle)this.eliminate('slide:flag');return this;}});


Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(elements,options){this.elements=this.subject=$$(elements);this.parent(options);},compute:function(from,to,delta){var now={};for(var i in from){var iFrom=from[i],iTo=to[i],iNow=now[i]={};for(var p in iFrom)iNow[p]=this.parent(iFrom[p],iTo[p],delta);}
return now;},set:function(now){for(var i in now){var iNow=now[i];for(var p in iNow)this.render(this.elements[i],p,iNow[p],this.options.unit);}
return this;},start:function(obj){if(!this.check(arguments.callee,obj))return this;var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={};for(var p in iProps){var parsed=this.prepare(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;}}
return this.parent(from,to);}});


var Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var params=Array.link(arguments,{'container':Element.type,'options':Object.type,'togglers':$defined,'elements':$defined});this.parent(params.elements,params.options);this.togglers=$$(params.togglers);this.container=$(params.container);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('active',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);if($chk(this.options.display))this.display(this.options.display);},addSection:function(toggler,element,pos){toggler=$(toggler);element=$(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;this.togglers.include(toggler);this.elements.include(element);if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.inject(this.togglers[pos],'before');element.inject(toggler,'after');}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
var idx=this.togglers.indexOf(toggler);toggler.addEvent('click',this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},display:function(index){index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'background':'active',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);}});


var Slider=new Class({Implements:[Events,Options],options:{onTick:function(position){if(this.options.snap)position=this.toPosition(this.step);this.knob.setStyle(this.property,position);},snap:false,offset:0,range:false,wheel:false,steps:100,mode:'horizontal'},initialize:function(element,knob,options){this.setOptions(options);this.element=$(element);this.knob=$(knob);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bind(this));if(this.options.wheel)this.element.addEvent('mousewheel',this.scrolledElement.bindWithEvent(this));var offset,limit={},modifiers={'x':false,'y':false};switch(this.options.mode){case'vertical':this.axis='y';this.property='top';offset='offsetHeight';break;case'horizontal':this.axis='x';this.property='left';offset='offsetWidth';}
this.half=this.knob[offset]/2;this.full=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0;this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle('position','relative').setStyle(this.property,-this.options.offset);modifiers[this.axis]=this.property;limit[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:limit,modifiers:modifiers,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full;}},set:function(step){if(!((this.range>0)^(step<this.min)))step=this.min;if(!((this.range>0)^(step>this.max)))step=this.max;this.step=Math.round(step);this.checkStep();this.end();this.fireEvent('tick',this.toPosition(this.step));return this;},clickedElement:function(event){var dir=this.range<0?-1:1;var position=event.page[this.axis]-this.element.getPosition()[this.axis]-this.half;position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();this.end();this.fireEvent('tick',position);},scrolledElement:function(event){var mode=(this.options.mode=='horizontal')?(event.wheel<0):(event.wheel>0);this.set(mode?this.step-this.stepSize:this.step+this.stepSize);event.stop();},draggedKnob:function(){var dir=this.range<0?-1:1;var position=this.drag.value.now[this.axis];position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('change',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('complete',this.step+'');}},toStep:function(position){var step=(position+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(step-=step%this.stepSize):step;},toPosition:function(step){return(this.full*Math.abs(this.min-step))/(this.steps*this.stepSize)-this.options.offset;}});


var HORIZONTAL=0;var VERTICAL=1;var STRIPE_BELOW_MAIN_ITEMS=0;var DROPDOWN_BELOW_MAIN_ITEMS=1;var DROPDOWN_BETWEEN_ITEMS=2;var DROPDOWN_AT_RIGHT=3;var SELECTED_CLASS_NAME='sel';var CURRENT_CLASS_NAME='cur';var CURRENT_SUBITEM_CLASS_NAME='curSub';var FIRST_BUTTON_CLASS_NAME=' fmBtnFst ';var LAST_BUTTON_CLASS_NAME=' fmBtnLst ';


var SKSliderTimeouts={};var SKSliderOptions={};var SKSlider={};SKSlider.timer={};var SKSliders={};SKSliderOptions.DEFAULT={window_width:160,width:500,step:10};var SKTwoWaySlider=new Class({initialize:function(element,slider_name,props){this.element=element;this.window_width=(props&&props.window_width)?props.window_width:SKSliderOptions.DEFAULT.window_width;this.timeout_wait=(typeof props.timeout_wait!='undefined')?props.timeout_wait:SKMenuOptions.slider.DEFAULT.wait;this.width=props.org_width;this.step=(props&&props.step>0)?props.step:3;this.name=slider_name;this.Init();},Init:function(){this.height=$(this.element).getStyle('height').replace("px","");this.slide_offset=this.width-this.window_width;this.left_offset=0;this.slide_start=0;this.slide_end=this.slide_start+this.slide_offset;this.slide_pos=this.slide_start;this.user_direction=1;this.finished=false;this.right_cycle_finished=false;this.timer;this.direction=1;this.count=10;this.counter=0;},ResetSlide:function(){if(this.timer)clearTimeout(this.timer);this.height=$(this.element).getStyle('height').replace("px","");this.slide_offset=this.width-this.window_width;this.left_offset=0;this.slide_start=0;this.slide_end=this.slide_start+this.slide_offset;this.slide_pos=this.slide_start;this.finished=false;this.right_cycle_finished=false;this.counter=0;this.direction=1;this.ClipLayer();this.SetPositon();},ClipLayer:function(){var right=this.slide_pos+this.window_width;var left=this.slide_pos;var clip_str="rect("+0+"px "+right+"px "+this.height+"px "+left+"px)";this.element.style.clip=clip_str;},SetPositon:function(){var offset=(-1)*this.left_offset;this.element.style.left=offset+"px";},Slide:function(direction){if(typeof direction=='unedefined'){direction=this.direction;}
this.user_direction=direction;if(this.user_direction==-1){this.right_cycle_finished=false;this.direction=-1;}
if(this.user_direction==1&&this.right_cycle_finished==true){return;}
this.SlideByStep();if(this.user_direction==-1){this.direction=1;}},SlideByStep:function(){var direction=this.direction;var new_pos=this.slide_pos+this.step*direction;if(this.user_direction==-1&&this.slide_pos==this.slide_start&&new_pos<this.slide_start){this.finished=true;return;}else{this.finished=false;}
if(new_pos<this.slide_start){if(this.user_direction==1){this.right_cycle_finished=true;}
else
{this.right_cycle_finished=false;}
return;}
if(new_pos>this.slide_end&&this.user_direction==1){if(this.counter<this.count){this.counter++;}
else{this.counter=0;this.ChangeDirection();}
return;}
this.left_offset+=this.step*direction;this.slide_pos=new_pos;this.ClipLayer();this.SetPositon();},ChangeDirection:function(){this.direction=(-1)*this.direction;},SetWindowWidth:function(new_window_width){if(new_window_width>=0){this.window_width=new_window_width;}},SetTimeoutWait:function(new_timeout_wait){if(new_timeout_wait>=0){this.timeout_wait=new_timeout_wait;}},SetStep:function(new_step){if(new_step>=0){this.step=step;}},SetOrgWidth:function(new_org_width){if(new_org_width>=0){this.width=new_org_width;}},SetName:function(new_name){if(new_name>=0){this.name=new_name;}}});SKEffectsFactory.Slider={};SKEffectsFactory.Slider.timer={};SKEffectsFactory.Slider.Start=function(slider){slider.Slide(2);var timeout_wait=slider.timeout_wait;if(SKEffectsFactory.Slider.timer[slider.name]){clearTimeout(SKEffectsFactory.Slider.timer[slider.name]);}
SKEffectsFactory.Slider.timer[slider.name]=setTimeout(function(){SKEffectsFactory.Slider.Start(slider);},timeout_wait);}
SKEffectsFactory.Slider.TwoWaySlide=function(slider,direction){if(typeof slider=="undefined"||slider==null||slider.window_width>=slider.width)return;slider.Slide(direction);var timeout_wait=slider.timeout_wait;if(slider.timer)clearTimeout(slider.timer);if(!slider.finished){slider.timer=setTimeout(function(){SKEffectsFactory.Slider.TwoWaySlide(slider,direction);},timeout_wait);}}
SKSlider.Start=function(slider){slider.Slide(2);var timeout_wait=slider.timeout_wait;if(SKSlider.timer[slider.name]){clearTimeout(SKSlider.timer[slider.name]);}
SKSlider.timer[slider.name]=setTimeout(function(){SKSlider.Start(slider);},timeout_wait);}
SKSlider.TwoWaySlide=function(slider,direction){if(typeof slider=="string"&&eval("typeof "+slider)!='undefined')slider=eval(slider);if(typeof slider=="undefined"||slider==null||slider.window_width>=slider.width)return;slider.Slide(direction);var timeout_wait=slider.timeout_wait;if(slider.timer)clearTimeout(slider.timer);if(!slider.finished){slider.timer=setTimeout(function(){SKSlider.TwoWaySlide(slider,direction);},timeout_wait);}}


var SKMenuOptions={};SKMenuOptions.holders={};SKMenuOptions.holders.DEFAULT={submenu:[{"tagName":"div","class":"effects_wrapper"},{"tagName":"div","style":{"overflow":"hidden"}},{"tagName":"div","class":"effects_holder","style":{"visibility":"hidden","position":"absolute"}},{"tagName":"div","class":"subNav"}],item:[]}
SKMenuOptions.holders.NOANIMATION={submenu:[{"tagName":"div","class":"effects_wrapper"},{"tagName":"div","style":{"overflow":"visible"}},{"tagName":"div","class":"effects_holder","style":{"visibility":"hidden"}},{"tagName":"div","class":"subNav"}],item:[]}
SKMenuOptions.events={};SKMenuOptions.events.DEFAULT={"mouseover":"show","mouseout":"hide"}
SKMenuOptions.events.CLICK={"mouseover":"show","mouseout":"hide","click":"click"}
SKMenuOptions.timeouts={};SKMenuOptions.timeouts.DEFAULT={"show":0,"hide":50,"hide_no_sub":50,"show_sub":0,"hide_sub":0,"rollover_next":50,"click":0};SKMenuOptions.dimensions={};SKMenuOptions.dimensions.DEFAULT={"first_level":{"visible_window_width":140},"subitems":{"visible_window_width":160,"stretch_increment":100},"menu_padding":20,"dft_si_height":15,"wce_icon_width":10};SKMenuOptions.slider={};SKMenuOptions.slider.DEFAULT={"start":300,"end":300,"wait":50,"step":3}
SKMenuOptions.callbacks={};SKMenuOptions.callbacks.DEFAULT={"after_traverse":function(menu_item){var submenu_layout=main_menu.submenu_layout;var container_id="container_menu";SKUtils.PrepareMenuContainer(container_id,submenu_layout);SKUtils.RemoveElement(container_id);},"before_traverse":function(menu_item){}}
SKMenuOptions.behaviors={};SKMenuOptions.behaviors.DEFAULT={"onhide":function(menu_item){var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){menu_item.SubSynchronized(true,1);var slider=SKSliders[menu_item.element.id+"_slider"];if(slider)
window.setTimeout(function(){SKSlider.TwoWaySlide(slider,-1);},200);return;}else{SKEffectsFactory.SubSynchronization[menu_item.element.id]+=1;menu_item.Synchronized(false);}
if(typeof menu_item.SubMenu!='undefined'){menu_item.HideAnimation();}
menu_item.UnsetSelected();},"onshow":function(menu_item){var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){menu_item.SubSynchronized(true);var slider=SKSliders[menu_item.element.id+"_slider"];if(slider)
window.setTimeout(function(){SKSlider.TwoWaySlide(slider,1);},200);return;}else{if(!menu_item.Synchronized()){menu_item.Synchronized(true);}
else{return;}}
var id=menu_item.element.id;menu_item.HideSiblings();menu_item.SetSelected();menu_item.root_obj.SetSubmenuPosition(menu_item);menu_item.ShowAnimation();menu_item.Synchronized(true);}};SKMenuOptions.behaviors.CLICK={"onhide":function(menu_item){var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){menu_item.SubSynchronized(true,1);var slider=SKSliders[menu_item.element.id+"_slider"];if(slider)
window.setTimeout(function(){SKSlider.TwoWaySlide(slider,-1);},200);return;}else{SKEffectsFactory.SubSynchronization[menu_item.element.id]+=1;menu_item.Synchronized(false);}
var menu_obj=menu_item.SubMenu();var holder;if(menu_obj&&typeof menu_obj!='undefined')
holder=menu_obj.GetHolder();if(menu_item.HasLock(SELECTED_CLASS_NAME))
return;menu_item.UnsetSelected();},"onshow":function(menu_item){var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){menu_item.SubSynchronized(true);var slider=SKSliders[menu_item.element.id+"_slider"];if(slider)
window.setTimeout(function(){SKSlider.TwoWaySlide(slider,1);},200);return;}else{if(!menu_item.Synchronized()){menu_item.Synchronized(true);}else{return;}}
menu_item.HideSiblings();menu_item.SetSelected();menu_item.root_obj.SetSubmenuPosition(menu_item);menu_item.Synchronized(true);},"onclick":function(menu_item,disabled_check_for_link){var link_obj=SKElement.GetFirstElementByTag(menu_item.element,'A');if(typeof disabled_check_for_link=='undfined'||!disabled_check_for_link)
if(link_obj.href.indexOf('javascript:void(null)')==-1)
return;var menu_obj;if($(menu_item.sub_menu_id)){menu_obj=new SKMenu($(menu_item.sub_menu_id),menu_item.root_obj);}else{menu_obj=menu_item.SubMenu();}
if(!menu_obj||typeof menu_obj=='undefined')
return;if(menu_item.HasLock(SELECTED_CLASS_NAME)){menu_item.RemoveLock(SELECTED_CLASS_NAME);menu_item.HideAnimation();}else{menu_item.SetLock(SELECTED_CLASS_NAME);menu_item.ShowAnimation();}}};var SKAnimations={};SKAnimations.COMMON={"options":{"onComplete":function(obj){var fx=(obj)?obj:this;if(fx.element&&fx.element.getStyle('visibility')=='hidden')
fx.element.setStyle('visibility','visible');if(fx.element&&fx.element.getStyle('position')=='absolute')
fx.element.setStyle('position','static');}}}
SKAnimations.DEFAULT={"effect":function(item,options){var sub_menu=item.SubMenu();var holder=sub_menu.GetHolder();return new Fx.Tween(holder,options);},"show":function(fx){fx.element.parentNode.setStyle('display','block');},"hide":function(fx){fx.element.parentNode.setStyle('display','none');},"reset":function(fx){fx.element.parentNode.setStyle('display','none');fx.element.setStyle('visibility','visible');fx.element.parentNode.setStyle('position','static');}};SKAnimations.SLIDE={"visible":1,"out":0,"undef":1,"effect":function(item,options){var sub_menu=item.SubMenu();var holder=sub_menu.GetHolder();var children=holder.getChildren();var sub_nav=null;for(var i=0;i<children.length;i++)
if(children[i].className.indexOf('subNav')!=-1)
sub_nav=children[i];if(sub_nav){holder.parentNode.setStyles({'margin':sub_nav.getStyle('margin')});sub_nav.setStyle('margin','0px');}
holder.store('wrapper',holder.parentNode)
return new Fx.Slide(holder,options);},"show":function(fx){fx.element.set('undef',0);fx.element.set('visible',1);fx.element.set('out',0);fx.cancel();fx.slideIn();},"hide":function(fx){fx.element.set('undef',0);fx.element.set('visible',0);fx.element.set('out',1);fx.cancel();fx.slideOut();},"reset":function(fx){fx.cancel();fx.slideOut();fx.element.set('visible',0);},"options":{"mode":'vertical',"transition":Fx.Transitions.Cubic.easeOut,"onComplete":function(){if(this.to[0]<0){if(this.element.get('out')==1){this.element.set('visible',0);}
SKAnimations.COMMON.options.onComplete(this);}else{if(this.element.get('undef')==0){this.element.set('visible',1);}}}}};SKAnimations.SLIDE_HORIZONTAL={"effect":SKAnimations.SLIDE.effect,"show":SKAnimations.SLIDE.show,"hide":SKAnimations.SLIDE.hide,"reset":SKAnimations.SLIDE.reset,"options":{"mode":'horizontal',"transition":Fx.Transitions.Cubic.easeOut,"onComplete":function(){SKAnimations.COMMON.options.onComplete(this);}}};SKAnimations.SLIDE_DOWN={"effect":SKAnimations.SLIDE.effect,"show":SKAnimations.SLIDE.show,"hide":SKAnimations.SLIDE.hide,"reset":SKAnimations.SLIDE.reset,"options":{"onComplete":function(){SKAnimations.SLIDE.options.onComplete.run([],this);this.element.setStyle('height','auto');this.element.getParent().setStyle('height','auto');}}};SKAnimations.FADE={"effect":function(item,options){var sub_menu=item.SubMenu();var holder=sub_menu.GetHolder();return new Fx.Tween(holder,options);},"show":function(fx){fx.cancel();fx.start('opacity',1);},"hide":function(fx){fx.cancel();fx.start('opacity',0);},"reset":function(fx){fx.cancel();fx.start('opacity',[0,0]);},"options":{"transition":Fx.Transitions.Cubic.easeOut,"onStart":function(){if(this.to[0].value==1)
this.element.parentNode.setStyle('display','block')},"onComplete":function(){SKAnimations.COMMON.options.onComplete(this);if(this.to[0].value==0)
this.element.parentNode.setStyle('display','none');}}};SKMenuOptions.element={};SKMenuOptions.helpers={};var SKDesigns={};SKDesigns.Default={"behavior_type":SKMenuOptions.behaviors.DEFAULT,"holders":SKMenuOptions.holders.DEFAULT,"dimensions":SKMenuOptions.dimensions.DEFAULT,"slider":SKMenuOptions.slider.DEFAULT,"timeout":SKMenuOptions.timeouts.DEFAULT,"callbacks":SKMenuOptions.callbacks.DEFAULT,"scroll":false}


var hashFirstElementMap=[];var ITEMS_CACHE=[];var ITEMS_FX={};var ITEMS_LOCKS={};function SKElement(){};function SKUtils(){};var SKMenu=new Class({Extends:SKElement,initialize:function(element,root_obj){this.element=element;if(typeof root_obj!='undefined'){this.root_obj=root_obj;}
this.width=0;this.height=0;this.icon_width=this.root_obj.icon_width;},Items:function(){if(typeof this.menu_items=='undefined'){this.menu_items=[];var list_items=new Array();var element=this.element;if(!element||typeof element.tagName=='undefined')return;if(element.tagName.toUpperCase()=='UL'){list_items=SKElement.GetChildrenByTag(element,'LI');}
if(element.tagName.toUpperCase()=='TABLE'){var oTBody=null;for(var i=0;i<element.childNodes.length;i++)
if(element.childNodes[i].tagName&&element.childNodes[i].tagName.toUpperCase()=='TBODY')
oTBody=element.childNodes[i];var arrTableRows=oTBody.childNodes;for(var i=0;i<arrTableRows.length;i++){var arrTableCells=SKElement.GetChildrenByTag(arrTableRows[i],'TD');arrTableCells.each(function(item,index){if(SKElement.ContainsElementOfClass(item,'menu_contents'))list_items.push(item);});}}
for(var i=0;i<list_items.length;i++){var internal_link=$(list_items[i]).retrieve('internal_link');var menu_item=new SKMenuItem(list_items[i],{parent_id:this.element.id,position:i,root_obj:this.root_obj,internal_link:internal_link});this.menu_items.push(menu_item);}}
return this.menu_items;},ParentMenu:function(){var parent=SKElement.ParentListElement(this.element);return new SKMenu(parent,this.root_obj);},ParentMenuItem:function(){var parent_item;var parent_element=SKElement.GetParentByTag(this.element,"LI");if(typeof parent_element=='undefined')
parent_element=SKElement.GetParentByTag(this.element,"TD");if(typeof parent_element!='undefined')
parent_item=new SKMenuItem($(parent_element),{root_obj:this.root_obj});return parent_item;},CalculatePositionRelativeToMainMenu:function(orientation,submenu_layout){var bTableLayout=0;var effects_wrapper=SKElement.GetParentByClassName($(this.element),'effects_wrapper');if(typeof effects_wrapper=='undefined')return;var effects_holder=SKElement.GetParentByClassName($(this.element),'effects_holder');if(typeof effects_holder=='undefined')return;var submenu_width=effects_holder.getStyle("width");if(submenu_width&&typeof submenu_width!='undefined'&&submenu_width!='0px'&&submenu_width!='auto'){submenu_width=SKUtils.SizeToNumber(submenu_width);}else{if(effects_holder.parentNode.getStyle("display")=='none'){effects_holder.parentNode.setStyle('display','block');submenu_width=effects_holder.offsetWidth;effects_holder.parentNode.setStyle('display','none');}else if(effects_holder.getStyle("display")=='none'){effects_wrapper.style.left='';effects_wrapper.style.position='relative';effects_wrapper.style.position='absolute';effects_wrapper.addClass('tmp');effects_holder.setStyle('display','block');submenu_width=effects_holder.offsetWidth;effects_holder.setStyle('display','none');effects_wrapper.removeClass('tmp');}else{submenu_width=effects_holder.offsetWidth;}}
var main_menu=SKElement.GetParentByTag($(this.element),'UL');var main_menu_wrapper=SKElement.GetParentByTag(main_menu,'DIV');if(typeof main_menu=='undefined'){main_menu=SKElement.GetParentByTag($(this.element),'TABLE');main_menu_wrapper=SKElement.GetParentByTag(main_menu,'TD');bTableLayout=1;}
var main_menu_width=this.root_obj.menu_width;if(main_menu.offsetWidth>main_menu_width)
main_menu_width=main_menu.offsetWidth;if(main_menu_wrapper.offsetWidth>main_menu_width)
main_menu_width=main_menu_wrapper.offsetWidth;var left_offset=null;var layer=SKElement.GetParentByClassName($(this.element),'effects_wrapper');if(!bTableLayout){var main_menu_list_item=SKElement.GetParentByTag($(this.element),'LI');var main_menu_left_x=SKElement.GetFirstElementByTag(main_menu,'LI').offsetLeft;var main_menu_right_x=main_menu_width;var menu_item_left_x=main_menu_list_item.offsetLeft-main_menu_left_x;if(main_menu_right_x-menu_item_left_x>submenu_width){left_offset=0;}else{left_offset=main_menu_right_x-submenu_width-menu_item_left_x;}}
if(bTableLayout){var main_menu_table_cell=SKElement.GetParentByTag($(this.element),'TD');var menu_wrapper_left=main_menu_wrapper.offsetLeft;var menu_left=main_menu.offsetLeft;var menu_item_width=main_menu_table_cell.offsetWidth;var menu_item_left=main_menu_table_cell.offsetLeft;if(document.all){var menu_wrapper_border=SKElement.GetBorderWidth(main_menu_wrapper);if(menu_wrapper_border)
menu_left+=menu_wrapper_border.left;}
var main_menu_wrapper_right_x=menu_wrapper_left+main_menu_width;var menu_item_left_x=menu_item_left+menu_left;if(main_menu_wrapper_right_x-menu_item_left_x>submenu_width){left_offset=layer.offsetLeft;}else{left_offset=layer.offsetLeft-(submenu_width-(main_menu_wrapper_right_x-menu_item_left_x));if(orientation==HORIZONTAL){var margin_left=(-1)*(submenu_width-(main_menu_wrapper_right_x-menu_item_left_x));$(layer).setStyles({'margin-left':margin_left+"px"});return;}}
if(submenu_layout==DROPDOWN_AT_RIGHT){var margin_top=(-1)*main_menu_table_cell.offsetHeight;var margin_left=main_menu_table_cell.offsetWidth;$(layer).setStyles({'margin-left':margin_left+"px"});$(layer).setStyles({'margin-top':margin_top+"px"});return;}}
$(layer).setStyles({left:left_offset+"px"});},CalculateWidth:function(){var items=this.Items();var padding=(typeof this.padding!='undefined')?this.padding:0;var total_width=0;for(var i=0;i<items.length;i++){var item=items[i];var anchor_element=item.FirstLink();if(typeof anchor_element!='undefined'&&anchor_element!=null){var anchor_width=SKUtils.SizeToNumber($(anchor_element).getStyle("width"));if(typeof anchor_width=='undefined'||anchor_width==null||anchor_width==0)
anchor_width=$(anchor_element).offsetWidth;if(typeof anchor_width!='undefined'&&anchor_width!=null)
total_width+=anchor_width;if(!document.all){var anchor_pl=SKUtils.SizeToNumber($(anchor_element).getStyle("padding-left"));var anchor_pr=SKUtils.SizeToNumber($(anchor_element).getStyle("padding-right"));var anchor_ml=SKUtils.SizeToNumber($(anchor_element).getStyle("margin-left"));var anchor_mr=SKUtils.SizeToNumber($(anchor_element).getStyle("margin-right"));if(typeof anchor_pl!='undefined'&&anchor_pl!=null)total_width+=anchor_pl;if(typeof anchor_pr!='undefined'&&anchor_pr!=null)total_width+=anchor_pr;if(typeof anchor_ml!='undefined'&&anchor_ml!=null)total_width+=anchor_ml;if(typeof anchor_mr!='undefined'&&anchor_mr!=null)total_width+=anchor_mr;}}}
if(total_width>0){total_width+=padding;this.width=total_width;}},StretchAdmin:function(current_layout,icon_width){if(typeof current_layout=='undefined'){current_layout=this.root_obj.submenu_layout;}
if(typeof icon_width=='undefined'){icon_width=this.root_obj.icon_width;}
if(this.root_obj.admin){var items_count=(this.Items()).length;var count=(current_layout==0)?items_count:1;if(this.width==0||typeof this.width=='undefined'||this.width==null){this.width=$(this.element).getStyle("width");this.width=SKUtils.SizeToNumber(this.width)-0;}
this.width+=(count*icon_width);this.SetHolderWidth(this.width);this.SetMenuWidth(this.width);}},SetMenuWidth:function(new_width){var type_str=typeof new_width;if(type_str!="undefined"&&(type_str=="string"||type_str=="number")){$(this.element).setStyles({width:new_width+"px"});}},SetHolderWidth:function(new_width){var holder=this.GetHolder();if(holder){$(holder).setStyles({width:new_width+"px"});}},GetHolder:function(){var holder;var parent_menu=this.ParentMenuItem();if(typeof parent_menu!='undefined'){var parent_id=parent_menu.element.id;var key='#'+parent_id+' .effects_holder';if(!ITEMS_CACHE[key]){ITEMS_CACHE[key]=new Object();var layers=$$(key);if(layers.length>0){holder=layers[0];}
ITEMS_CACHE[key]=holder;}else{holder=ITEMS_CACHE[key];}}
return holder;}});var SKMenuItem=new Class({Extends:SKElement,initialize:function(element,props){this.element=element;this.state_marker_element=null;this.fx=ITEMS_FX[this.element.id];this.locks=new Array();if(ITEMS_LOCKS[this.element.id]){this.locks=ITEMS_LOCKS[this.element.id];}
if(typeof props!='undefined'){this.parent_id=props.parent_id;this.position=props.position;this.root_obj=props.root_obj;if(typeof props.internal_link!='undefined'){this.internal_link=props.internal_link;}}
var first_div=SKElement.GetFirstElementByTag(this.element,'DIV');if(first_div&&first_div.id.indexOf('state_marker')!=-1){this.state_marker_element=first_div;}},SubMenu:function(){var element=this.element;var sub_menu_element=SKElement.GetFirstElementByTag(this.element,"UL");if(typeof sub_menu_element=='undefined')
sub_menu_element=SKElement.GetFirstElementByTag(this.element,"TABLE");if(typeof sub_menu_element!='undefined'){var sub_menu=new SKMenu(sub_menu_element,this.root_obj);return sub_menu;}},Siblings:function(){var parent_menu=this.ParentMenu();var id=this.element.id;var menu_items=parent_menu.Items();var siblings=[];for(var i=0;i<menu_items.length;i++){var sibling=menu_items[i];if(sibling.element.id!=id){siblings.push(sibling);}}
return siblings;},FirstLink:function(){var first_link=SKElement.GetFirstElementByTag(this.element,'A');if(typeof first_link!='undefined'&&first_link.className.indexOf('menu_contents')!=-1||SKElement.ContainsElementOfClass(first_link,'menu_contents'))
{return first_link;}
return null;},GetContentsElement:function(){var contents_element;var id=this.element.id;var key="#"+id+" .menu_contents";if(!ITEMS_CACHE[key]){ITEMS_CACHE[key]=new Object();var layers=$$(key);if(layers.length>0){contents_element=layers[0];}
ITEMS_CACHE[key]=contents_element;}else{contents_element=ITEMS_CACHE[key];}
return contents_element;},ParentMenu:function(){var parent=SKElement.ParentListElement(this.element);return new SKMenu(parent,this.root_obj);},ParentMenuItem:function(){var parent_item;var parent_element=SKElement.GetParentByTag(this.element,"LI");if(typeof parent_element!='undefined'){parent_item=new SKMenuItem($(parent_element),{root_obj:this.root_obj});}
return parent_item;},IsSubItem:function(){var parent_item=this.ParentMenuItem();return(typeof parent_item!='undefined');},SetSelected:function(){if(this.state_marker_element&&typeof this.state_marker_element!='undefined'&&this.state_marker_element.className.indexOf(CURRENT_CLASS_NAME)==-1)
{this.state_marker_element.className=SELECTED_CLASS_NAME;}
this.FlipImages(0);var slider_name=this.element.id+"_slider";var slider=SKSliders[slider_name];if(slider){window.setTimeout(function(){SKSlider.TwoWaySlide(slider,1);},200);}},UnsetSelected:function(){if(this.state_marker_element&&typeof this.state_marker_element!='undefined'&&this.state_marker_element.className.indexOf(CURRENT_CLASS_NAME)==-1)
{this.state_marker_element.className='';}
this.FlipImages(1);var slider_name=this.element.id+"_slider";var slider=SKSliders[slider_name];if(slider){window.setTimeout(function(){SKSlider.TwoWaySlide(slider,-1);},200);}},IsSelected:function(){if(this.state_marker_element&&typeof this.state_marker_element!='undefined'&&this.state_marker_element.className.indexOf(SELECTED_CLASS_NAME)!=-1)
return true;return false;},IsCurrent:function(){if(this.state_marker_element&&typeof this.state_marker_element!='undefined'&&this.state_marker_element.className.indexOf(CURRENT_CLASS_NAME)!=-1)
return true;return false;},FlipImages:function(image_index){if(image_index!=0)image_index=1;var other_index=(image_index==0)?1:0;var contents_element=this.GetContentsElement();if(typeof contents_element!='undefined'){var image_elements=SKElement.GetChildrenByTag(contents_element,"IMG",true);if(image_elements.length==2){image_elements[other_index].style.display='none';image_elements[image_index].style.display='';}}},HideSiblings:function(){var siblings=this.Siblings();for(var i=0;i<siblings.length;i++){var sibling=siblings[i];if(sibling.IsSelected()||sibling.IsCurrent()){SKEffectsFactory.ForceHide(sibling);}}},Synchronized:function(flag){var id=this.element.id;var new_value;var old_value=SKEffectsFactory.Synchronization[id];new_value=(typeof flag!='undefined')?flag:((typeof old_value=='undefined')?false:old_value)
SKEffectsFactory.Synchronization[id]=new_value;return new_value;},SynchronizeSiblings:function(flag){var siblings=this.Siblings()
for(var i=0;i<siblings.length;i++){var id=siblings[i].element.id;SKEffectsFactory.Synchronization[id]=false;}},SubSynchronized:function(child,increment){var id;if(typeof child=='undefined'||child==false){return(SKEffectsFactory.SubSynchronization[this.element.id]<2);}
else{var parent_item=this.ParentMenuItem();if(typeof parent_item=='undefined'){return(SKEffectsFactory.SubSynchronization[this.element.id]<2);}
id=parent_item.element.id;}
var old_value=SKEffectsFactory.SubSynchronization[id];var new_value;if(typeof increment!='undefined'){if(typeof old_value=='undefined'){new_value=0;}
new_value+=increment;}
else{new_value=(typeof old_value=='undefined')?1:0;}
SKEffectsFactory.SubSynchronization[id]=new_value;return new_value;},ShowAnimation:function(){if(ITEMS_FX[this.element.id])
this.root_obj.animation_props.show(ITEMS_FX[this.element.id]);},HideAnimation:function(){if(ITEMS_FX[this.element.id])
this.root_obj.animation_props.hide(ITEMS_FX[this.element.id]);},SetLock:function(lock_id){this.locks.push(lock_id);if(!ITEMS_LOCKS[this.element.id])
ITEMS_LOCKS[this.element.id]=new Array();ITEMS_LOCKS[this.element.id].push(lock_id);},HasLock:function(lock_id){for(var i=0;i<this.locks.length;i++)
if(this.locks[i]==lock_id)
return true;return false;},RemoveLock:function(lock_id){for(var i=0;i<this.locks.length;i++)
if(this.locks[i]==lock_id)
delete this.locks[i];if(!ITEMS_LOCKS[this.element.id])
ITEMS_LOCKS[this.element.id]=new Array();ITEMS_LOCKS[this.element.id]=this.locks;}});var SKMainMenu=new Class({Extends:SKMenu,initialize:function(id,props){this.root_id=id;this.element=$(id);this.menu;this.callbacks={};this.slider={};this.scroll=true;this.timeout={};this.width;this.admin=false;this.submenu_layout=0;this.orientation=0;this.style=0;this.icon_width=12;this.animation_props={};this.holders={}
if(typeof props=='undefined'){props={};}
if(typeof props.design!='undefined'){props=SKUtils.MergeHashes(props.design,props);}
this.dimensions={};this.menu_width=$(this.element).getStyle('width');if(typeof this.menu_width=='string'&&this.menu_width!=null){this.menu_width=SKUtils.SizeToNumber(this.menu_width);}
this.InitializeProperty(this.menu_width,props,"menu_width",this.menu_width);if(this.menu_width>0){$(this.element).setStyles({width:this.menu_width});}
if(typeof props.event_type!='undefined'){this.events=props.event_type;}
else{this.InitializeSubProperties(this.events,props,"events",SKMenuOptions.events.DEFAULT);}
if(typeof props.behavior_type!='undefined'){this.behaviors=props.behavior_type;}
else{this.InitializeProperty(this.behaviors,props,"behaviors",SKMenuOptions.behaviors.DEFAULT);}
if(typeof props.timeout!='undefined'){this.timeout=props.timeout;}
else{this.InitializeSubProperties(this.timeout,props,"timeout",SKMenuOptions.timeouts.DEFAULT);}
this.InitializeSubProperties(this.slider,props,"slider",SKMenuOptions.slider.DEFAULT);this.InitializeSubProperties(this.callbacks,props,"callbacks",SKMenuOptions.callbacks.DEFAULT);this.InitializeProperty(this.scroll,props,"scroll",this.scroll);this.InitializeProperty(this.admin,props,"admin",this.admin);this.InitializeProperty(this.submenu_layout,props,"submenu_layout",this.submenu_layout);this.InitializeProperty(this.orientation,props,"orientation",this.orientation);this.InitializeProperty(this.style,props,"style",this.style);this.InitializeProperty(this.icon_width,props,"icon_width",this.icon_width);this.InitializeProperty(this.animation_props,props,"animation_props",SKAnimations.DEFAULT);this.dimensions=(typeof props.dimensions!='undefined')?props.dimensions:SKMenuOptions.dimensions.DEFAULT;this.holders=(typeof props.holders!='undefined')?props.holders:SKMenuOptions.holders.DEFAULT;this.helpers=(typeof props.helpers!='undefined')?props.helpers:{};},InitializeProperty:function(property,props,property_name,default_value){if(props&&typeof props[property_name]!='undefined'){property=props[property_name];}
else{property=default_value;}
this[property_name]=property;},InitializeSubProperties:function(property,props,property_name,default_value){var properties;if(props&&typeof props[property_name]!='undefined'){properties=props[property_name];for(var sub_property in default_value){if(typeof properties[sub_property]!='undefined'){property[sub_property]=properties[sub_property];}
else{property[sub_property]=default_value[sub_property];}}}
else{property=default_value;}
this[property_name]=property;},SetSubmenuPosition:function(item){if(this.orientation==VERTICAL&&this.submenu_layout==DROPDOWN_BETWEEN_ITEMS)
return;var sub_menu;if($(item.sub_menu_id)){sub_menu=new SKMenu($(item.sub_menu_id),item.root_obj);}else{sub_menu=item.SubMenu();}
if(typeof sub_menu!='undefined')
sub_menu.CalculatePositionRelativeToMainMenu(this.orientation,this.submenu_layout);},traverse:function(callback){var id=this.element.id;this.menu=new SKMenu($(id),this);if(typeof callback!='undefined'){callback(id);}
if(this.callbacks["before_traverse"])
this.callbacks["before_traverse"](this);var menu_items=this.menu.Items();if(!menu_items||typeof menu_items=='undefined')return;for(var i=0;i<menu_items.length;i++){var menu_item=menu_items[i];SKEffectsFactory.TraverseMenuItem(menu_item);}
for(var i=0;i<menu_items.length;i++){var item=menu_items[i];SKEffectsFactory.ApplyMenuItemEffects(item,this);}
if(this.callbacks["after_traverse"]){this.callbacks["after_traverse"](this);}}});SKElement.GetChildrenByTag=function(element,tag,recursively){if(!element||typeof element=='undefined'||!tag||typeof tag=='undefined'||!element.childNodes||typeof element.childNodes=='undefined')return;var arrChildren=new Array();var arrTempChildren=element.childNodes;if(recursively)
arrTempChildren=SKElement.GetDOMChildren(element);for(var i=0;i<arrTempChildren.length;i++){var child=arrTempChildren[i];if(typeof child.tagName!='undefined'&&child.tagName.toUpperCase()==tag){arrChildren.push(child);}}
return arrChildren;}
SKElement.GetDOMChildren=function(oRoot){var arrChildren=[oRoot];var i=0;while(i<arrChildren.length){if(arrChildren[i].childNodes&&arrChildren[i].childNodes.length>0){for(var j=0;j<arrChildren[i].childNodes.length;j++)
arrChildren.push(arrChildren[i].childNodes[j])}
i++;}
return arrChildren;}
SKElement.ParentListElement=function(element){if(!element||typeof element=='undefined')return null;var parent;while(element.parentNode){parent=element.parentNode;if(typeof parent.tagName=='undefined')break;var tag_name=parent.tagName.toUpperCase();if(tag_name=="UL"||tag_name=="OL"||tag_name=="TABLE"){break;}
element=parent;}
element=parent;return element;}
SKElement.GetFirstElementByTag=function(element,tag){if(typeof element.id!='undefined'&&element.id!=''&&typeof hashFirstElementMap[element.id]!='undefined'&&typeof hashFirstElementMap[element.id][tag]!='undefined'){return hashFirstElementMap[element.id][tag];}
var iPointer=0;var arrChildNodes=[];arrChildNodes.push(element);while(iPointer<arrChildNodes.length){if(arrChildNodes[iPointer]&&arrChildNodes[iPointer].childNodes)
{arrTemp=arrChildNodes[iPointer].childNodes;for(var i=0;i<arrTemp.length;i++){if(typeof arrTemp[i].tagName!='undefined'&&arrTemp[i].tagName.toUpperCase()==tag){if(typeof hashFirstElementMap[element.id]=='undefined')
hashFirstElementMap[element.id]=[];hashFirstElementMap[element.id][tag]=arrTemp[i];return arrTemp[i];}else{arrChildNodes.push(arrTemp[i]);}}}
iPointer++;}}
SKElement.GetParentByTag=function(element,tag){if(!element||typeof element=='undefined')return;var parent;var found=false;while(element.parentNode){parent=element.parentNode;if(parent.tagName&&parent.tagName.toUpperCase()==tag){found=true;break;}
element=parent;}
var not_found;element=(found)?parent:not_found;return element;}
SKElement.GetParentByClassName=function(element,sClassName){var parent;var found=false;while(element.parentNode){parent=element.parentNode;if(parent.className&&parent.className.indexOf(sClassName)!=-1){found=true;break;}
element=parent;}
var not_found;element=(found)?parent:not_found;return element;}
SKElement.GetBorderWidth=function(element){var oBorderWidth=new Object();oBorderWidth.top=0;oBorderWidth.right=0;oBorderWidth.bottom=0;oBorderWidth.left=0;if(typeof element.getStyle=='undefined')
return null;sCSSAttributeValue=element.getStyle("border-width");if(!sCSSAttributeValue||typeof sCSSAttributeValue=='undefined')
return null;if(sCSSAttributeValue=='thin'||sCSSAttributeValue=='medium'||sCSSAttributeValue=='thick')
return null;var arrBorderWidth=new Array();arrBorderWidth=sCSSAttributeValue.split(' ');if(!arrBorderWidth||typeof arrBorderWidth=='undefined')
return null;switch(arrBorderWidth.length){case 1:oBorderWidth.top=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.right=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.bottom=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.left=SKUtils.SizeToNumber(arrBorderWidth[0]);break;case 2:oBorderWidth.top=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.right=SKUtils.SizeToNumber(arrBorderWidth[1]);oBorderWidth.bottom=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.left=SKUtils.SizeToNumber(arrBorderWidth[1]);break;case 3:oBorderWidth.top=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.right=SKUtils.SizeToNumber(arrBorderWidth[1]);oBorderWidth.bottom=SKUtils.SizeToNumber(arrBorderWidth[2]);oBorderWidth.left=SKUtils.SizeToNumber(arrBorderWidth[1]);break;case 4:oBorderWidth.top=SKUtils.SizeToNumber(arrBorderWidth[0]);oBorderWidth.right=SKUtils.SizeToNumber(arrBorderWidth[1]);oBorderWidth.bottom=SKUtils.SizeToNumber(arrBorderWidth[2]);oBorderWidth.left=SKUtils.SizeToNumber(arrBorderWidth[3]);break;default:return null;}
return oBorderWidth;}
SKElement.MoveChild=function(container,child){var container=$(container);container.appendChild($(child));}
SKElement.ContainsElementOfClass=function(element,class_name){if(typeof element=='undefined'){return false;}
var children=element.childNodes;var result=false;for(var i=0;i<children.length;i++){var child=children[i];if(typeof child.tagName!='undefined'){if($(child).className.indexOf(class_name)!=-1){return true;}
result=SKElement.ContainsElementOfClass(child,class_name);if(result==true){return true;}}}
return false;}
SKUtils.SizeToNumber=function(size){if(typeof size=='undefined'||size==null)return 0;var result=size;if(typeof size=='string'){result=size.replace("px","");result.replace("pt","");}
result-=0;return result;}
SKUtils.SetOnLoad=function(callback){var old_func=null;if(typeof window.onload=='function'){old_func=window.onload;window.onload=function(){old_func();callback();}}
else{window.onload=function(){callback();}};}
SKUtils.ExtendMethod=function(object,method,ext){var old=object[method];object[method]=function(arg){if(old){object._=old;object._(arg);}
object._=ext;object._(arg);}}
SKUtils.PrepareMenuContainer=function(container_id,submenu_layout){var class_name=container_id+"_"+submenu_layout;if(!$(container_id)){container_element=document.createElement("div");container_element.id=container_id;var body=document.getElementsByTagName("body")[0]
body.insertBefore(container_element,body.firstChild)}
$(container_id).addClass(class_name);$(container_id).removeClass(container_id+"_"+submenu_layout);}
SKUtils.RemoveElement=function(container_id){if($(container_id)){var parent_element=$(container_id).parentNode;parent_element.removeChild($(container_id))}}
SKUtils.MergeHashes=function(org_hash,new_hash){var result=$H(org_hash);return result.combine($H(new_hash));}
SKUtils.GetCurrentPageUrl=function(){return document.location.href;}


var EFFECTS_FACTORY_CACHE=[];function SKEffectsFactory(){this.timeout=100;this.handles={};this.visible_items={};this.menu_items;};var SKEffectsFactoryObj=new SKEffectsFactory();SKEffectsFactory.Synchronization={};SKEffectsFactory.SubSynchronization={};function SKMenuBehaviors(){};SKMenuBehaviors.behaviors={};SKMenuBehaviors.events={};SKMenuBehaviors.timeouts={};SKMenuBehaviors.types={};SKEffectsFactory.cm=0;SKEffectsFactory.hide=0;SKEffectsFactory.Hide=function(item,callback,timeout){if(typeof item=="undefined")return;var id=item.element.id;if(typeof callback=="undefined"){callback=SKMenuBehaviors.types.DEFAULT["onhide"];}
this.CancelTimeout(id)
if(item.IsSubItem()||timeout==0){callback(item);}
else{SKEffectsFactoryObj.handles[id]=window.setTimeout(function(){callback(item);},timeout);}}
SKEffectsFactory.ForceHide=function(menu_item){if(typeof menu_item=="undefined")return;var id=menu_item.element.id;var root_obj=menu_item.root_obj;var callback=root_obj.behaviors["onhide"];var timeout=root_obj.timeout.rollover_next;this.CancelTimeout(id);SKEffectsFactoryObj.handles[id]=window.setTimeout(function(){callback(menu_item);},timeout);}
SKEffectsFactory.KeepVisible=function(item){if(typeof item=="undefined")return;var id=item.element.id;this.CancelTimeout(id);}
SKEffectsFactory.CancelTimeout=function(id){if(typeof id=="undefined")return;if(typeof SKEffectsFactoryObj.handles[id]!='undefined'&&SKEffectsFactoryObj.handles[id]){window.clearTimeout(SKEffectsFactoryObj.handles[id]);SKEffectsFactoryObj.handles[id]=null;}}
SKEffectsFactory.KeepVisibleMany=function(items){if(typeof items=="undefined")return;for(var i=0;i<items.length;i++){var item=items[i];SKEffectsFactory.KeepVisible(item);}}
SKEffectsFactory.ApplyMenuItemEffects=function(menu_item){var list_item=menu_item.element;var root_obj=menu_item.root_obj;var sub_list;if($(menu_item.sub_menu_id)){sub_list=new SKMenu($(menu_item.sub_menu_id),menu_item.root_obj);}else{sub_list=menu_item.SubMenu();}
var menu_obj=sub_list;var callback_show=root_obj.behaviors["onshow"];var callback_hide=root_obj.behaviors["onhide"];var callback_click=root_obj.behaviors["onclick"];var timeout_show=root_obj.timeout.show;var timeout_hide=root_obj.timeout.hide;var timeout_click=root_obj.timeout.click;if(menu_item.IsSubItem()){timeout_show=root_obj.timeout.show_sub;timeout_hide=root_obj.timeout.hide_sub;}
else{if(typeof root_obj.timeout.hide_no_sub!='undefined'&&typeof sub_list=='undefined'){timeout_hide=root_obj.timeout.hide_no_sub;}}
var behavior={};behavior.show={'show':[],'hide':[]};behavior.hide={'show':[],'hide':[]};behavior.click={'click':[]};if(typeof sub_list!="undefined"){behavior.show['show'].push(sub_list);behavior.click['click'].push(sub_list);}
var parent_menu=menu_item.ParentMenu();if(typeof parent_menu!="undefined"){behavior.show['show'].push(parent_menu);behavior.click['click'].push(parent_menu);}
behavior.hide['hide'].push(menu_item);var event={};event.show=function(){SKEffectsFactory.hide=0;var id=menu_item.element.id;var menu_obj;if($(menu_item.sub_menu_id)){menu_obj=new SKMenu($(menu_item.sub_menu_id),menu_item.root_obj);}else{menu_obj=menu_item.SubMenu();}
if(!menu_item.IsSubItem()&&menu_item.SubSynchronized()){return;}
else{menu_item.SubSynchronized(true);}
if(typeof SKEffectsFactoryObj.handles[id]!='undefined'){window.clearTimeout(SKEffectsFactoryObj.handles[id]);}
var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){window.clearTimeout(SKEffectsFactoryObj.handles[parent_item.element.id]);}
SKEffectsFactoryObj.handles[id]=window.setTimeout(function(){callback_show(menu_item);SKEffectsFactory.KeepVisibleMany(behavior.show['show']);},timeout_show);};event.hide=function(){SKEffectsFactory.hide=1;var to=timeout_hide;if(SKEffectsFactory.cm>0){SKEffectsFactory.CMDelayHide(arguments.callee);return;}
if(menu_item.IsSubItem()){menu_item.SubSynchronized(true,1);}
else{if(SKEffectsFactory.SubSynchronization[menu_item.element.id]>=1){SKEffectsFactory.SubSynchronization[menu_item.element.id]=2;}}
SKEffectsFactory.Hide(menu_item,callback_hide,timeout_hide);};event.click=function(e){var event_obj;if(e.target){event_obj=e.target;}else{event_obj=e.srcElement;}
var event_obj_parent_anchor;if(event_obj&&typeof event_obj!='undefined'){if(event_obj.tagName.toUpperCase()=='A'){event_obj_parent_anchor=event_obj;}else{event_obj_parent_anchor=SKElement.GetParentByTag(event_obj,'A');}}
if(event_obj_parent_anchor&&typeof event_obj_parent_anchor!='undefined'){if(typeof event_obj_parent_anchor.className!='undefined'&&event_obj_parent_anchor.className.indexOf('subItem')!=-1)
return;}
var id=menu_item.element.id;var menu_obj;if($(menu_item.sub_menu_id)){menu_obj=new SKMenu($(menu_item.sub_menu_id),menu_item.root_obj);}else{menu_obj=menu_item.SubMenu();}
if(!menu_item.IsSubItem()&&menu_item.SubSynchronized()){return;}
else{menu_item.SubSynchronized(true);}
if(typeof SKEffectsFactoryObj.handles[id]!='undefined'){window.clearTimeout(SKEffectsFactoryObj.handles[id]);}
var parent_item=menu_item.ParentMenuItem();if(typeof parent_item!='undefined'){window.clearTimeout(SKEffectsFactoryObj.handles[parent_item.element.id]);}
SKEffectsFactoryObj.handles[id]=window.setTimeout(function(){callback_click(menu_item);SKEffectsFactory.KeepVisibleMany(behavior.click['click']);},timeout_click);}
var event_conf=root_obj.events;SKEffectsFactory.AddEventListeners(list_item,event_conf,event);}
SKEffectsFactory.AddEventListeners=function(element,event_conf,event){for(var event_name in event_conf){var callback_name=event_conf[event_name];if(typeof callback_name!='undefined'){$(element.id).addEvent(event_name,event[callback_name]);}}}
SKEffectsFactory.GenerateItemID=function(item){if(!$defined(item.id)||item.id==""){item.id="item_"+(new Date()).getTime()+"_"+Math.round(10000*Math.random());}}
SKEffectsFactory.TraverseMenuItem=function(menu_item){var parent_id=menu_item.parent_id;var count=menu_item.position;var root_obj=menu_item.root_obj;SKEffectsFactory.GenerateItemID(menu_item.element);var contents=menu_item.GetContentsElement();if(typeof root_obj.holders.item!='undefined'&&typeof contents!='undefined'){SKEffectsFactory.GenerateHolders(contents,root_obj.holders.item)}
var sub_menu=menu_item.SubMenu();if(typeof sub_menu!='undefined'){SKEffectsFactory.GenerateItemID(sub_menu.element);menu_item.sub_menu_id=sub_menu.element.id;if(!EFFECTS_FACTORY_CACHE[sub_menu.element.id])
EFFECTS_FACTORY_CACHE[sub_menu.element.id]=new Object();if(!EFFECTS_FACTORY_CACHE[sub_menu.element.id].width)
EFFECTS_FACTORY_CACHE[sub_menu.element.id].width=0;if(!EFFECTS_FACTORY_CACHE[sub_menu.element.id].height)
EFFECTS_FACTORY_CACHE[sub_menu.element.id].height=0;if(typeof root_obj.holders.submenu!='undefined'){SKEffectsFactory.GenerateHolders(sub_menu.element,root_obj.holders.submenu)}
var holder=sub_menu.GetHolder();holder.addEvent('click',function(event){event.stopPropagation();});var sub_items=sub_menu.Items();if(typeof contents!='undefined'){for(var j=0;j<sub_items.length;j++){var sub_item=sub_items[j];SKEffectsFactory.GenerateItemID(sub_item.element);contents=sub_item.GetContentsElement();if(!contents)continue;var oDummy=contents.cloneNode(true);oDummy.className=(root_obj.submenu_layout==0)?contents.className+'__dummy_0':contents.className+'__dummy_1';document.body.appendChild(oDummy)
var iWidth=oDummy.offsetWidth;var iHeight=oDummy.offsetHeight;if(iHeight==0)
iHeight=root_obj.dimensions.dft_si_height;if(root_obj.submenu_layout==0){EFFECTS_FACTORY_CACHE[sub_menu.element.id].width+=iWidth+root_obj.dimensions.menu_padding;EFFECTS_FACTORY_CACHE[sub_menu.element.id].height=(iHeight>EFFECTS_FACTORY_CACHE[sub_menu.element.id].height)?iHeight:EFFECTS_FACTORY_CACHE[sub_menu.element.id].height;}else{iWidth+=root_obj.dimensions.menu_padding;EFFECTS_FACTORY_CACHE[sub_menu.element.id].width=(iWidth>EFFECTS_FACTORY_CACHE[sub_menu.element.id].width)?iWidth:EFFECTS_FACTORY_CACHE[sub_menu.element.id].width;EFFECTS_FACTORY_CACHE[sub_menu.element.id].height+=iHeight+root_obj.dimensions.menu_padding/2;}
oDummy=document.body.removeChild(oDummy);}}
if(typeof menu_item.root_obj.animation_props!='undefined'){ITEMS_FX[menu_item.element.id]=menu_item.root_obj.animation_props.effect(menu_item,menu_item.root_obj.animation_props.options);menu_item.root_obj.animation_props.reset(ITEMS_FX[menu_item.element.id]);}}}
SKEffectsFactory.AddScrollLayersItems=function(menu_item){if(!menu_item.FirstLink())return;var link_element=menu_item.FirstLink();var window_width=$(link_element).getStyle("width");window_width=SKUtils.SizeToNumber(window_width);var real_width=window_width;var real_height=$(menu_item.element).getStyle("height");real_height=SKUtils.SizeToNumber(real_height);var anchor_element=menu_item.FirstLink();var layer=SKElement.GetFirstElementByTag($(link_element),"SPAN");if(typeof layer!='undefined'){window_width=$(layer).getStyle('width');window_width=SKUtils.SizeToNumber(window_width);var second_layer=SKElement.GetFirstElementByTag($(layer),"SPAN");if(typeof second_layer!='undefined'){real_width=$(second_layer).getStyle("width");real_width=SKUtils.SizeToNumber(real_width);}}
if(typeof link_element!='undefined'&&real_width>window_width){var scroll_layer=SKElement.GetChildrenByTag(link_element,"SPAN");if(typeof scroll_layer!='undefined'&&typeof scroll_layer[0]!='undefined'){scroll_layer=scroll_layer[0];scroll_layer=SKElement.GetChildrenByTag(scroll_layer,"SPAN")[0];var slider_name=menu_item.element.id+"_slider";var timeout_wait=menu_item.root_obj.slider.wait;var slider_step=menu_item.root_obj.slider.step;SKSliders[slider_name]=new SKTwoWaySlider(scroll_layer,slider_name,{org_width:real_width,window_width:window_width,timeout_wait:timeout_wait,step:slider_step});}}}
SKEffectsFactory.GenerateHolders=function(element,holders_props){var parent_node=$(element).parentNode;var current_parent=parent_node
for(var i=0;i<holders_props.length;i++){var holder_props=holders_props[i];var holder_element=document.createElement(holder_props.tagName);for(var property in holder_props){var value=holder_props[property];switch(property)
{case"style":$(holder_element).setStyles(value);break;case"class":$(holder_element).addClass(holder_props[property]);break;}}
current_parent.appendChild(holder_element);current_parent=holder_element;}
current_parent.appendChild(element);}
SKEffectsFactory.CMOnDisplayCallbackOn=function(fh,obj){SKEffectsFactory.cm=1;SKEffectsFactory.DELAYED_HIDE=null;SKEffectsFactory.CancelTimeout(obj.id);var env=fh.getEnv(obj);if($defined(env)&&$defined(env.hl_rel_elements)){for(var i=0;i<env.hl_rel_elements;i++){SKEffectsFactory.CancelTimeout(env.hl_rel_elements[i]);}}}
SKEffectsFactory.CMOnDisplayCallbackOff=function(fh,obj){SKEffectsFactory.cm=0;if(SKEffectsFactory.DELAYED_HIDE!=null){SKEffectsFactory.DELAYED_HIDE();}}
SKEffectsFactory.CMDelayHide=function(f){SKEffectsFactory.DELAYED_HIDE=f;}
SKEffectsFactory.PlaceholdersHideCancel=function(meta,parent_id){SKEffectsFactory.cm=1;SKEffectsFactory.CancelTimeout(parent_id);}
SKEffectsFactory.PlaceholdersExecuteCancel=function(meta,parent_id){SKEffectsFactory.cm=0;if(SKEffectsFactory.DELAYED_HIDE!=null){SKEffectsFactory.DELAYED_HIDE();}}
SKEffectsFactory.SlideFinishedVisible=function(fh,obj){var visible=obj.parentNode.parentNode.get('visible')==0?false:true;return visible;}


SKMenuOptions.timeouts.AURORA={show:50,hide:1000,hide_no_sub:100,show_sub:0,hide_sub:0,rollover_next:50};SKMenuOptions.dimensions.AURORA={first_level:{visible_window_width:140},subitems:{visible_window_width:160,stretch_increment:100},menu_padding:20,dft_si_height:15,placeholder_size:10}
SKMenuOptions.holders.AURORA={submenu:[{"tagName":"div","class":"effects_wrapper"},{"tagName":"div","style":{"overflow":"hidden"}},{"tagName":"div","class":"effects_holder","style":{"visibility":"hidden","position":"absolute"}},{"tagName":"div","class":"subNav"}],item:[{"tagName":"span"},{"tagName":"span"}]}
SKMenuOptions.callbacks.AURORA={};SKMenuOptions.callbacks.AURORA.after_traverse=function(main_menu){var items=main_menu.menu.Items();var submenu_layout=main_menu.submenu_layout;var parent_menu=main_menu.menu.element;var scroll=main_menu.scroll;var helpers=main_menu.helpers;var container_id="container_menu";SKUtils.PrepareMenuContainer(container_id,submenu_layout)
for(var i=0;i<items.length;i++){var item=items[i];helpers.ItemDimensions(item,main_menu.dimensions.first_level.visible_window_width)
if(scroll&&(!navigator.vendor||navigator.vendor.indexOf('Apple')==-1)){SKEffectsFactory.AddScrollLayersItems(item);}
var sub_menu=item.SubMenu();if(typeof sub_menu!='undefined'){var dimensions=SKMenuOptions.helpers.AURORA.SubmenuDimensions(sub_menu);var holder=sub_menu.GetHolder();if(holder){$(holder).setStyles(dimensions);if($(holder).parentNode)$(holder).parentNode.setStyles(dimensions);}}}
SKUtils.RemoveElement(container_id);main_menu.menu.element.setStyle('display','block');helpers.StretchMenuBar(main_menu);for(var i=0;i<items.length;i++){var menu_item=items[i];var sub_menu=menu_item.SubMenu();if(typeof sub_menu!='undefined'){if(typeof menu_item.root_obj.animation_props!='undefined'){ITEMS_FX[menu_item.element.id]=menu_item.root_obj.animation_props.effect(menu_item,menu_item.root_obj.animation_props.options);menu_item.root_obj.animation_props.reset(ITEMS_FX[menu_item.element.id]);}}}}
SKMenuOptions.helpers.AURORA={};SKMenuOptions.helpers.AURORA.SubmenuDimensions=function(sub_menu){var root_obj=sub_menu.root_obj;var visible_window_width=root_obj.dimensions.subitems.visible_window_width;var menu_padding=root_obj.dimensions.menu_padding;var dimensions=[];if(root_obj.submenu_layout==0){dimensions={width:EFFECTS_FACTORY_CACHE[sub_menu.element.id].width+menu_padding,height:EFFECTS_FACTORY_CACHE[sub_menu.element.id].height};if(sub_menu.root_obj.admin)
dimensions.width+=sub_menu.Items().length*root_obj.dimensions.placeholder_size;}else{dimensions={width:(visible_window_width>EFFECTS_FACTORY_CACHE[sub_menu.element.id].width+menu_padding)?visible_window_width:EFFECTS_FACTORY_CACHE[sub_menu.element.id].width+menu_padding,height:EFFECTS_FACTORY_CACHE[sub_menu.element.id].height+menu_padding};if(sub_menu.root_obj.admin)
dimensions.height+=sub_menu.Items().length*root_obj.dimensions.placeholder_size;}
dimensions.width+='px';dimensions.height+='px';return dimensions;};SKMenuOptions.helpers.AURORA.SubItemDimensions=function(menu_item,visible_window_width,first){var root_obj=menu_item.root_obj;if(typeof visible_window_width=='undefined'){visible_window_width=root_obj.dimensions.subitems.visible_window_width;}
var submenu_layout=root_obj.submenu_layout;var menu_padding=root_obj.dimensions.menu_padding;var contents=menu_item.GetContentsElement();if(typeof contents=='undefined')return;var width=contents.offsetWidth;var height=contents.getStyle("height");if(window.opera||(navigator.vendor&&(navigator.vendor.indexOf('Apple')!=-1||navigator.vendor.indexOf('KDE')!=-1))){height=20;}
if(height==null){height=contents.offsetHeight;}
else{height=SKUtils.SizeToNumber(height);}
var clip_width=width;var holder_width=width+menu_padding;if(submenu_layout==0){if(width>visible_window_width){clip_width=visible_window_width;holder_width=visible_window_width+menu_padding;}}
else{clip_width=visible_window_width;holder_width=visible_window_width+menu_padding;}
var inner_style={"width":width+"px","height":height+"px"}
var clip_str="rect(0px  "+clip_width+"px "+height+"px 0px)";$(contents).setStyles(inner_style);var span_element=$(contents).parentNode;var window_element=$(span_element).parentNode;$(window_element).setStyles({width:clip_width+"px"});$(span_element).setStyles(inner_style);$(span_element).setStyles({position:"absolute"})
$(span_element).style.clip=clip_str;var holder_element=$(window_element).parentNode;$(holder_element).setStyles({width:holder_width+"px"});if(first==true&&submenu_layout==0){var li_element=SKElement.GetParentByTag(holder_element,"LI");if(typeof li_element!='undefined'){$(li_element).setStyles({"padding-left":(menu_padding/2)+"px"});}}};SKMenuOptions.helpers.AURORA.ItemDimensions=function(menu_item,visible_window_width){var root_obj=menu_item.root_obj;if(typeof visible_window_width=='undefined'){visible_window_width=root_obj.dimensions.first_level.visible_window_width;}
var submenu_layout=root_obj.submenu_layout;var menu_padding=root_obj.dimensions.menu_padding;var contents=menu_item.GetContentsElement();if(typeof contents=='undefined')return;var width;var height;var is_image=false
var image_element=SKElement.GetFirstElementByTag($(contents),"IMG");if(typeof image_element!='undefined'){is_image=true;width=$(image_element).getStyle("width");width=SKUtils.SizeToNumber(width);var org_width=width;var dims=[];var image_clip=$(image_element).getStyle("clip");if(window.opera){var oDummyImage=$(image_element).cloneNode(false);oDummyImage.style.display='none';document.body.appendChild(oDummyImage);image_clip=oDummyImage.getStyle("clip");document.body.removeChild(oDummyImage);}else if(navigator.vendor){if(navigator.vendor.indexOf('Apple')!=-1||navigator.vendor.indexOf('KDE')!=-1){var sID=$(image_element).id.substr(0,$(image_element).id.indexOf('_'));if(typeof img_text_pos!='undefined'){for(var i=0;i<img_text_pos.length;i++){if(img_text_pos[i].id==sID){image_clip='rect('+(img_text_pos[i].pos.y-img_text_pos[i].dim.h)+'px, '+img_text_pos[i].dim.w+'px, '+img_text_pos[i].pos.y+'px, 0px)';}}}}}
if(!image_clip){if($(image_element).currentStyle){dims[0]=$(image_element).currentStyle.clipTop.replace("px","")-0;dims[1]=$(image_element).currentStyle.clipRight.replace("px","")-0;dims[2]=$(image_element).currentStyle.clipBottom.replace("px","")-0;dims[3]=$(image_element).currentStyle.clipLeft.replace("px","")-0;}}
else{image_clip=image_clip.replace(/[^0-9|^,]/g,"");dims=image_clip.split(',');}
height=dims[2]-dims[0];width=dims[1];}
else{width=contents.offsetWidth;height=contents.getStyle("height");if(height==null){height=contents.offsetHeight;}
else{height=SKUtils.SizeToNumber(height);}}
if(typeof(width)=='undefined'||isNaN(width)&&navigator.vendor.indexOf("Google")!=-1){width=60;new Element('style',{'text':'ul.sl_1 li a span span, ul.sl_0 li a span span { left: 10px; }'}).inject($$('head')[0]);}
width=width-0;var clip_width=width;var holder_width=width+(1*menu_padding);if(width>visible_window_width){clip_width=visible_window_width;holder_width=visible_window_width+(2*menu_padding);}
else{holder_width=width+(2*menu_padding);}
var inner_style={"width":width+"px","height":height+"px"}
var clip_str="rect(0px  "+clip_width+"px "+height+"px 0px)";$(contents).setStyles(inner_style);var span_element=$(contents).parentNode;var window_element=$(span_element).parentNode;$(window_element).setStyles({width:clip_width+"px"});$(span_element).setStyles(inner_style);$(span_element).setStyles({position:"absolute"})
$(span_element).style.clip=clip_str;if(window.opera||(navigator.vendor&&(navigator.vendor.indexOf('Apple')!=-1||navigator.vendor.indexOf('KDE')!=-1))){$(span_element).setStyles({left:"20px"})}
var holder_element=$(window_element).parentNode;$(holder_element).setStyles({width:holder_width+"px"});};SKMenuOptions.helpers.AURORA.StretchMenuBar=function(main_menu){main_menu.menu.CalculateWidth();main_menu.menu.StretchAdmin(0,11);main_menu.menu.width+=20;var controls_width=120;var padding=0;var new_width;var container_width=main_menu.menu.width+controls_width+padding;if($('container')){var current_container_width=$('container').offsetWidth;if(current_container_width<container_width){$('container').setStyles({"width":container_width+"px"});}
else{container_width=current_container_width;}}
$(main_menu.menu.element).setStyles({"width":main_menu.menu.width+"px"})
main_menu.menu_width=container_width-8;if($('mainMenuWrapper')){$('mainMenuWrapper').setStyles({"width":(main_menu.menu.width+15)+"px"});}}
SKDesigns.Aurora={scroll:true,holders:SKMenuOptions.holders.AURORA,dimensions:SKMenuOptions.dimensions.AURORA,callbacks:SKMenuOptions.callbacks.AURORA,helpers:SKMenuOptions.helpers.AURORA}
SKDesigns.Aurora_0={scroll:true,holders:SKMenuOptions.holders.AURORA,timeout:SKMenuOptions.timeouts.AURORA,dimensions:SKMenuOptions.dimensions.AURORA,callbacks:SKMenuOptions.callbacks.AURORA,helpers:SKMenuOptions.helpers.AURORA}


var IMAGEN_TEXT_PREFIX='mtext=%22';var IMAGEN_CSS_SUFFIX='/to=1/css=1';var IMAGEN_JSON_SUFFIX='/to=1/css=0';var IMAGEN_TEXT_SUFFIX='%22/delim_chunks=%22|n%22';var IMAGEN_OUT='/over=0';var IMAGEN_OVER='/over=1';var MENU_STYLE=['/complete_color=0','/complete_color=1'];var SECTION_PADDING=20;var SELECTED_ITEM_CLASS='sel';var CURRENT_ITEM_CLASS='cur';var AURORA_COLORS=new Array({color:"#5d4a3e",name:"Brown"},{color:"#f24c03",name:"Orange"},{color:"#7a7a7a",name:"Grey"},{color:"#907d62",name:"Beige"},{color:"#1a866b",name:"Teal"},{color:"#92bc0f",name:"Green"},{color:"#a2235f",name:"Violet"},{color:"#4198ca",name:"Blue"},{color:"#004a80",name:"Navy"},{color:"#b8010c",name:"Red"});


var hashMoverUrls={};var hashMoutImageColor={};var hashMoverImageColor={};var hashColorUrls={};var hashCurrentImages={};var bAdmin=false;var iLayout=0;var oAnimationProps=SKAnimations.DEFAULT;var aColors=[];var RENDER_MODE_NORMAL=1;var RENDER_MODE_CURRENT=2;SKSliderOptions.AURORA_SECTION={window_width:190,width:500,step:10};var aurora_menu=null;function SKUtilsOnLoad(){LoadMainMenu()}
function LoadMainMenu(){var design;if(iLayout==1){design=SKDesigns.Aurora;}else{design=SKDesigns.Aurora_0;}
if($('aurora_menu')){aurora_menu=new SKMainMenu("aurora_menu",{design:design,admin:bAdmin,submenu_layout:iLayout,animation_props:oAnimationProps});aurora_menu.traverse();}}
function PrepMenuItem(sMarkerID,sImgID,sText,sColorID,bIsCurrent){hashCurrentImages[sImgID]=bIsCurrent;hashMoutImageColor[sImgID+"__out"]=sColorID;hashMoverImageColor[sImgID+"__over"]=sColorID;if(typeof hashColorUrls[sColorID]=='undefined'){hashColorUrls[sColorID]={'out':'','over':''};aColors.push(sColorID);}
sText=sText.toUpperCase();sImagenUrlOut+=sImgID+':'+sText+'|n';if(bIsCurrent){var state_marker_obj=document.getElementById(sMarkerID);state_marker_obj.className=CURRENT_ITEM_CLASS+' '+SELECTED_ITEM_CLASS;}}
function LoadImages(){var new_id='';var render_mode=RENDER_MODE_NORMAL;for(var i in hashMoutImageColor){$(i).src=hashColorUrls[hashMoutImageColor[i]].out;new_id=i.replace("__out","");render_mode=RENDER_MODE_NORMAL;if(hashCurrentImages[new_id]){var color_index=GetColorIndex(hashMoutImageColor[i]);render_mode=(color_index==0)?aColors.length+2:color_index+2;}
new_id=new_id+"__"+render_mode;$(i).id=new_id;}
for(var i in hashMoverImageColor){$(i).src=hashColorUrls[hashMoverImageColor[i]].out;new_id=i.replace("__over","");var color_index=GetColorIndex(hashMoverImageColor[i]);render_mode=(color_index==0)?aColors.length+2:color_index+2;new_id=new_id+"__"+render_mode;$(i).id=new_id;}}
function LoadUrls(sImagenUrlOut){var sColors=aColors.join("-");for(var i in hashColorUrls){hashColorUrls[i].out=sImagenUrlOut+'/colors=%22'+sColors+'%22/encoding=%22'+SK.Singletons.env.get('encoding')+'%22';}}
function GetColorIndex(color){var index=0;for(var i=0;i<aColors.length;i++){if(aColors[i]==color){index=i;return index;}}
return index;}
function LoadTopMenuImageSrc(sNodeID){var oImg=document.getElementById(sNodeID);var sSuffix='/encoding=%22'+SK.Singletons.env.get('encoding')+'%22';oImg.src+=sSuffix;}


var font="font";var content="content";var def_width=928;function UpdateFontSize(bAdmin){var sActiveStylesheet=getActiveStyleSheet(font);switch(sActiveStylesheet){case"font_small":{setActiveStyleSheet("font_medium",font);break;}
case"font_medium":{setActiveStyleSheet("font_large",font);break;}
default:{setActiveStyleSheet("font_small",font);}}
SetupRealEstate();}
function UpdateContentWidth(bAdmin){var sActiveStylesheet=getActiveStyleSheet(content);if(sActiveStylesheet=="content_normal"&&document.body.clientWidth>=def_width){setActiveStyleSheet("content_plastic",content);}else{setActiveStyleSheet("content_normal",content);}
if(aurora_menu!=null&&typeof aurora_menu!="undefined"){SKMenuOptions.helpers.AURORA.StretchMenuBar(aurora_menu);}
SetupRealEstate();}
function UpdateContentWidthRealtime(){if(aurora_menu!=null&&typeof aurora_menu!="undefined"){SKMenuOptions.helpers.AURORA.StretchMenuBar(aurora_menu);}
SetupRealEstate();}
function setActiveStyleSheet(sTitle,sType){var i,a,main;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&a.getAttribute("title").indexOf(sType)!=-1)
{a.disabled=true;if(a.getAttribute("title")==sTitle)a.disabled=false;}}}
function getActiveStyleSheet(sType){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&a.getAttribute("title").indexOf(sType)!=-1&&!a.disabled)
{return a.getAttribute("title");}}
return null;}
function getPreferredStyleSheet(sType){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")&&a.getAttribute("title").indexOf(sType)!=-1)return a.getAttribute("title");}
return null;}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function addUnLoadEvent(func){var oldonunload=window.onunload;if(typeof window.onload!='function'){window.onunload=func;}else{window.onunload=function(){if(oldonunload){oldonunload();}
func();}}}
function InitResize(){var cookie=readCookie("content_width");var title=cookie?cookie:getPreferredStyleSheet(content);setActiveStyleSheet(title,content);cookie=readCookie("font_size");title=cookie?cookie:getPreferredStyleSheet(font);setActiveStyleSheet(title,font);}
addLoadEvent(function(e){var cookie=readCookie("content_width");var title=cookie?cookie:getPreferredStyleSheet(content);setActiveStyleSheet(title);cookie=readCookie("font_size");title=cookie?cookie:getPreferredStyleSheet(font);setActiveStyleSheet(title);});addUnLoadEvent(function(e){var title=getActiveStyleSheet(content);createCookie("content_width",title,365);title=getActiveStyleSheet(font);createCookie("font_size",title,365);});


var COLLAPSE_ICON_WIDTH=50;var COLUMN_WIDTH=230;var SEC_TITLE_HEIGHT=40;var PADDING=20;var TAB_MIN_W=50;var TAB_MAX_W=270;var SLIDE_TIMEOUT=100;var TMPL_SHADOW_PADDING=8;function GetDOMChildren(oRoot){var arrChildren=[oRoot];if(oRoot.childNodes.length>0){for(var i=0;i<oRoot.childNodes.length;i++){var arrTempChildren=GetDOMChildren(oRoot.childNodes[i]);for(var j=0;j<arrTempChildren.length;j++){arrChildren.push(arrTempChildren[j]);}}}
return arrChildren;}
function SetPageTitleLayerWidth(){var sWidth;var PageImageWidth=620;var PageImageFlashOverlap=250;if(!$('pageImageBar')||!$('pageTitle'))return;if($('pageTitleText'))PageImageFlashOverlap=0;if($('pageImageBar').className!=''||$('pageImageBar').style.backgroundImage!=''){sWidth=$('pageImageBar').getSize().x-PageImageWidth+PageImageFlashOverlap;}else{sWidth='100%';}
$('pageTitle').setStyle('width',sWidth);}
function SetBottomBarWidth(){var oContainer=document.getElementById('container');var oBottomBar=document.getElementById('bottomBar');var iOffset=0;if(!document.all||(document.documentElement&&document.compatMode!='BackCompat'))
iOffset=40;oBottomBar.style.width=928-iOffset+'px';oBottomBar.style.width=oContainer.offsetWidth-iOffset+'px';}
function SetupRealEstate(){if($('contentWrapper').offsetWidth>$('contentWrapperBar').offsetWidth)
$('container').style.width=$('contentWrapper').offsetWidth+8+'px';SetBottomBarWidth();SetPageTitleLayerWidth();}
function AuroraPageInit(){LoadMainMenu();SetupRealEstate();window.onresize=UpdateContentWidthRealtime;}

