 function mbinit()
 {	
 	$('nb01').getElementsByClassName('navtab').each
	 (	function(s)
		{	
			Event.observe
			(	s,
				'click',
				function()
				{ 	var elm = $('nb01').getElementsByClassName('ntactive')[0];				
					if (elm)
					{	elm.removeClassName('ntactive');
						elm.removeClassName('navtab');
						elm.addClassName('navtab');
					}
					s.removeClassName('ntover');
					s.addClassName('ntactive');
				}
			);
			Event.observe
			(	s, 
				'mouseover',
				function()
				{ 	var elm = $('nb01').getElementsByClassName('ntover')[0];
					if (elm) elm.removeClassName('ntover');
					s.addClassName('ntover');
				}
			);
			Event.observe
			(	s, 
				'mouseout',
				function()
				{ 	var elm = $('nb01').getElementsByClassName('ntover')[0];
					if (elm) elm.removeClassName('ntover');
				}
			);
		}
	 )
	Event.observe
	(	window, 
		'resize',
		function()
		{ 	getWindowSize()
		}
	);

 }
 
/** function registerEvent()
 {	var a=arguments;
 	Event.observe(a[5],a[0][1], ckbEvent(a));
 }
**/ 
function registerEvent()
 {	var a=arguments[0];
 	Event.observe(a[4],a[2],function() {ckbEvent(a)});
 }

 
 function ckbEvent()
 {	var a = arguments[0];
	a.push($(a[1]).getAttribute("code"));	
 	eval(a[a.length-1]);
 	a.pop();
 }
 /************************************
 In HTML we will have an area CKB that is invisible.
 In this area we will hace a series of divs with class name ckbid and or div id and maybe name
 The InnerHTML of these will hold the arguments for the process in JSON Notastion
 ed <div class=enlargeimg id=win01 ref1=xxx><ckb>
 *************************************/
 
  function imgEInit()
  {	
  	$('nb01').getElementsByClassName('imgEnlarge').each
 	 (	function(s)
 		{	
 			Event.observe
 			(	s, 
 				'mouseover',
 				function()
 				{ 	var elm = $('ckb01').getElementsByClassName('ntover')[0];
 					if (elm) elm.removeClassName('ntover');
 					s.addClassName('ntover');
 				}
 			);
 			Event.observe
 			(	s, 
 				'mouseout',
 				function()
 				{ 	var elm = $('nb01').getElementsByClassName('ntover')[0];
 					if (elm) elm.removeClassName('ntover');
 				}
 			);
 		}
 	 )
 	Event.observe
 	(	window, 
 		'resize',
 		function()
 		{ 	getWindowSize()
 		}
 	);
 
  }
  

 
 function getWindowSize() 
 {  // remember slide show
 	if 	(window.innerHeight)
 	{	vSize = window.innerHeight;
 		hSize = window.innerWidth;
 	} 
 	else if (document.documentElement.clientHeight) 
 	{	var vSize = document.documentElement.clientHeight;
 		var hSize = document.documentElement.clientWidth;
 	} 
 	else if (document.body.clientHeight) 
 	{	var vSize = document.body.clientHeight;
 		var hSize = document.body.clientWidth;
 	} 
 }
 

 function setNtClass(e,s)
 {
	var cname = e.type=='click'?'ntactive':'ntover';
 }
 
 function swapElement(i){document.getElementById("p1").innerHTML=txt[i];}
