//about menu kezdodik
if (!admin_menu_obj) { var admin_menu_obj = new Object(); };

admin_menu_obj.hasRequired 	= function() { 
	if (document.getElementById && document.getElementsByTagName) {
		var html = document.getElementsByTagName('html')[0];
		html.className += ((html.className=='')?'':' ')+'DOM';
		return true;
		};
	return false;
	}();


admin_menu_obj.onbeforeload	= function() {
	if (this.hasRequired) {
		this.CSSattach();

		for (var module in this) { 
			if (this[module].onbeforeload) { 
				this[module].onbeforeload();
				};
			};
		};
	};
	
admin_menu_obj.onload		= function() { if (this.hasRequired) { for (var module in this) { if (this[module].onload) { this[module].onload(); };};};};
admin_menu_obj.onresize		= function() { if (this.hasRequired) { for (var module in this) { if (this[module].onresize) { this[module].onresize(); };};};};
admin_menu_obj.oncssload	= function() { if (this.hasRequired) { for (var module in this) { if (this[module].oncssload) { this[module].oncssload(); };};};};

admin_menu_obj.CSSattach	= function() {
	var d=document.createElement('div'),s=d.style;
	s.position		= 'fixed';
	s.top			= '0';
	s.visibility	= 'hidden';
	s.width			= '940px';
	s.height		= '16px';
	d.id='admin_varazslat';
	document.body.appendChild(d);
	window.setTimeout('admin_menu_obj.CSSwatch()',0);
	};
	
admin_menu_obj.CSSwatch			= function() {
	var d = document.getElementById('admin_varazslat');
	if (d.offsetWidth<940) {
		var html = document.getElementsByTagName('html')[0];
		html.className += ((html.className=='')?'':' ')+'CSS';
		
		this.oncssload();
		d.parentNode.removeChild(d);
		}
	else { window.setTimeout('admin_menu_obj.CSSwatch()',1); };
	};



//admin menu
admin_menu_obj.Navigation = {
	content		: {id:'contact'},
	top			: {id:'nav-top',state:0},
	bottom		: {id:'admin_menu_seged',state:1}, 
	revealInit	: false,
	revealLoop	: false,
	revealId	: null,
	getScrollTop	: function() {
		if (document.all) { return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop; }
		else { return window.pageYOffset; }
		},
	toggle		: function(navElem,e) {
		if (!document.removeChild || !document.appendChild || !e) return;
                
		e.blur();
		
		this.top.e.parentNode.className		= this.top.e.parentNode.className.replace(/ open/,'');
		
		if (navElem.state) {
			navElem.state = 0;
			}
		else {
			navElem.e.appendChild(this.content.e);
			navElem.state = 1;
			navElem.opp.state = 0;
			navElem.opp.e.style.height = '3px';
			navElem.e.parentNode.className += ' open';
			}
		
		this.reveal(navElem);
		},
	reveal		: function(navElem) {
		if(this.revealLoop){
			clearInterval(this.revealId);
			this.revealLoop = false;
			this.revealId = null;
			}
		this.revealTo(navElem.id.replace(/^nav-/,''),(navElem.state)?this.content.e.offsetHeight:0);
		},
	revealTo	: function(navRef,h) {
		var navElem = eval('this.'+navRef);
		if (h==0) { h=3; }
		if (this.revealLoop) {
			var c = navElem.e.offsetHeight;
			if (Math.abs(c-h) <=1) {
				navElem.e.style.height = h+'px';
				if (!navElem.state) { this.content.e = this.content.e.parentNode.removeChild(this.content.e); }
				clearInterval(this.revealId);
				this.revealLoop = false;
				this.revealId = null;
				if (!this.revealInit) { this.revealInit = true; }
				}
			else {
				navElem.e.style.height = (c+(h-c)/2)+'px';
				if (navElem.e.offsetTop!=0 && this.revealInit) { window.scrollTo(0,this.getScrollTop()+h); }
				}
			}
		else {
			this.revealId = setInterval("admin_menu_obj.Navigation.revealTo('"+navRef+"',"+h+")",100);
			this.revealLoop = true;
			}
			
		},
	onbeforeload	: function() {

		this.content.e	= document.getElementById(this.content.id);
		this.top.e		= document.getElementById(this.top.id).getElementsByTagName('div')[0];
		this.bottom.e	= document.getElementById(this.bottom.id).getElementsByTagName('div')[1];
	
		this.top.a		= document.getElementById(this.top.id).getElementsByTagName('a')[0];


		this.top.opp	= this.bottom;
		
		this.top.a.onclick		= function() { admin_menu_obj.Navigation.toggle(admin_menu_obj.Navigation.top,this); return false; }


		
		if (this.content.e && this.top.e && this.bottom.e) {
			this.toggle(this.bottom,this.bottom.a);
			};
		}

	};
	
//about menu vege