var hrefString = document.location.href ? document.location.href : document.location;

function extractPageName(hrefString)
 {var arr = hrefString.split('/');
 return  (arr.length<2) ? hrefString : arr[arr.length-1].toLowerCase();                
}




var SUBMENU_FORMAT =
[
//0. left position
	10,
//1. top position
	10,
//2. show +/- buttons
	false,
//3. couple of button images (collapsed/expanded/blank)
	["images/shim.gif", "images/shim.gif", "images/shim.gif"],
//	["", "", ""],

//4. size of images (width, height,ident for nodes w/o children)
	[10,10,0],
//5. show folder image
	true,
//6. folder images (closed/opened/document)
	["images/menu_pil.gif", "images/menu_pil_active.gif", "images/menu_pil.gif"],
//7. size of images (width, height)
	[10,10],
//8. identation for each level [0/*first level*/, 16/*second*/, 32/*third*/,...]
	[10,10,32],
//9. tree background color ("" - transparent)
	"",
//10. default style for all nodes
	"left_menu",
//11. styles for each level of menu (default style will be used for undefined levels)
	["left_menu","left_menu2"],
//12. true if only one branch can be opened at same time
	true, 
//13. item pagging and spacing
	[2,2],
/************** PRO EXTENSIONS ********************/
//14. draw explorer like tree ( identation will be ignored )
	true,
//15. Set of explorer images (folder, openfolder, page, minus, minusbottom, plus, plusbottom, line, join, joinbottom)
	[],
//16. Explorer images width/height
	[11,10],
//17. if true state will be saved in cookies
	true,
//18. if true - relative position will be used. (tree will be opened in place where init() was called)
	true,
//19. width and height of initial rectangle for relative positioning
	[180,200],
//20. resize background //works only under IE4+, NS6+ for relatiive positioning
	true,
//21. support bgcolor changing for selected node
	true,
//22. background color for non-selected and selected node
	["#E9D5CA","#E9D5CA"],
//23. text wrapping margin
	190
];

var div_head='';
//'<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=left_menu style="padding: 3px 0px 3px 0px;"  height=25>';
var div_tail='';
// '</td></tr></table>';


var div_head2='<img border="0" src="images/menu_pil.gif"/>'
//'<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=left_menu2 style="padding: 3px 0px 3px 3px;">';
var div_tail2=''
//'</td></tr></table>';

var div_head3='<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=left_menu3 style="padding: 3px 0px 3px 18px;">';
var div_tail3='</td></tr></table>';

var div_head4='<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=left_menu4 style="padding: 3px 0px 3px 18px;">';
var div_tail4='</td></tr></table>';


var SUB_MKT = [
	[div_head+'<a onclick="submenu.collapseAll();" class=left_menu href=index.htm>'+'Home'+'</a>'+div_tail, 'index.htm', null],
	
	[div_head+'<a onclick="submenu.collapseAll();" class=left_menu href=people.htm>'+'People'+'</a>'+div_tail, 'people.htm', null],
	
	[div_head+'Clinical Service'+div_tail, 'clinical.htm', null,
		 [div_head2+'<span class=blank_menu>'+'Anaesthesia'+'</span>'+div_tail2,null,null],
		 [div_head2+'<a href=intensive_care.htm class=left_menu2b >'+'Intensive Care Unit'+'</a>'+div_tail2, 'intensive_care.htm', null],
		 [div_head2+'<a href=pain.htm class=left_menu2b>'+'Pain Medicine'+'</a>'+div_tail2, 'anaesthesia/web.htm', null],

		 
	],
	
	
	[div_head+'Research'+div_tail, null, null,
		 [div_head2+'<a href=prizes.htm class=left_menu2b>'+'Prizes and Awards'+'</a>'+div_tail2, 'prizes.htm', null],
		 [div_head2+'<a href=research.htm class=left_menu2b>'+'Publications'+'</a>'+div_tail2, 'research.htm', null],
		 [div_head2+'<a href=lab.htm class=left_menu2b>'+'Department Research Lab'+'</a>'+div_tail2, 'lab.htm', null],

	],
	
	
	[div_head+'Medical Students'+div_tail, 'student.htm', null,

         [div_head2+'<a href=prizes_student.htm class=left_menu2b>'+'Prizes and Awards'+'</a>'+div_tail2, 'prizes_student.htm', null],		 
		 [div_head2+'<a href=med5.htm class=left_menu2b>'+'Med 5 Students'+'</a>'+div_tail2, 'med5.htm', null],

		 [div_head2+'<a href=electivestudent.htm class=left_menu2b>'+'Electives Overseas<br>&nbsp;&nbsp;&nbsp;&nbsp;Student'+'</a>'+div_tail2, 'electivestudent.htm', null],

		 [div_head2+'<a href=http://www.cuhk.edu.hk/policy/academichonesty/ class=left_menu2b target=_blank>'+'Honesty in Academic<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Work' +'</a>'+div_tail2, 'http://www.cuhk.edu.hk/policy/academichonesty/', null],
		 
		 [div_head2+'<a href=http://www.cuhk.edu.hk/med/ans/Good%20Communication.pdf class=left_menu2b target=_blank>'+'Good Communication'+'</a>'+div_tail2, 'http://www.cuhk.edu.hk/med/ans/Good%20Communication.pdf', null],
					
	],
	
	
	
	
	[div_head+'Postgraduate Student'+div_tail, 'overview.htm', null,
	     
		 	     [div_head2+'<a href=PG_Curriculum_Guildelines.pdf class=left_menu2b>'+'rPG Guildelines and Curriculum '+'</a>'+div_tail2, 'PG_Curriculum_Guildelines.pdf', null],
		 [div_head2+'<a href=current_student_en.htm class=left_menu2b>'+'Current Students'+'</a>'+div_tail2, 'current_student_en.htm', null],
		 [div_head2+'<a href=past_student_en.htm class=left_menu2b>'+'Past Student'+'</a>'+div_tail2, 'past_student_en.htm', null],
		 		 [div_head2+'<a href=post_student_resources.htm class=left_menu2b>'+'Resources'+'</a>'+div_tail2, 'post_student_resources.htm', null],

	],
	
	
	
	[div_head+'Anesthetic Trainees'+div_tail, null, null,
		  [div_head2+'<a href=prizes_trainees.htm class=left_menu2b>'+'Prizes and Awards'+'</a>'+div_tail2, 'prizes_trainees.htm', null],
		  [div_head2+'<a href=training_module.htm class=left_menu2b>'+'Training Module'+'</a>'+div_tail2, 'training_module.htm', null],
		  [div_head2+'<a href=anaesthetic.htm class=left_menu2b>'+'Trainees Resources'+'</a>'+div_tail2, 'anaesthetic.htm', null],

	],
	
			  

	[div_head+'Resources'+'</a>'+div_tail,null, null,
	  	[div_head2+'<a href=simulatortraining.htm class=left_menu2b>'+'Simulator Training '+'</a>'+div_tail2, 'simulatortraining.htm', null],
		[div_head2+'<a href=softwares.htm class=left_menu2b>'+'Software'+'</a>'+div_tail2, 'softwares.htm', null],

	],

	[div_head+'Internal'+'</a>'+div_tail,null, null,
		 [div_head2+'<a href=anaesthesia/web.htm class=left_menu2b>'+'Anaesthesia Web'+'</a>'+div_tail2, 'anaesthesia/web.htm', null],
		 [div_head2+'<a href=anaesthesia/people1.htm class=left_menu2b>'+'Directory'+'</a>'+div_tail2, 'anaesthesia/people1.htm', null],
	],

	[div_head+'<a onclick="submenu.collapseAll();" class=left_menu href=enquiry.htm>'+'Contact Us'+'</a>'+div_tail, 'enquiry.htm', null]
];



