var GLOBAL_LoadedImages=[],GLOBAL_CurrentItem="",GLOBAL_Close=null,GLOBAL_Hide=null,GLOBAL_items=new NOF_OpenedItems,GLOBAL_slideItem=null,GLOBAL_slideSpeed=10,GLOBAL_slidePixel=0,GLOBAL_slideMinOffset=-800,GLOBAL_slideMaxOffset=800,useDebuger=!1;
function NOF_DOMBrowser(){this.getMenuItemLayerStartString=function(a,b){b=b!=null&&b!="undefined"&&typeof b!="undefined"?new String(b+CONSTANTS.MENU_LAYER_SUFIX):null;a+=CONSTANTS.MENU_LAYER_SUFIX;return'<DIV ID="'+a+'" isautoclose="'+(typeof C_MENU_AUTO_CLOSE=="undefined"||C_MENU_AUTO_CLOSE==!0?"true":"false")+'" STYLE="z-index:5; filter:blendTrans(duration=0.5)" onmouseover="NOF_KeepOpen(\''+a+"', "+b+')" onmouseout="NOF_KeepClose()">'};this.getMenuItemLayerEndString=function(){return"</DIV>"};
this.showMenuItem=function(a,b,c,d,e){typeof b=="string"&&(b=this.getItem(b));var a=typeof a=="string"?this.getItem(a):a,f=this.findItemTopOffset(a),a=this.findItemLeftOffset(a),g="";e.indexOf("left")>-1||e.indexOf("Left")>-1?(f+=d,a-=c,g="left"):e.indexOf("top")>-1||e.indexOf("Top")>-1?(f-=d,a+=c,g="top"):e.indexOf("right")>-1||e.indexOf("Right")>-1?(f+=d,a+=c,g="right"):(f+=d,a+=c,g="bottom");if(!(b==null||typeof b.style=="undefined"||b.style==null))b.style.top=f,b.style.left=a,b.style.visibility=
"visible",e.indexOf("slide")>-1?this.slideEffect(b,g):e.indexOf("fade")>-1&&this.fadeEffect(b)};this.hideMenuItem=function(a){typeof a=="string"&&(a=this.getItem(a));if(!(a==null||typeof a=="undefined"||a==""||typeof a=="number"))a.style.visibility="hidden"};this.findItemLeftOffset=function(a){var b=a.offsetLeft;a.offsetParent&&(b+=this.findItemLeftOffset(a.offsetParent));return b};this.findItemTopOffset=function(a){var b=a.offsetTop;a.offsetParent&&(b+=this.findItemTopOffset(a.offsetParent));return b};
this.getItem=function(a){return document.getElementById(a)};this.getItemAttribute=function(a,b){if(this.getItem(a))return this.getItem(a),eval("attr."+b.toLowerCase()+".value")};this.debug=function(a){var b=this.getItem("debug");useDebuger&&(b.value+=a+"\n")};this.fadeEffect=function(a){a.style.visibility="hidden";a.filters.blendTrans.Apply();a.filters.blendTrans.Play();a.style.visibility="visible"};this.slideEffect=function(a,b){GLOBAL_slideItem=a;this.setItemClip("rect(auto, auto, auto, auto)");
GLOBAL_slidePixel=b=="top"||b=="left"?100:0;this.playEffect(b)};this.playEffect=function(a){if(!(GLOBAL_slideItem.style.clip.indexOf("-")>0)&&!(GLOBAL_slidePixel<GLOBAL_slideMinOffset||GLOBAL_slidePixel>GLOBAL_slideMaxOffset)){var b="rect(";a=="top"?(GLOBAL_slidePixel-=3,b+=GLOBAL_slidePixel+"px auto auto auto)"):a=="right"?(GLOBAL_slidePixel+=3,b+="auto "+GLOBAL_slidePixel+"px auto auto)"):a=="bottom"?(GLOBAL_slidePixel+=3,b+="auto auto "+GLOBAL_slidePixel+"px auto)"):(GLOBAL_slidePixel-=3,b+="auto auto auto "+
GLOBAL_slidePixel+"px)");this.setItemClip(b);setTimeout('browser.playEffect("'+a+'")',GLOBAL_slideSpeed)}};this.setItemClip=function(a){GLOBAL_slideItem.style.clip=a};this.getLayerTag=function(){return"div"}}function NOF_BrowserNetscapeNavigator(){window.onclick=HideMenu;this.fadeEffect=function(){};GLOBAL_slideSpeed=1;return this}NOF_BrowserNetscapeNavigator.prototype=new NOF_DOMBrowser;function NOF_BrowserInternetExplorer(){document.onmouseup=HideMenu}NOF_BrowserInternetExplorer.prototype=new NOF_DOMBrowser;
function NOF_BrowserNetscape4x(){this.getMenuItemLayerStartString=function(a,b){b=b!=null&&b!="undefined"&&typeof b!="undefined"?new String(b+CONSTANTS.MENU_LAYER_SUFIX):null;a+=CONSTANTS.MENU_LAYER_SUFIX;return'<layer ID="'+a+'" isautoclose="'+(typeof C_MENU_AUTO_CLOSE=="undefined"||C_MENU_AUTO_CLOSE==!0?"true":"false")+'" onmouseover="NOF_KeepOpen(\''+a+"', "+b+')" onmouseout="NOF_KeepClose()">'};this.getMenuItemLayerEndString=function(){return"</layer>"};this.getImageParent=function(a){for(var b=
0;b<document.layers.length;b++)for(var c=document.layers[b],d=0;d<c.document.images.length;d++)if(c.document.images[d].name==a.name)return c;return null};this.showMenuItem=function(a,b,c,d,e){var f=this.getImageParent(a);typeof b=="string"&&(b=this.getItem(b));var a=typeof a=="string"?this.getItem(a):a,g=this.findItemTopOffset(a),a=this.findItemLeftOffset(a);f!=null&&(a+=f.pageX,g+=f.pageY);f="";e.indexOf("left")>-1||e.indexOf("Left")>-1?(g+=d,a-=c,f="left"):e.indexOf("top")>-1||e.indexOf("Top")>
-1?(g-=d,a+=c,f="top"):e.indexOf("right")>-1||e.indexOf("Right")>-1?(g+=d,a+=c,f="right"):(g+=d,a+=c,f="bottom");if(typeof b!="undefined")b.y=parseInt(g),b.x=parseInt(a),b.visibility="visible",e.indexOf("slide")>-1?this.slideEffect(b,f):e.indexOf("fade")>-1&&this.fadeEffect(b)};this.hideMenuItem=function(a){typeof a=="string"&&(a=this.getItem(a));if(!(a==null||typeof a=="undefined"||a==""))a.visibility="hide"};this.findItemLeftOffset=function(a){return a.x};this.findItemTopOffset=function(a){return a.y};
this.getItem=function(a){if(a!="")return eval("document.layers['"+a+"']")};this.getItemAttribute=function(a,b){return eval("document.layers['"+a.toLowerCase()+"']."+b)};this.getLayerTag=function(){return"layer"};this.slideEffect=function(a,b){GLOBAL_slideItem=a;GLOBAL_slidePixel=b=="bottom"||b=="left"?200:0;this.playEffect(b)};this.playEffect=function(a){if(!(GLOBAL_slidePixel<GLOBAL_slideMinOffset||GLOBAL_slidePixel>GLOBAL_slideMaxOffset))a=="top"?GLOBAL_slideItem.clip.bottom=GLOBAL_slidePixel+=
1:a=="right"?GLOBAL_slideItem.clip.right=GLOBAL_slidePixel+=1:a=="bottom"?GLOBAL_slideItem.clip.top=GLOBAL_slidePixel-=1:GLOBAL_slideItem.clip.left=GLOBAL_slidePixel-=1,setTimeout('browser.playEffect("'+a+'")',GLOBAL_slideSpeed)}}NOF_BrowserNetscape4x.prototype=new NOF_DOMBrowser;
function NOF_BrowserFactory(){var a=navigator.userAgent.toLowerCase(),b=parseInt(navigator.appVersion);parseFloat(navigator.appVersion);var c=a.indexOf("mozilla")!=-1&&a.indexOf("spoofer")==-1&&a.indexOf("compatible")==-1&&a.indexOf("opera")==-1&&a.indexOf("webtv")==-1&&a.indexOf("hotjava")==-1,d=c&&b==4;c&&(a.indexOf(";nav")!=-1||a.indexOf("; nav"));var e=c&&b>=5;a.indexOf("gecko");var f=(c=a.indexOf("msie")!=-1&&a.indexOf("opera")==-1)&&b<4,g=c&&b==4&&a.indexOf("msie 4")!=-1;c&&b==4&&a.indexOf("msie 5.0");
c&&b==4&&a.indexOf("msie 5.5");var h=c&&!f&&!g;c&&b==4&&a.indexOf("msie 6.");b=a.indexOf("opera")!=-1;c=a.indexOf("opera 2")!=-1||a.indexOf("opera/2")!=-1;f=a.indexOf("opera 3")!=-1||a.indexOf("opera/3")!=-1;g=a.indexOf("opera 4")!=-1||a.indexOf("opera/4")!=-1;a.indexOf("opera 5")!=-1||a.indexOf("opera/5");var l=b&&!c&&!f&&!g;this.getBrowser=function(){if(h)return new NOF_BrowserInternetExplorer;if(e)return new NOF_BrowserNetscapeNavigator;if(l)return new NOF_BrowserInternetExplorer;if(d)return new NOF_BrowserNetscape4x}}
var browserFactory=new NOF_BrowserFactory,browser=browserFactory.getBrowser(),CONSTANTS={MENU_TYPE_IMAGE:"Image",MENU_TYPE_TEXT:"Text",BUTTON_TYPE_IMAGE:"image",BUTTON_TYPE_TEXT:"text",MENU_TABLE_HEADER:'<table border="0" cellspacing="0" cellpadding="0">',MENU_TABLE_END:"</table>",MOUSE_OVER_IMAGE:1,MOUSE_OUT_IMAGE:2,MENU_ITEM_HORIZONTAL:!1,MENU_ITEM_VERTICAL:!0,MENU_LAYER_SUFIX:"LYR",NOT_A_MAIN_ITEM:1,MENU_REFRESH_TIME:600};function NOF_Menu(){return this}
function NOF_Menu_Item(){this.id=arguments[0];this.orientation=arguments[1];this.openEffect=arguments[2];this.offsetX=arguments[3];this.offsetY=arguments[4];this.buttons=[];this.submenuHeight=0;for(var a=5;a<arguments.length;a++)this.buttons[a-5]=arguments[a];this.getPosition=function(){return[this.offsetX,this.offsetY]};this.getOffsetX=function(){return this.offsetX};this.getOffsetY=function(){return this.offsetY};this.getOpenEffect=function(){return this.openEffect};this.getOrientation=function(){return this.orientation};
return this}function NOF_Menu_Button(a,b,c,d){this.link=a;this.normal=b;this.rollover=c!=""?c:b;this.submenu=d;this.hasSubmenu=function(){return this.submenu!=null};this.type=function(){return typeof this.rollover=="object"?CONSTANTS.BUTTON_TYPE_TEXT:typeof this.rollover=="string"?CONSTANTS.BUTTON_TYPE_IMAGE:null};return this}
function NOF_Main_Menu(a,b){if(typeof a!="undefined"){var c=a.id,d=browser.getMenuItemLayerStartString(c,b)+'<table width="10" border="'+C_MENU_BORDER+'" cellspacing="'+C_MENU_SPACING+'" cellpadding="0" bgcolor="'+C_MENU_BGCOLOR+'">',e=0;for(d+="<tr>";e<a.buttons.length;){var f=a.buttons[e];if(f==null)return;var g="";if(f.hasSubmenu()&&f.submenu)g=f.submenu.id;var h=f.link,l=f.normal,j=f.rollover,k=f.type()==CONSTANTS.BUTTON_TYPE_IMAGE?!0:!1,i=k?c+"s"+e:"NavigationButton_"+c+"_"+e,n=a.orientation==
"vertical"?!0:!1,m="";h.indexOf(" target=")!=-1&&(m=h.substr(h.indexOf(" target=")+8),h=h.substr(0,h.indexOf(" target=")));d+=n&&e>1?"<tr><td>":"<td>";d+='<a style="text-decoration:none; cursor:'+(h!="javascript:void(0)"?"hand":"default")+';" href="'+h+'" ';d+="onMouseOver=\"F_roll('"+i+"' ,"+CONSTANTS.MOUSE_OVER_IMAGE+", '"+c+"', '"+CONSTANTS.NOT_A_MAIN_ITEM+"')\" onMouseOut=\"F_roll('"+i+"' ,"+CONSTANTS.MOUSE_OUT_IMAGE+", '"+c+"', '"+CONSTANTS.NOT_A_MAIN_ITEM+"')\"";d+=m.length?' target="'+m+'">':
">";d+=k?'<img border="0" src="'+l+'"':"<"+browser.getLayerTag()+" ";if(typeof j!="undefined"||j.length||!k)g!=""?(h=f.submenu,k?d+='id="'+i+'" name="'+i+'" onLoad="F_loadRollover(this,\''+j+"', new Array('"+g+"','"+h.getOrientation()+"' , '"+h.getOpenEffect()+"', "+h.getOffsetX()+","+h.getOffsetY()+'))"':(NOF_MenuLoadRollOver(i,j,[g,h.getOrientation(),h.getOpenEffect(),h.getOffsetX(),h.getOffsetY()]),d+='id="'+i+'" name="'+i+'" class="'+i+'" ',typeof f.rollover=="object"&&(d+=' style="'+j[0]+'"'))):
k?d+='id="'+i+'" name="'+i+'" onLoad="F_loadRollover(this,\''+j+"',0)\"":(NOF_MenuLoadRollOver(i,j,0),d+='id="'+i+'" name="'+i+'" class="'+i+'" ',typeof f.rollover=="object"&&(d+=' style="'+j[0]+'"'));d+=k?"></a></td>":"><"+browser.getLayerTag()+' id="'+i+'_padding" style="padding:'+j[1]+'" padding="'+j[1]+'" paddingOver="'+j[3]+'">'+l+"</"+browser.getLayerTag()+"></"+browser.getLayerTag()+"></a></td>";d+=n?"</tr>":"";e++}d+=CONSTANTS.MENU_TABLE_END+browser.getMenuItemLayerEndString();document.writeln(d);
for(c=0;c<a.buttons.length;)a.buttons[c].hasSubmenu()&&NOF_Main_Menu(a.buttons[c].submenu,a.id),c++}}
function NOF_MenuLoadRollOver(a,b,c){if(a&&a.src&&(null==a.out||typeof a.out=="undefined")){var d=a.src;a.out=new Image;a.out.src=d;a.over=new Image;if(b.lastIndexOf("/")>=0||b.lastIndexOf("\\")>=0)d=b;else{var e=d.lastIndexOf("/");e<0&&(e=d.lastIndexOf("\\"));d=e<0?b:d.substring(0,e+1)+b}a.over.src=d;a.submenu=c;GLOBAL_LoadedImages[a.name]=a}else typeof b=="object"?typeof GLOBAL_LoadedImages[a]=="undefined"&&(GLOBAL_LoadedImages[a+"Normal"]=b[0],GLOBAL_LoadedImages[a+"Over"]=b[2],GLOBAL_LoadedImages[a]=
c):typeof c!="undefined"&&typeof a=="string"&&typeof GLOBAL_LoadedImages[a]=="undefined"&&(GLOBAL_LoadedImages[a]=c)}
function NOF_MenuRollButton(a,b,c,d){var e=b==CONSTANTS.MOUSE_OVER_IMAGE?"over":"out",f=b==CONSTANTS.MOUSE_OVER_IMAGE?!0:!1,g=GLOBAL_LoadedImages[a];if(typeof g!="undefined"){var h=typeof g.src=="undefined"?CONSTANTS.MENU_TYPE_TEXT:CONSTANTS.MENU_TYPE_IMAGE;if(h==CONSTANTS.MENU_TYPE_IMAGE){if(e="rollOver."+e+".src",g)g.src=eval(e)?eval(e):""}else if(h==CONSTANTS.MENU_TYPE_TEXT){if(typeof a=="string"){browser.getItem(a).className=f?a+"Hover":a;if(browser.getItem(a+"_padding"))browser.getItem(a+"_padding").style.padding=
f?browser.getItem(a+"_padding").paddingOver:browser.getItem(a+"_padding").padding;if(typeof browser.getItem(a).style!="undefined")browser.getItem(a).style.cssText=f?GLOBAL_LoadedImages[a+"Over"]:GLOBAL_LoadedImages[a+"Normal"]}}else return;if((d==null||typeof d=="undefined")&&b==CONSTANTS.MOUSE_OUT_IMAGE)GLOBAL_CurrentItem="",GLOBAL_items.removeAll();d=null;h==CONSTANTS.MENU_TYPE_IMAGE?d=g.submenu:h==CONSTANTS.MENU_TYPE_TEXT&&(d=typeof g=="object");d?b==CONSTANTS.MOUSE_OVER_IMAGE?(c&&typeof c!="undefined"&&
c!="null"?(GLOBAL_Close!=null&&clearTimeout(GLOBAL_Close),GLOBAL_items.removeSubitems(c+CONSTANTS.MENU_LAYER_SUFIX)):GLOBAL_items.removeAll(),h==CONSTANTS.MENU_TYPE_IMAGE?NOF_MenuOpenItem(g,g.submenu,c):NOF_MenuOpenItem(a,g,c)):h==CONSTANTS.MENU_TYPE_IMAGE?NOF_MenuCloseItem(g.submenu):NOF_MenuCloseItem(g):b==CONSTANTS.MOUSE_OVER_IMAGE&&(c&&typeof c!="undefined"&&c!="null"?(GLOBAL_CurrentItem=c+CONSTANTS.MENU_LAYER_SUFIX,GLOBAL_items.removeSubitems(GLOBAL_CurrentItem)):browser.hideMenuItem(GLOBAL_CurrentItem))}}
function NOF_MenuOpenItem(a,b,c){var d=b[0]+CONSTANTS.MENU_LAYER_SUFIX,e=b[2],f=b[3],b=b[4];GLOBAL_items.addItem(d,c);GLOBAL_CurrentItem=d;browser.showMenuItem(a,d,f,b,e)}function NOF_MenuCloseItem(a){a[0]&&(a=a[0]+CONSTANTS.MENU_LAYER_SUFIX,GLOBAL_items.toArray().length==1&&(GLOBAL_CurrentItem=0),GLOBAL_Close=setTimeout("NOF_MenuHideItem('"+a+"')",CONSTANTS.MENU_REFRESH_TIME/4))}function NOF_MenuHideItem(a){a&&a!=null&&GLOBAL_CurrentItem!=a&&browser.hideMenuItem(a)}
function NOF_KeepOpen(a){GLOBAL_CurrentItem=a;if(GLOBAL_Hide!=null)for(a=0;a<GLOBAL_Hide.length;a++)clearTimeout(GLOBAL_Hide[a])}function NOF_KeepClose(){GLOBAL_CurrentItem="";setTimeout("NOF_CloseChilds()",CONSTANTS.MENU_REFRESH_TIME)}
function NOF_CloseChilds(){var a=GLOBAL_items.toArray();GLOBAL_Hide=[];if(GLOBAL_CurrentItem==""||GLOBAL_CurrentItem==0)for(var b in a)a[b]&&(GLOBAL_Hide[b]=setTimeout("browser.hideMenuItem('"+a[b]+"')",CONSTANTS.MENU_REFRESH_TIME/4));if(!isMenuAutoClose())for(b in a=GLOBAL_items.toArray(),a)a[b]&&NOF_KeepOpen(a[b])}function isMenuAutoClose(){var a=GLOBAL_items.toArray();return a[0]&&a[0].length?browser.getItemAttribute(a[0],"isautoclose")=="true"?!0:!1:!1}
function HideMenu(){if(!isMenuAutoClose()){var a=GLOBAL_items.toArray();GLOBAL_Hide==null&&(GLOBAL_Hide=[]);for(var b in a)a[b]&&a[b].length&&(GLOBAL_items.removeItem(a[b]),GLOBAL_Hide[b]=browser.hideMenuItem(a[b]))}}
function NOF_OpenedItems(){this.openedItems="";this.separator="*";this.addItem=function(a){a==null||!a||a==""||this.openedItems.indexOf(a)==-1&&(this.openedItems+=this.openedItems.length?(this.openedItems.indexOf(this.separator)==this.openedItems.length-1?"":this.separator)+a:a)};this.removeItem=function(a){if(a!=GLOBAL_CurrentItem){var b=this.openedItems;if(b.indexOf(a)>0)var c=b.substring(0,b.indexOf(a)),a=b.substring(b.indexOf(a)+a.length,b.length),b=c+a;for(;b.lastIndexOf(this.separator)==b.length-
1;)b=b.substring(0,b.length-1);this.openedItems=b}};this.removeSubitems=function(a){if(a&&typeof a!="undefined"){for(var b=this.openedItems,b=b.substring(0,b.lastIndexOf(a)+a.length),a=this.openedItems.substring(this.openedItems.indexOf(b)+b.length,this.openedItems.length),a=a.split(this.separator),c=a.length-1;c>=0;c--)a[c]&&browser.hideMenuItem(a[c]);this.openedItems=b}};this.currentItem=function(){var a=this.toArray();return a[a.length-1]};this.removeAll=function(){var a=this.toArray();clearTimeout(GLOBAL_Close);
for(var b=a.length-1;b>=0;b--)a[b]!=null&&a[b]!=""&&(clearTimeout(a[b]),browser.hideMenuItem(a[b]));this.openedItems=""};this.toArray=function(){return this.openedItems.split(this.separator)}}function F_menu(a){NOF_Menu(a)}function F_roll(a,b,c,d){c=c==null||typeof c=="undefined"?null:c;d=d==null||typeof d=="undefined"?null:d;if(typeof a=="object"&&a.constructor==Array)for(var e=0;e<a.length;e++)NOF_MenuRollButton(a[e],b,c,d);else NOF_MenuRollButton(a,b,c,d)}
function F_loadRollover(a,b,c){return NOF_MenuLoadRollOver(a,b,c)};
