
var TEMPLATE_WIDTH=900;function CNSAlignBottomNavigation(sPosition,iChildCount,bAdmin){var oBottomNavBar=document.getElementById('bottom_navigation');var oBottomNavWrapper=document.getElementById('bottom_menu_wrapper');if(!oBottomNavBar||!oBottomNavWrapper)return;if(sPosition=='center'){var iWidth=oBottomNavWrapper.offsetWidth+5;if(bAdmin)iWidth+=22+15*iChildCount;oBottomNavBar.style.width=iWidth+'px';if(document.all&&document.compatMode=='backCompat'){oBottomNavBar.style.position='relative';oBottomNavBar.style.left=(oBottomNavBar.parentNode.offsetWidth-iWidth)/2+'px';}else{oBottomNavBar.style.marginLeft='auto';oBottomNavBar.style.marginRight='auto';}}}
function CNSFixIEStandardsIncompatibilities(){if(document.all&&document.compatMode=='backCompat'){document.getElementById('main_navigation').style.paddingTop='9px';document.getElementById('center_bar').style.width=TEMPLATE_WIDTH+'px';document.getElementById('copyright_bar').style.width=TEMPLATE_WIDTH+'px';}}
function CNSSecondMenuOnLoad(bAdmin){var oLeftBar=document.getElementById('left_bar');var oRightBar=document.getElementById('right_bar');oLeftBar.style.paddingRight='20px';oLeftBar.style.borderStyle='solid';oLeftBar.style.borderWidth='0px 1px 0px 0px';oLeftBar.style.borderColor='#CCCCCC';oRightBar.style.paddingLeft='20px';}
function CNSSetColumnsWidth(){var oCenterBar=document.getElementById('center_bar');var oLeftBar=document.getElementById('left_bar');var oRightBar=document.getElementById('right_bar');var oArea=document.getElementById('AREA__TEXT_AREA_2');for(var i=0;i<oArea.childNodes.length;i++){if(oArea.childNodes[i].className&&oArea.childNodes[i].className.indexOf('areaContentWrapper')!=-1)
{for(var j=0;j<oArea.childNodes[i].childNodes.length;j++){if(typeof oArea.childNodes[i].childNodes[j].tagName!='undefined'&&oArea.childNodes[i].childNodes[j].tagName=='DIV'&&typeof oArea.childNodes[i].childNodes[j].className!='undefined'&&oArea.childNodes[i].childNodes[j].className.indexOf('plain')!=-1)
{oLeftBar.style.paddingRight='20px';oLeftBar.style.borderStyle='solid';oLeftBar.style.borderWidth='0px 1px 0px 0px';oLeftBar.style.borderColor='#CCCCCC';oRightBar.style.paddingLeft='20px';}}}}}
function CNSSetHeadBarHeight(){var oHeadBar=document.getElementById('head_bar');var oHeadInnerBar=document.getElementById('head_inner_bar');if(oHeadInnerBar.offsetHeight>145){oHeadBar.style.height=oHeadInnerBar.offsetHeight+'px';}else{oHeadInnerBar.style.height=oHeadBar.offsetHeight+'px';}}
function CNSExecuteOnloadActions(){CNSFixIEStandardsIncompatibilities();CNSSetColumnsWidth();CNSSetHeadBarHeight();}


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();});}}};

