// ------------------ FSDC specific functions -------------------------------------- 
// Convention:
//   public functions : use "fsdc_" prefix 
//   private functions: use "_fsdc_" prefix
// Dependency:
//   gen_utils.js
// ---------------------------------------------------------------------------------
fsdc_style = ''
fsdc_utils_servlet_url = '../../../'

// ------------------- Path Variables ----------------------------------------------
fsdc_utils_img_root = '../../images/'
fsdc_utils_htm_root = '../../htm/'
fsdc_utils_img_path = fsdc_utils_img_root + 'en' + '/'
fsdc_utils_htm_path = fsdc_utils_htm_root + 'en' + '/'

// ------------------- XSL ---------------------------------------------------------
fsdc_utils_xsl_go_home = 'home.xsl'
fsdc_utils_xsl_login = 'login.xsl'
fsdc_utils_xsl_login_fail = 'login_fail.xsl'
fsdc_utils_xsl_usr_detail_ins_trim_prep = 'usr_detail_ins_trim_prep.xsl'
fsdc_utils_xsl_usr_detail_ins_trim_ind = 'fsdc_usr_detail_ins_ind.xsl'
fsdc_utils_xsl_usr_detail_ins_trim_ind_mem = 'fsdc_usr_detail_ins_ind_mem.xsl'
fsdc_utils_xsl_usr_detail_ins_trim_corp = 'fsdc_usr_detail_ins_corp.xsl'
fsdc_utils_xsl_usr_detail_ins_trim_corp_mem = 'fsdc_usr_detail_ins_corp_mem.xsl'
fsdc_utils_xsl_enrolment_status = 'fsdc_enrolment_status.xsl'
fsdc_utils_xsl_enrolment_credit_status = 'fsdc_enrolment_credit_status.xsl'
fsdc_utils_xsl_grp_enrolment_status = 'fsdc_enrolment_grp_status.xsl'
fsdc_utils_xsl_grp_enrolment_credit_status = 'fsdc_enrolment_grp_credit_status.xsl'
fsdc_utils_xsl_usr_enrolment_credit_srh = 'fsdc_enrolment_usr_credit_search.xsl'
fsdc_utils_xsl_grp_enrolment_credit_srh = 'fsdc_enrolment_grp_credit_search.xsl'
fsdc_utils_xsl_search = 'fsdc_search.xsl'
fsdc_utils_xsl_search_engine = 'fsdc_search_engine.xsl'
fsdc_utils_xsl_usr_ind_select_corp = 'fsdc_usr_ind_select_corp.xsl'
fsdc_utils_xsl_usr_ind_mem_select_corp = 'fsdc_usr_ind_mem_select_corp.xsl'
fsdc_utils_xsl_usr_ind_mem_select_dept = 'fsdc_usr_ind_mem_select_dept.xsl'
fsdc_utils_xsl_usr_corp_select_dept = 'fsdc_usr_corp_select_dept.xsl'
fsdc_utils_xsl_usr_corp_select_corp = 'fsdc_usr_corp_select_corp.xsl'
fsdc_utils_xsl_announcement_job_upd = 'fsdc_announ_job_upd_rte.xsl'
fsdc_utils_xsl_announcement_job_add = 'fsdc_announ_job_ins_rte.xsl'
fsdc_utils_xsl_announcement_job_dtl = 'fsdc_announ_job_dtl.xsl'
fsdc_utils_xsl_itm_node_qcos_lst = 'fsdc_itm_node_qcos_lst.xsl'
fsdc_utils_xsl_usr_lrn_hist = 'fsdc_usr_lrn_hist.xsl'
// ------------------- Alert Message -----------------------------------------------
// Big5 ============================================================================
fsdc_msg_ch_fsdc = '財經事務培訓發展中心'
fsdc_msg_ch_rights_reserved = 'Copyright(c) 2002 Financial Services Development Centre. All rights reserved'
fsdc_msg_ch_privacy_policy = '私隱措施'
fsdc_msg_ch_copyright_int_prop_rights = 'Copyright and Intellectual Property Rights'
fsdc_msg_ch_disdaimer = '免責條款'
fsdc_msg_ch_site_map = '網站指南'
fsdc_msg_ch_contact_us = '聯絡我們'
fsdc_msg_ch_en = '英文'
fsdc_msg_ch_gb = '簡體中文'
fsdc_msg_ch_ch = '繁體中文'
fsdc_msg_ch_intro_fsdc = 'Introduction of FSDC'
fsdc_msg_ch_director_msg = '總監的話'
fsdc_msg_ch_training_officer = '全職訓練主任'
fsdc_msg_ch_customer = '我們的客戶'
fsdc_msg_ch_organization = 'Name of Organization'
fsdc_msg_ch_input_keywords = '請輸入關鍵字'
fsdc_msg_ch_best_view_with = '此網頁用 800x600 解像及 Internet Explorer 瀏覽可得更佳效果.'
fsdc_msg_ch_pro_exm_lfxt = '外匯槓桿式買賣考試'

// GB2312 ==========================================================================
fsdc_msg_gb_fsdc = 'Financial Services Development Centre'
fsdc_msg_gb_rights_reserved = 'Copyright(c) 2002 Financial Services Development Centre. All rights reserved'
fsdc_msg_gb_privacy_policy = 'Privacy Policy'
fsdc_msg_gb_copyright_int_prop_rights = 'Copyright and Intellectual Property Rights'
fsdc_msg_gb_disdaimer = 'Disclaimer'
fsdc_msg_gb_site_map = 'Site Map'
fsdc_msg_gb_contact_us = 'Contact Us'
fsdc_msg_gb_en = 'English'
fsdc_msg_gb_gb = 'Simple Chinese'
fsdc_msg_gb_ch = 'Traditional Chinese'
fsdc_msg_gb_intro_fsdc = 'Introduction of FSDC'
fsdc_msg_gb_director_msg = 'Director\'s Message'
fsdc_msg_gb_training_officer = 'Our Full Time Training Officers'
fsdc_msg_gb_customer = 'Our Customers'
fsdc_msg_gb_organization = 'Name of Organization'
fsdc_msg_gb_input_keywords = 'Please input a keyword.'
fsdc_msg_gb_best_view_with = 'This website is best viewed with Internet Explorer with 800x600 resolution.'
fsdc_msg_gb_pro_exm_lfxt = 'Leveraged Foreign Exchange Trading Examination'

// ISO-8859-1 ======================================================================
fsdc_msg_en_fsdc = 'Financial Services Development Centre'
fsdc_msg_en_rights_reserved = 'Copyright(c) 2002 Financial Services Development Centre. All rights reserved'
fsdc_msg_en_privacy_policy = 'Privacy Policy'
fsdc_msg_en_copyright_int_prop_rights = 'Copyright and Intellectual Property Rights'
fsdc_msg_en_disdaimer = 'Disclaimer'
fsdc_msg_en_site_map = 'Site Map'
fsdc_msg_en_contact_us = 'Contact Us'
fsdc_msg_en_en = 'English'
fsdc_msg_en_gb = 'Simple Chinese'
fsdc_msg_en_ch = 'Traditional Chinese'
fsdc_msg_en_intro_fsdc = 'Introduction'
fsdc_msg_en_director_msg = 'Director\'s Message'
fsdc_msg_en_training_officer = 'Our Full Time Training Officers'
fsdc_msg_en_customer = 'Our Customers'
fsdc_msg_en_organization = 'Name of Organization'
fsdc_msg_en_input_keywords = 'Please input a keyword.'
fsdc_msg_en_best_view_with = 'This website is best viewed with Internet Explorer with 800x600 resolution.'
fsdc_msg_en_pro_exm_lfxt = 'Leveraged Foreign Exchange Trading Examination'

// --------------------- FSDC Functions --------------------------------------------
// FSDC HEADER =====================================================================
function fsdc_header_bar(lang,width,style,header_image){
	var str = ''
	if (lang == null || lang == '') {lang = 'en';}
	if (width == null || width == '') {width = '760';}
	
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'	
	if (style != null && style != '') {fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';}
	
	str += '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"' + width + '\">'
	
	if(header_image == null || header_image == ''){
		str += '<tr><td><img src=\"' + fsdc_utils_img_path + 'header_peak.jpg" width=\"760\" height=\"69\" border=\"0\"/></td></tr>'
	}else{
		str += '<tr><td><img src=\"' + fsdc_utils_img_path + 'header_' + header_image + '.jpg" width=\"760\" height=\"69\" border=\"0\"/></td></tr>'
	}
	str += '</table>'
	document.write(str)
}

// FSDC NAVIGATION BAR =============================================================
function fsdc_nav_bar(lang,width,style, front){
	var str = ''
	if (lang == null || lang == '') {lang = 'en';}	
	
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'
	if (style != null && style != '') {fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';}
		
	
	if (style == null) {style = '';}	
	if (width == null || width == '') {width = '760';}
	
	//init style
	if (style != null && style != '') {
		fsdc_style = style
	}
	
	str += '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"' + width + '\">'	
	if (front == '1'){
		str += '<tr>'		
		str += '<td>' 
		str += '<img src=\"' + fsdc_utils_img_path + 'header_bg.jpg\" border=\"0\"/>';
		str += '</td>'		
		str += '</tr>'		
		
	}else{
		str += '<tr><td COLSPAN="5"><img src=\"' + fsdc_utils_img_path + 'header_bg_top.jpg\" border=\"0\" WIDTH=\"760\" HEIGHT=\"4\"/></td></tr>';
		str += '<tr><td><img src=\"' + 	fsdc_utils_img_path + 'header_bg_mid1.jpg\" border=\"0\"/></td>';
		str += '<td><img src=\"' + fsdc_utils_img_path + 'header_bg_mid2.jpg\" border=\"0\"/></td>';
		str += '<td><img src=\"' + fsdc_utils_img_path + 'header_bg_mid3.jpg\" border=\"0\"/></td>';
		str += '<td><img src=\"' + fsdc_utils_img_path + 'header_bg_mid4.jpg\" border=\"0\"/></td>';
		str += '<td>'
		
		if (lang == 'en'){
			str += '<a href=\"javascript:fsdc_utils_change_lan(\'ch\',fsdc_style)\">'
			str += '<img src=\"' + fsdc_utils_img_path + 'header_bg_chi.jpg\" border=\"0\" align=\"absmiddle\"/>'
			str += '</a>'
		}else{
			str += '<a href=\"javascript:fsdc_utils_change_lan(\'en\',fsdc_style)\">'
			str += '<img src=\"' + fsdc_utils_img_path + 'header_bg_eng.jpg\" border=\"0\" align=\"absmiddle\"/>'
			str += '</a>'
		}			
		str += '</td></tr>';
		str += '<tr><td COLSPAN="5"><img src=\"' + fsdc_utils_img_path + 'header_bg_bottom.jpg\" border=\"0\" HEIGHT=\"12\"/></td></tr>';
	}
	
	/*	
		str += '<td width=\"20\" height=\"22\"><img src=\"' + fsdc_utils_img_path + 'fsdc_nav_start.gif\" border=\"0\"/></td>'
		str += '<td width=\"' + (width-20-11) + '\" background=\"' + fsdc_utils_img_path + 'fsdc_nav_bg.gif\" align=\"right\">'
			str += '<a href=\"javascript:fsdc_utils_col_go(\'SITEM\',\'' + lang + '\',fsdc_style)\">'
			str += '<img src=\"' + fsdc_utils_img_path + 'fsdc_nav_sitemap.gif\" border=\"0\" align=\"absmiddle\"/>'
			str += '</a>'
			str += '<a href=\"javascript:fsdc_utils_col_go(\'CONTUS\',\'' + lang + '\',fsdc_style)\">'
			str += '<img src=\"' + fsdc_utils_img_path + 'fsdc_nav_contactus.gif\" border=\"0\" align=\"absmiddle\"/>'
			str += '</a>'
			str += '<a href=\"javascript:fsdc_utils_col_go(\'TXT\',\'' + lang + '\',fsdc_style)\">'
			str += '<img src=\"' + fsdc_utils_img_path + 'fsdc_nav_txtonly.gif\" border=\"0\" align=\"absmiddle\"/>'
			str += '</a>'
			if (lang == 'en'){
				str += '<a href=\"javascript:fsdc_utils_change_lan(\'ch\',fsdc_style)\">'
				str += '<img src=\"' + fsdc_utils_img_path + 'fsdc_nav_ch.gif\" border=\"0\" align=\"absmiddle\"/>'
				str += '</a>'
			}else{
				str += '<a href=\"javascript:fsdc_utils_change_lan(\'en\',fsdc_style)\">'
				str += '<img src=\"' + fsdc_utils_img_path + 'fsdc_nav_en.gif\" border=\"0\" align=\"absmiddle\"/>'
				str += '</a>'
			}			
		str += '</td>'
		str += '<td width=\"11\"><img src=\"' + fsdc_utils_img_path + 'fsdc_nav_end.gif\" border=\"0\"/></td>'
		*/
	str += '</table>'
	document.write(str)
}

// FSDC COLUMN_MENU =================================================================
function gen_col_menu(col_id,lang,style,usr_role,usr_id,function_nm){	
	
	var str = ''	
	if (lang == null || lang == '') {lang = 'en';}
	
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'		
	if (style != null && style != '') {
		fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';
	}
		
	if (col_id == null) {col_id = '';}
	
	new_gen_col_menu_img(lang,style);
	
	//init style
	if (style != null && style != '') {
		fsdc_style = style
	}
	
	str += '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">'	
	// blank			
	str += '<tr>';
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"10\" width=\"0\"/></td>'
	str += '</tr>';
	
	//NEWS
	str += '<tr>'
		str += '<td width=\"124\">'
		str += '<a href=\"javascript:fsdc_utils_col_go(\'NEWS\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_news0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_news0\')\">';
		str += '<img name=\"gen_col_menu_news0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_news_off.jpg\" border=\"0\">';
		str += '</a>';
		str += '</td>'
	str += '</tr>'

	//LRN_SERV
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LRN_SERV\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_lrn_serv0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_lrn_serv0\')\">';
	str += '<img name=\"gen_col_menu_lrn_serv0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_lrn_serv_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//COR_SERV
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'COR_SERV\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_cor_serv0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_cor_serv0\')\">';
	str += '<img name=\"gen_col_menu_cor_serv0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_cor_serv_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
		
	//SERV_SME
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'SERV_SME\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_serv_sme0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_serv_sme0\')\">';
	str += '<img name=\"gen_col_menu_serv_sme0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_serv_sme_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
		
	//MEM_AREA
	str += '<tr>'
	str += '<td>'		
	if (usr_role == 'VISTR_1' || usr_role == '' || usr_role == null) {
		str += '<a href=\"javascript:fsdc_utils_col_go(\'MEM_SERV\',\'' + lang + '\',fsdc_style,\'' + usr_id + '\',\'\',\'' + function_nm + '\')\" onMouseOver=\"gen_img_act(\'gen_col_menu_mem_area0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_mem_area0\')\">';
//		str += '<a href=\"javascript:fsdc_utils_col_go(\'LOGIN\',\'' + lang + '\',fsdc_style,\'\',fsdc_utils_usr_enrolment_rpt_url(\'\',\'0\'))\" onMouseOver=\"gen_img_act(\'gen_col_menu_mem_area0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_mem_area0\')\">';
	}else {
		str += '<a href=\"javascript:fsdc_utils_col_go(\'MEM_AREA\',\'' + lang + '\',fsdc_style,\'' + usr_id + '\',\'\',\'' + function_nm + '\')\" onMouseOver=\"gen_img_act(\'gen_col_menu_mem_area0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_mem_area0\')\">';
	}
	str += '<img name=\"gen_col_menu_mem_area0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_mem_area_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	// blank			
	str += '<tr>';
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"20\" width=\"0\"/></td>'
	str += '</tr>';
	
	//ABT
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'ABT\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_about0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_about0\')\">';
	str += '<img name=\"gen_col_menu_about0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_about_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//CONTACT
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'CONTACT\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_contact0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_contact0\')\">';
	str += '<img name=\"gen_col_menu_contact0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_contact_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	//APP_FORM
	str += '<tr>'
	str += '<td height="27">'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'APP_FORM\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_app_form0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_app_form0\')\">';
	str += '<img name=\"gen_col_menu_app_form0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_app_form_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	//JOB
	str += '<tr>'	
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'JOB\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_job0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_job0\')\">';
	str += '<img name=\"gen_col_menu_job0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_job_off.jpg\" border=\"0\">';
	str += '</tr>';
	str += '</td>';
	str += '</tr>';

	//LNK
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LNK\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_link0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_link0\')\">';
	str += '<img name=\"gen_col_menu_link0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_link_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//SRH
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'SRH\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'gen_col_menu_search0\')\" onMouseOut=\"gen_img_inact(\'gen_col_menu_search0\')\">';
	str += '<img name=\"gen_col_menu_search0\" src=\"' + fsdc_utils_img_path + 'gen_col_menu_search_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>'	;
	
	// blank			
	str += '<tr>';
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"20\" width=\"0\"/></td>'
	str += '</tr>';
	
	//main
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'MAIN\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_main0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_main0\')\">';
	str += '<img name=\"ls_col_menu_main0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_main_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	// blank			
//	str += '<tr>';
//	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"15\" width=\"0\"/></td>'
//	str += '</tr>';
	
//	str += '<tr>'
//		str += '<td align=\"center\"><img src=\"http://www.vtc.edu.hk/cgi-bin/Count.cgi?df=fsdc.dat|dd=C|ft=0|tr=Y|trgb=white|negate=Y|md=5" border=\"0\"/></td>'
//	str += '</tr>'
	
	str += '<tr>'
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"10\" width=\"0\"/></td>'
	str += '</tr>'
	
	str += '</table>'
	document.write(str);
}

function new_gen_col_menu_img(lang,style){
	
	if (lang == null || lang == '') {lang = 'en';}
		
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'
	if (style != null && style != '') {fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';}
	
	gen_col_menu_news0on = new Image
	gen_col_menu_news0on.src = fsdc_utils_img_path + 'gen_col_menu_news_on.jpg';
		gen_col_menu_news0off = new Image
		gen_col_menu_news0off.src = fsdc_utils_img_path + 'gen_col_menu_news_off.jpg';	
	
	gen_col_menu_lrn_serv0on = new Image
	gen_col_menu_lrn_serv0on.src = fsdc_utils_img_path + 'gen_col_menu_lrn_serv_on.jpg';
		gen_col_menu_lrn_serv0off = new Image
		gen_col_menu_lrn_serv0off.src = fsdc_utils_img_path + 'gen_col_menu_lrn_serv_off.jpg';
		
	gen_col_menu_cor_serv0on = new Image
	gen_col_menu_cor_serv0on.src = fsdc_utils_img_path + 'gen_col_menu_cor_serv_on.jpg';
		gen_col_menu_cor_serv0off = new Image
		gen_col_menu_cor_serv0off.src = fsdc_utils_img_path + 'gen_col_menu_cor_serv_off.jpg';

	gen_col_menu_serv_sme0on = new Image
	gen_col_menu_serv_sme0on.src = fsdc_utils_img_path + 'gen_col_menu_serv_sme_on.jpg';
		gen_col_menu_serv_sme0off = new Image
		gen_col_menu_serv_sme0off.src = fsdc_utils_img_path + 'gen_col_menu_serv_sme_off.jpg';		

	gen_col_menu_mem_area0on = new Image
	gen_col_menu_mem_area0on.src = fsdc_utils_img_path + 'gen_col_menu_mem_area_on.jpg';
		gen_col_menu_mem_area0off = new Image
		gen_col_menu_mem_area0off.src = fsdc_utils_img_path + 'gen_col_menu_mem_area_off.jpg';	

	gen_col_menu_about0on = new Image
	gen_col_menu_about0on.src = fsdc_utils_img_path + 'gen_col_menu_about_on.jpg';
		gen_col_menu_about0off = new Image
		gen_col_menu_about0off.src = fsdc_utils_img_path + 'gen_col_menu_about_off.jpg';

	gen_col_menu_contact0on = new Image
	gen_col_menu_contact0on.src = fsdc_utils_img_path + 'gen_col_menu_contact_on.jpg';
		gen_col_menu_contact0off = new Image
		gen_col_menu_contact0off.src = fsdc_utils_img_path + 'gen_col_menu_contact_off.jpg';	

	gen_col_menu_app_form0on = new Image
	gen_col_menu_app_form0on.src = fsdc_utils_img_path + 'gen_col_menu_app_form_on.jpg';
		gen_col_menu_app_form0off = new Image
		gen_col_menu_app_form0off.src = fsdc_utils_img_path + 'gen_col_menu_app_form_off.jpg';	

	gen_col_menu_job0on = new Image
	gen_col_menu_job0on.src = fsdc_utils_img_path + 'gen_col_menu_job_on.jpg';
		gen_col_menu_job0off = new Image
		gen_col_menu_job0off.src = fsdc_utils_img_path + 'gen_col_menu_job_off.jpg';

	gen_col_menu_link0on = new Image
	gen_col_menu_link0on.src = fsdc_utils_img_path + 'gen_col_menu_link_on.jpg';
		gen_col_menu_link0off = new Image
		gen_col_menu_link0off.src = fsdc_utils_img_path + 'gen_col_menu_link_off.jpg';

	gen_col_menu_search0on = new Image
	gen_col_menu_search0on.src = fsdc_utils_img_path + 'gen_col_menu_search_on.jpg';
		gen_col_menu_search0off = new Image
		gen_col_menu_search0off.src = fsdc_utils_img_path + 'gen_col_menu_search_off.jpg';
		
	ls_col_menu_main0on = new Image
	ls_col_menu_main0on.src = fsdc_utils_img_path + 'ls_col_menu_main_on.jpg';
		ls_col_menu_main0off = new Image
		ls_col_menu_main0off.src = fsdc_utils_img_path + 'ls_col_menu_main_off.jpg';	
		
}

// FSDC COLUMN_MENU =================================================================
function lrn_serv_col_menu(col_id,lang,style,usr_role,usr_id,function_nm){	
	
	var str = ''	
	if (lang == null || lang == '') {lang = 'en';}
	
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'		
	if (style != null && style != '') {
		fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';
	}
		
	if (col_id == null) {col_id = '';}
	
	new_lrn_serv_col_menu_img(lang,style);
	
	//init style
	if (style != null && style != '') {
		fsdc_style = style
	}
	
	str += '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">'	
	// blank			
	str += '<tr>';
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"10\" width=\"0\"/></td>'
	str += '</tr>';
	
	//NEW program
	str += '<tr>'
		str += '<td width=\"124\">'
		str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_NEWPGM\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_newpgm0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_newpgm0\')\">';
		str += '<img name=\"ls_col_menu_newpgm0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_newpgm_off.jpg\" border=\"0\">';
		str += '</a>';
		str += '</td>'
	str += '</tr>'

	//by prof
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_BYPROF\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_byprof0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_byprof0\')\">';
	str += '<img name=\"ls_col_menu_byprof0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_byprof_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//by level
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_BYLVL\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_bylvl0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_bylvl0\')\">';
	str += '<img name=\"ls_col_menu_bylvl0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_bylvl_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//management excellence
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_MGMEX\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_mgmex0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_mgmex0\')\">';
	str += '<img name=\"ls_col_menu_mgmex0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_mgmex_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	//lang excellence
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_LANGEX\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_langex0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_langex0\')\">';
	str += '<img name=\"ls_col_menu_langex0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_langex_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
			
	//exam prep
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_EXAMPREP\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_examprep0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_examprep0\')\">';
	str += '<img name=\"ls_col_menu_examprep0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_examprep_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	//prof exam
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_PROFEXAM\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_profexam0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_profexam0\')\">';
	str += '<img name=\"ls_col_menu_profexam0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_profexam_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	//curcourse
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_CURCOURSE\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_curcourse0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_curcourse0\')\">';
	str += '<img name=\"ls_col_menu_curcourse0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_curcourse_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	//lrn prd
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'LS_LRNPRD\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_lrnprd0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_lrnprd0\')\">';
	str += '<img name=\"ls_col_menu_lrnprd0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_lrnprd_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';

	// blank			
	str += '<tr>';
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"20\" width=\"0\"/></td>'
	str += '</tr>';
	
	//main
	str += '<tr>'
	str += '<td>'
	str += '<a href=\"javascript:fsdc_utils_col_go(\'MAIN\',\'' + lang + '\',fsdc_style)\" onMouseOver=\"gen_img_act(\'ls_col_menu_main0\')\" onMouseOut=\"gen_img_inact(\'ls_col_menu_main0\')\">';
	str += '<img name=\"ls_col_menu_main0\" src=\"' + fsdc_utils_img_path + 'ls_col_menu_main_off.jpg\" border=\"0\">';
	str += '</a>';
	str += '</td>';
	str += '</tr>';
	
	str += '<tr>'
	str += '<td><img src=\"' + fsdc_utils_img_path + 'tp.jpg\" border=\"0\" height=\"10\" width=\"0\"/></td>'
	str += '</tr>'
	
	str += '</table>'
	document.write(str);
}

function new_lrn_serv_col_menu_img(lang,style){
	
	if (lang == null || lang == '') {lang = 'en';}
		
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'
	if (style != null && style != '') {fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';}
	
	ls_col_menu_newpgm0on = new Image
	ls_col_menu_newpgm0on.src = fsdc_utils_img_path + 'ls_col_menu_newpgm_on.jpg';
		ls_col_menu_newpgm0off = new Image
		ls_col_menu_newpgm0off.src = fsdc_utils_img_path + 'ls_col_menu_newpgm_off.jpg';	
	
	ls_col_menu_byprof0on = new Image
	ls_col_menu_byprof0on.src = fsdc_utils_img_path + 'ls_col_menu_byprof_on.jpg';
		ls_col_menu_byprof0off = new Image
		ls_col_menu_byprof0off.src = fsdc_utils_img_path + 'ls_col_menu_byprof_off.jpg';	

	ls_col_menu_bylvl0on = new Image
	ls_col_menu_bylvl0on.src = fsdc_utils_img_path + 'ls_col_menu_bylvl_on.jpg';
		ls_col_menu_bylvl0off = new Image
		ls_col_menu_bylvl0off.src = fsdc_utils_img_path + 'ls_col_menu_bylvl_off.jpg';	

	ls_col_menu_mgmex0on = new Image
	ls_col_menu_mgmex0on.src = fsdc_utils_img_path + 'ls_col_menu_mgmex_on.jpg';
		ls_col_menu_mgmex0off = new Image
		ls_col_menu_mgmex0off.src = fsdc_utils_img_path + 'ls_col_menu_mgmex_off.jpg';	

	ls_col_menu_langex0on = new Image
	ls_col_menu_langex0on.src = fsdc_utils_img_path + 'ls_col_menu_langex_on.jpg';
		ls_col_menu_langex0off = new Image
		ls_col_menu_langex0off.src = fsdc_utils_img_path + 'ls_col_menu_langex_off.jpg';	

	ls_col_menu_examprep0on = new Image
	ls_col_menu_examprep0on.src = fsdc_utils_img_path + 'ls_col_menu_examprep_on.jpg';
		ls_col_menu_examprep0off = new Image
		ls_col_menu_examprep0off.src = fsdc_utils_img_path + 'ls_col_menu_examprep_off.jpg';	

	ls_col_menu_profexam0on = new Image
	ls_col_menu_profexam0on.src = fsdc_utils_img_path + 'ls_col_menu_profexam_on.jpg';
		ls_col_menu_profexam0off = new Image
		ls_col_menu_profexam0off.src = fsdc_utils_img_path + 'ls_col_menu_profexam_off.jpg';	

	ls_col_menu_curcourse0on = new Image
	ls_col_menu_curcourse0on.src = fsdc_utils_img_path + 'ls_col_menu_curcourse_on.jpg';
		ls_col_menu_curcourse0off = new Image
		ls_col_menu_curcourse0off.src = fsdc_utils_img_path + 'ls_col_menu_curcourse_off.jpg';	

	ls_col_menu_lrnprd0on = new Image
	ls_col_menu_lrnprd0on.src = fsdc_utils_img_path + 'ls_col_menu_lrnprd_on.jpg';
		ls_col_menu_lrnprd0off = new Image
		ls_col_menu_lrnprd0off.src = fsdc_utils_img_path + 'ls_col_menu_lrnprd_off.jpg';	

	ls_col_menu_main0on = new Image
	ls_col_menu_main0on.src = fsdc_utils_img_path + 'ls_col_menu_main_on.jpg';
		ls_col_menu_main0off = new Image
		ls_col_menu_main0off.src = fsdc_utils_img_path + 'ls_col_menu_main_off.jpg';	

}

// FSDC FOOTER BAR ==================================================================
function fsdc_footer_bar(lang,width,style){
	var str = ''
	if (lang == null || lang == '') { lang = 'en';}
	if (style == null) {style = '';}
	
	var fsdc_utils_img_path = fsdc_utils_img_root + lang + '/'	
	if (style != null && style != '') {fsdc_utils_img_path = '../' + style + 'images' + '/' + lang + '/';}
	
	if (width == null || width == '') {width = '760';}
	
	//init style
	if (style != null && style != '') {
		fsdc_style = style
	//	str += '<script language=\"javascript\" type=\"text\\javascript\">style = \'' + style + '\'</script>';
	}//else{
		//str += '<script language=\"javascript\" type=\"text\\javascript\">style = \'\'</script>'
	//}
	
	
	str += '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"' + width + '\">'
	
	str += '<tr><td align=\"center\"><span class=\"wbGenFooterText\">' + eval('fsdc_msg_' + lang + '_rights_reserved') + '</span></td></tr>'
	str += '<tr><td align=\"center\"><span class=\"wbGenFooterText\">'
	str += '[' + '<a href=\"javascript:fsdc_utils_col_go(\'PRIV_POLI\',\'' + lang + '\',fsdc_style)\" class=\"wbGenFooterLink\">' + eval('fsdc_msg_' + lang + '_privacy_policy') + '</a>' + '] '
	//str += '[' + '<a href=\"\" class=\"wbGenFooterLink\">' + eval('fsdc_msg_' + lang + '_copyright_int_prop_rights') + '</a>' + '] '
	str += '[' + '<a href=\"javascript:fsdc_utils_col_go(\'DISCM\',\'' + lang + '\',fsdc_style)\" class=\"wbGenFooterLink\">' + eval('fsdc_msg_' + lang + '_disdaimer') + '</a>' + '] '
	str += '</span></td></tr>'
	str += '<tr><td align=\"center\" height=\"25\"><span class=\"wbGenFooterText\">' + eval('fsdc_msg_' + lang + '_best_view_with') + '</span></td></tr>'
	str += '</table>'
	//document.write(str);
}

function fsdc_utils_col_go(col_id,lang,style,ent_id,url_success,function_nm){	
	if (col_id == null || col_id == '') {col_id = 'HM';}
	if (lang == null || lang == '') {lang = 'en';}
	
	var fsdc_utils_htm_path = fsdc_utils_htm_root + lang + '/'	
	if (style != null && style != '') {fsdc_utils_htm_path = '../' + style + 'htm' + '/' + lang + '/';}
	
	url = null;
	if (col_id == 'MAIN'){
		url = fsdc_utils_gen_home_url();
		if (style == null || style == '') {url =  '../../../' + url;}
	}else if (col_id == 'NEWS'){
		url = fsdcAnnouncementSystemAnnLstUrl()
		if (style == null || style == '') {url =  '../../../' + url;}
	}else if (col_id == 'LRN_SERV'){		
		url = fsdc_utils_htm_path + 'lrn_serv.htm'
	}else if (col_id == 'COR_SERV'){		
		url = fsdc_utils_htm_path + 'cor_serv.htm'
	}else if (col_id == 'SERV_SME'){
		url = fsdc_utils_htm_path + 'serv_sme.htm'
	}else if (col_id == 'MEM_SERV'){
		url = fsdc_utils_htm_path + 'mem_serv.htm'
	}else if (col_id == 'MEM_AREA'){
		if (function_nm == 'RPT_APPROVED_LINK') {
			url = fsdc_utils_grp_enrolment_rpt_url(ent_id,0);
		}else if (function_nm == 'RPT_APPROVED_CREDIT_LINK') {
			url = fsdc_utils_grp_enrolment_rpt_url(ent_id,1);
		}else if (function_nm == 'RPT_OWN_CREDIT_LINK') {
			url = fsdc_utils_usr_enrolment_rpt_url(ent_id,1);
		}else {
			url = fsdc_utils_usr_enrolment_rpt_url(ent_id,0);
		}
		if (style == null || style == '') {url =  '../../../' + url;}		
	}else if (col_id == 'ABT'){
		url = fsdc_utils_htm_path + 'abt.htm'
	}else if (col_id == 'CONTACT'){
		url = fsdc_utils_htm_path + 'contact.htm'
	}else if (col_id == 'APP_FORM'){
		url = fsdc_utils_htm_path + 'app_form.htm'
	}else if (col_id == 'JOB'){
		url = fsdc_utils_htm_path + 'opening_jobs.htm'
	}else if (col_id == 'LNK'){
		url = fsdc_utils_htm_path + 'useful_links.htm'
	}else if (col_id == 'SRH'){
		url = wb_utils_invoke_servlet('cmd','get_prof','stylesheet',fsdc_utils_xsl_search)	
		if (style == null || style == '') {url =  '../../../' + url;}
	}else if (col_id == 'MEM_REG'){
		wb_utils_get_cookie('fsdc_login_url_success','')
		url = fsdc_utils_mem_reg_inst_url()
		if (style == null || style == '') {url =  '../../../' + url;}
	}else if (col_id == 'SITEM'){
		url = fsdc_utils_htm_path + 'sitemap.htm'
	}else if (col_id == 'TXT'){
		url = fsdc_utils_htm_path + 't_index.htm'		
	}else if (col_id == 'LOGIN'){	
		wb_utils_get_cookie('fsdc_login_url_success','')			
//		if (url_success == null || url_success == '') {url_success = self.location.href;}		
		wb_utils_set_cookie('fsdc_login_url_success',url_success)		
		fsdc_utils_mem_login_url()
		if (style == null || style == '') {url =  '../../../' + url;}
	}else if (col_id == 'LS_NEWPGM'){
		url = fsdc_utils_htm_path + 'ls_newpgm.htm'
	}else if (col_id == 'LS_BYPROF'){
		url = fsdc_utils_htm_path + 'ls_byprof.htm'
	}else if (col_id == 'LS_BYLVL'){
		url = fsdc_utils_htm_path + 'ls_bylvl.htm'
	}else if (col_id == 'LS_MGMEX'){
		url = fsdc_utils_htm_path + 'ls_mgmex.htm'
	}else if (col_id == 'LS_LANGEX'){
		url = fsdc_utils_htm_path + 'ls_langex.htm'
	}else if (col_id == 'LS_EXAMPREP'){
		url = fsdc_utils_htm_path + 'ls_examprep.htm'
	}else if (col_id == 'LS_PROFEXAM'){
		url = fsdc_utils_htm_path + 'ls_profexam.htm'
	}else if (col_id == 'LS_CURCOURSE'){
		url = fsdc_utils_htm_path + 'ls_curcourse.htm'
	}else if (col_id == 'LS_LRNPRD'){
		url = fsdc_utils_htm_path + 'ls_lrnprd.htm'
	}
	
	if(url != null && url != ''){
		if(window.parent == null) {window.location.href = url;}
		else {window.parent.location.href = url;}
	}else {alert('under construction..');}
}

function fsdc_utils_mem_login_url(){
	url = wb_utils_invoke_servlet('cmd','get_prof','stylesheet',fsdc_utils_xsl_login)		
	return url;
}

// *** Generic Home ***
function fsdc_utils_gen_home(){	
	url = fsdc_utils_gen_home_url()
	window.location.href = url;
} 

function fsdc_utils_gen_home_url(){	
	url = wb_utils_gen_home_url()
	return url;
} 

// *** Management Report ***
// User Enrollment Search
function fsdc_utils_usr_enrol_srh(creditOpt){
	url = fsdc_utils_usr_enrol_srh_url(creditOpt)
	window.location.href = url;
}

function fsdc_utils_usr_enrol_srh_url(creditOpt){	
	var rpt_type
	if (creditOpt == null || creditOpt == '') {creditOpt = 0;}
	if (creditOpt == 1) {rpt_type = 'self_cpt';}
	else {rpt_type = 'self';}
	
	url = wb_utils_invoke_servlet(
		'cmd','get_prof',
		'rpt_type',rpt_type,
		'stylesheet',fsdc_utils_xsl_usr_enrolment_credit_srh
	)
	return url;
}


// User Enrollment & User Accreditation Report
function fsdc_utils_usr_enrolment_rpt(ent_id,creditOpt){
	url = fsdc_utils_usr_enrolment_rpt_url(ent_id,creditOpt)
	window.location.href = url;
}

function fsdc_utils_usr_enrolment_rpt_url(ent_id,creditOpt){
	if (creditOpt == null || creditOpt == '') {creditOpt = 0;}
	
	if (creditOpt == 1) {
		url = wb_utils_invoke_disp_servlet(
			'module','report.ReportModule',
			'cmd','get_rpt',
			'rte_id','2',
			'rpt_type','self_cpt',
			'download','0',
			'spec_name','app_status_lst:_:_:ent_id:_:_:ats_id',
			'spec_value','Admitted:_:_:' + ent_id + ':_:_:1~2~3~4',
			'stylesheet', fsdc_utils_xsl_enrolment_credit_status
		)
	}else{
		url = wb_utils_invoke_disp_servlet(
			'module','report.ReportModule',
			'cmd','get_rpt',
			'rte_id','2',
			'rpt_type','self',
			'download','0',
			'spec_name','app_status_lst:_:_:ent_id:_:_:ats_id',
			'spec_value','Pending~Admitted~Waiting~Rejected~Withdraw:_:_:' + ent_id + ':_:_:1~2~3~4',
			'stylesheet', fsdc_utils_xsl_enrolment_status
		)
	}	
	return url;
}

// Group Enrollment Search
function fsdc_utils_grp_enrol_srh(creditOpt){
	url = fsdc_utils_grp_enrol_srh_url(creditOpt)
	window.location.href = url;
}

function fsdc_utils_grp_enrol_srh_url(creditOpt){
	
	var rpt_type
	if (creditOpt == null || creditOpt == '') {creditOpt = 0;}
	
	if (creditOpt == 1) {rpt_type = 'group_cpt';}
	else if (creditOpt == 'adm') {rpt_type = 'admin';}
	else {rpt_type = 'group';}
	
	//alert(rpt_type)
	url = wb_utils_invoke_servlet(
		'cmd','get_prof',
		'rpt_type',rpt_type,
		'stylesheet',fsdc_utils_xsl_grp_enrolment_credit_srh
	)
	
	return url;
}

//Group Enrollment & Group Accreditation Report
function fsdc_utils_grp_enrolment_rpt(ent_id,creditOpt){
	url = fsdc_utils_grp_enrolment_rpt_url(ent_id,creditOpt)
	window.location.href = url;
}

function fsdc_utils_grp_enrolment_rpt_url(ent_id,creditOpt){
	if (creditOpt == null || creditOpt == '') {creditOpt = 0;}
	
	if (creditOpt == 1) {
		url = wb_utils_invoke_disp_servlet('module','report.ReportModule',
			'cmd','get_rpt',
			'rte_id','2',
			'rpt_type','group_cpt',
			'download','0',
			'spec_name','app_status_lst:_:_:ent_id:_:_:ats_id',
			'spec_value','Admitted:_:_:' + ':_:_:1~2~3~4',
			'stylesheet', fsdc_utils_xsl_grp_enrolment_credit_status
		)
	}else{
		url = wb_utils_invoke_disp_servlet('module','report.ReportModule',
			'cmd','get_rpt',
			'rte_id','2',
			'rpt_type','group',
			'download','0',
			'spec_name','app_status_lst:_:_:ent_id:_:_:ats_id',
			'spec_value','Pending~Admitted~Waiting~Rejected~Withdrawn:_:_:' + ':_:_:1~2~3~4',
			'stylesheet', fsdc_utils_xsl_grp_enrolment_status
		)
	}	
	return url;
}

// *** System Announcement ***
function fsdcAnnouncementSystemAnnLstUrl(ann_type,msg_type,res_id,cur_page,page_size,sort_col,sort_order,timestamp,stylesheet){
	// this function refer to wb_utils.js : wbAnnouncementSystemAnnLstUrl
	if (sort_col == null || sort_col == '') {sort_col = 'msg_begin_date';}
	if (sort_order == null || sort_order == '') {sort_order = 'DESC';}
	if (cur_page == null || cur_page == '') {cur_page = '1';}
	if (page_size == null || page_size == '') {page_size = '10';}
	if (timestamp == null || timestamp == '') {timestamp = '';}
	if (msg_type == null || msg_type == ''){ msg_type = 'SYS';}
	if (stylesheet == null || stylesheet == ''){stylesheet = wb_utils_xsl_announcement_lst;}
	if (ann_type == 'all') {
		url = wb_utils_invoke_servlet(
			'cmd', 'get_all_msg', 
			'stylesheet', stylesheet, 
			'msg_type', msg_type,
			'cur_page',cur_page,
			//'page_size',page_size,
			'sortCol',sort_col,
			'sortOrder',sort_order,
			'timestamp',timestamp
		)
		if (msg_type == 'RES' && res_id != null && res_id != ''){ url += '&res_id=' + res_id ;}
	}else {
		url = wb_utils_invoke_servlet(
			'cmd', 'get_msg', 
			'stylesheet', stylesheet, 
			'msg_type', msg_type,
			'cur_page',cur_page,
			//'page_size',page_size,
			'sortCol',sort_col,
			'sortOrder',sort_order,
			'timestamp',timestamp
		)
		if (msg_type == 'RES' && res_id != null && res_id != ''){ url += '&res_id=' + res_id ;}
	}
	return url;
}

// *** Memeber Registration ***
function fsdc_utils_mem_reg_inst_url(){	
	url = '../../cw/fsdc/htm/en/mem_serv_reg.htm';			
	return url;
}

function fsdc_utils_mem_reg_prep(membership,id,style){
	url = fsdc_utils_mem_reg_prep_url(membership,id,style) 
	url =  '../../../' + url;
	window.location.href=url;	
	
}

function fsdc_utils_mem_reg_prep_url(membership,id,style){
	if (membership == null || membership == '') {
		if(style == 'IND'){
		//individual member
			url = wb_utils_invoke_servlet('cmd','get_ent_lst_hdr','ent_id',id,'stylesheet',fsdc_utils_xsl_usr_detail_ins_trim_ind)
		}else{
		//corp member	
			url = wb_utils_invoke_servlet('cmd','get_ent_lst_hdr','ent_id',id,'stylesheet',fsdc_utils_xsl_usr_detail_ins_trim_corp)
		}
	}
	if (membership == 'MEM'){
		if(style == 'IND'){
		//individual member
			url = wb_utils_invoke_servlet('cmd','get_ent_lst_hdr','ent_id',id,'stylesheet',fsdc_utils_xsl_usr_detail_ins_trim_ind_mem)
		}else{
		//corp member	
			url = wb_utils_invoke_servlet('cmd','get_ent_lst_hdr','ent_id',id,'stylesheet',fsdc_utils_xsl_usr_detail_ins_trim_corp_mem)
		}
	}
	return url;	
}

// *** Label Change ***

function fsdc_utils_change_lan(lang,style,url_success){
	url = fsdc_utils_change_lan_url(lang,style,url_success)
	window.location.href = url;
}

function fsdc_utils_change_lan_url(lang,style,url_success){
	var lan, cur_path, isHtml, fsdc_utils_htm_root, fsdc_utils_htm_path	
	cur_path = self.location.pathname
	
	if (cur_path.indexOf('/servlet/') == -1 && (cur_path.lastIndexOf('.htm') != -1 || cur_path.lastIndexOf('.html') != -1)){
		isHtml = true;
	}else {
		isHtml = false;
	}	
	//alert(isHtml)
	if (lang == 'ch') {lan = 'Big5';}
	else if (lang == 'gb') {lan = 'GB2312';}
	else {lan = 'ISO-8859-1';}
	
	if (url_success == null || url_success == '') {
		if (isHtml == true){
			//url_success = fsdc_utils_gen_home_url();
			fsdc_utils_htm_root = cur_path.substring(cur_path.indexOf('/')+1,cur_path.indexOf('htm/')) + 'htm/' 
			fsdc_utils_htm_path = '../' + fsdc_utils_htm_root + lang + '/'
			url_success = fsdc_utils_htm_path + cur_path.substring(cur_path.lastIndexOf('/')+1,cur_path.length)
		}else {
			//url_success = fsdc_utils_gen_home_url();
			url_success = self.location.href
		}		
	}
		
	url = wb_utils_invoke_servlet(
		'cmd','change_lan',
		'label_lan',lan,
		'url_success',url_success
	)
	
	if (isHtml == true) {url = fsdc_utils_servlet_url + url;}	
	return url;
}

function fsdc_utils_main_forum(lang,isMaintain){
	url = wb_utils_invoke_servlet("cmd","get_public_forum","ismaintain",isMaintain,"stylesheet",wb_utils_xsl_maintain_forum);
	init_wb_nav_cookie(lang);
	wb_utils_set_nav(wb_nav,eval('wb_nav_'+lang+'_main_forum'),url);
	parent.location.href = url;
}

function fsdc_utils_node_qcos_lst(tnd_id){	 
	//http://cw01:221/servlet/cw.ae.aeAction?all_ind=true&cmd=ae_lookup_itm_xml&show_run_ind=false&type=CLASSROOM~CLASSROOMOFF&enrol_only=true&stylesheet=...&url_failure=...
	url = wb_utils_invoke_ae_servlet('cmd','ae_lookup_itm','all_ind','false','show_run_ind','false','type','CLASSROOM~CLASSROOMOFF','enrol_only','true','stylesheet',fsdc_utils_xsl_itm_node_qcos_lst,'url_failure',wb_utils_cata_lst_url(),'page_size','20000', 'tnd_id_lst', tnd_id, 'orderby', 'r_itm_title', 'sortorder' , 'asc')
	url =  '../../../' + url;	
	window.location.href = url;	
}

function fsdc_utils_search_engine(){
	url = fsdc_utils_search_engine_url()
	window.location.href = url;
}

function fsdc_utils_search_engine_url(){
	url = wb_utils_invoke_servlet('cmd','get_prof','stylesheet',fsdc_utils_xsl_search_engine)
	return url;
}

function fsdc_change_cat(frm){
wb_utils_node_lst(frm.cat_list[frm.cat_list.selectedIndex].value);
}


function fsdc_utils_search_engine_exec(frm,lang){
	var str = ''
	if (frm.keywords.value == '') {alert(eval('fsdc_msg_' + lang + '_input_keywords'));}
	else {
		switch(frm.srh_engine_lst.value){
			case 'yahoo_hk':
				str = 'http://search.hk.yahoo.com/search/hk?p='
				break;
			case 'lycos_hk':
				str = 'http://hk.lycosasia.com/srch/index.html?query='
				break;
			case 'sina_hk':
				str = 'http://search.sina.com.hk/cgi-bin/ofind/searchofind.cgi?search_box='
				break;
			case 'msn_hk':
				str = 'http://search.msn.com.hk/results.asp?q='
				break;
			case 'timway':
				str = 'http://srch.timway.com/cgi/tsrch.cgi?keyword='
				break;
			case 'google':
				str = 'http://www.google.com/search?q='
				break;
			case 'yahoo':
				str = 'http://search.yahoo.com/bin/query?p='
				break;
			case 'lycos':
				str = 'http://search.lycos.com/main/default.asp?query='
				break;
			case 'msn':
				str = 'http://search.msn.com/results.asp?q='
				break;
		}
		
		str_feature = 'toolbar='		+ 'yes'
			+ ',width=' 				+ '730'
			+ ',height=' 				+ '480'
			+ ',scrollbars='			+ 'yes'
			+ ',resizable='				+ 'yes'
			+ ',status='				+ 'yes';
		
		url = str + frm.keywords.value
		popup_search_engine = window.open(url,'popup_search_engine',str_feature);	
	}	
}

function fsdc_user_lrn_history(usr_ent_id,ent_id,usr_role){
	//http://cw01:221/servlet/Dispatcher?cmd=get_rpt&rte_id=2&rsp_id=&rpt_type=group&rpt_type_lst=&rpt_name=&usr_ent_id=48&tnd_id_lst=&itm_title_partial_ind=&module=report.ReportModule&url_success=&url_failure=&spec_name=app_status_lst%3A_%3A_%3Aent_id%3A_%3A_%3Atnd_id%3A_%3A_%3Aats_id%3A_%3A_%3Aitm_title%3A_%3A_%3Aitm_title_partial_ind%3A_%3A_%3A&spec_value=Pending%7EAdmitted%7EWaiting%7ERejected%7EWithdrawn%3A_%3A_%3A114%3A_%3A_%3A%3A_%3A_%3A1%7E2%7E3%7E4%3A_%3A_%3A%3A_%3A_%3A1%3A_%3A_%3A&stylesheet=fsdc_enrolment_grp_status.xsl&download=0&page_size=&itm_title=&att_start_datetime=&att_start_datetime_dd=&att_start_datetime_mm=&att_start_datetime_yy=&att_start_datetime_hour=00&att_start_datetime_min=00&att_end_datetime=&att_end_datetime_dd=&att_end_datetime_mm=&att_end_datetime_yy=&att_end_datetime_hour=00&att_end_datetime_min=00	
	if (usr_role == 'ADM_1') {
		spec_value = 'pending~Admitted~Waiting~Rejected~Withdrawn'
		rpt_type = 'admin';
	}else {
		spec_value = 'Admitted'
		rpt_type = 'group_cpt';
	}	
	
	url = wb_utils_invoke_disp_servlet(
		'cmd','get_rpt',
		'rte_id','2',
		'rsp_id','',
		'rpt_type',rpt_type,
		'rpt_type_lst','',
		'rpt_name','',
		'usr_ent_id',usr_ent_id,
		'module','report.ReportModule',
		'url_success','',
		'url_failure','',
		'spec_name','app_status_lst:_:_:ent_id:_:_:tnd_id:_:_:ats_id:_:_:itm_title:_:_:itm_title_partial_ind:_:_:',
		'spec_value',spec_value + ':_:_:' + ent_id + ':_:_::_:_:1~2~3~4:_:_::_:_:1:_:_:',
		'download','0',
		'stylesheet',fsdc_utils_xsl_usr_lrn_hist,
		'page_size','',
		'att_start_datetime','',
		'att_end_datetime',''
	)
	
	window.location.href = url;	
}

/* ====================== pull down menu =================================== */
function fsdc_change_menu(option){
	window.location.href = option[option.selectedIndex].value;	
}

function fsdc_draw_menu_option(select_obj, lang, option_list_name, cur_value){
	tmpOpt = new Array();
	if (option_list_name == 'LS_BYLVL'){
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Career Enhancement Programs'
		tmpOpt[i++].value = 'ls_bylvl_1.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Master Degree'
		tmpOpt[i++].value = 'ls_bylvl_2.htm'									
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Bachelor Degree'
		tmpOpt[i++].value = 'ls_bylvl_3.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Professional Diploma'
		tmpOpt[i++].value = 'ls_bylvl_4.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Professional Certificate'
		tmpOpt[i++].value = 'ls_bylvl_5.htm'								
	}else if (option_list_name == 'LS_LANGEX'){
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Language Excellence'
		tmpOpt[i++].value = 'ls_langex_01.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Putonghua'
		tmpOpt[i++].value = 'ls_langex_2.htm'							
		/*
		tmpOpt[i] = new Option
		tmpOpt[i].text =  '   Putonghua 2'
		tmpOpt[i++].value = 'ls_langex_21.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  '   Putonghua 3'
		tmpOpt[i++].value = 'ls_langex_22.htm'	
		*/							
	}else if (option_list_name == 'LS_LRNPRD'){		
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos'
		tmpOpt[i++].value = 'ls_lrnprd_videosfront.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 企業管理系列'
		tmpOpt[i++].value = 'ls_lrnprd_12.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 成功督導管理培訓系列'
		tmpOpt[i++].value = 'ls_lrnprd_13.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 香港管理實案系列'
		tmpOpt[i++].value = 'ls_lrnprd_14.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 創業課程系列'
		tmpOpt[i++].value = 'ls_lrnprd_15.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 管理個案分析集'
		tmpOpt[i++].value = 'ls_lrnprd_16.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - 管理培訓系列'
		tmpOpt[i++].value = 'ls_lrnprd_17.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Videos - Managing Service to Your Customers'
		tmpOpt[i++].value = 'ls_lrnprd_1.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Books'
		tmpOpt[i++].value = 'ls_lrnprd_booksfront.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Books - Management Books'
		tmpOpt[i++].value = 'ls_lrnprd_2.htm'
		tmpOpt[i] = new Option
                tmpOpt[i].text =  'Books - Management Case Books'
		tmpOpt[i++].value = 'ls_lrnprd_22.htm'
		tmpOpt[i] = new Option
                tmpOpt[i].text =  'Books - 小型企業管理'
		tmpOpt[i++].value = 'ls_lrnprd_23.htm'
		tmpOpt[i] = new Option	
                tmpOpt[i].text =  'Books - 管理個案書籍'
		tmpOpt[i++].value = 'ls_lrnprd_24.htm'	
		tmpOpt[i] = new Option
                tmpOpt[i].text =  'Books - 管理基礎課程'
		tmpOpt[i++].value = 'ls_lrnprd_25.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Books - LOMA'
		tmpOpt[i++].value = 'ls_lrnprd_4.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'MDS'
		tmpOpt[i++].value = 'ls_lrnprd_3.htm'								
	}else if (option_list_name == 'LS_MGMEX'){		
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Management Excellence'
		tmpOpt[i++].value = 'ls_mgmex_01.htm'	
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Personal Effectiveness'
		tmpOpt[i++].value = 'ls_mgmex_11.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Customized Experiential Team Building Program'
		tmpOpt[i++].value = 'ls_mgmex_12.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Programs for Management Trainers'
		tmpOpt[i++].value = 'ls_mgmex_13.htm'			
	}else if (option_list_name == 'COR_SERV'){
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Customized Training'
		tmpOpt[i++].value = 'cor_serv_1.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'e-Learning Solutions'
		tmpOpt[i++].value = 'cor_serv_2.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Consultancy Services'
		tmpOpt[i++].value = 'cor_serv_3.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Our Clients'
		tmpOpt[i++].value = 'cor_serv_4.htm'
	}else if (option_list_name == 'SERV_SME'){
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'SME Service'
		tmpOpt[i++].value = 'serv_sme_01.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Business and IT Consultancy'
		tmpOpt[i++].value = 'serv_sme_1.htm'								
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Business Start-up Centre'
		tmpOpt[i++].value = 'serv_sme_2.htm'								
	}else if (option_list_name == 'MEM_SERV'){
		var i=0;
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'Membership Service'
		tmpOpt[i++].value = 'mem_serv.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'PEAK member Login'
		tmpOpt[i++].value = 'login.htm'
		tmpOpt[i] = new Option
		tmpOpt[i].text =  'PEAK Membership Registration'
		tmpOpt[i++].value = 'mem_serv_reg.htm'								
	}

	for (i=0; i<tmpOpt.length; i++){
		addOption(select_obj, tmpOpt[i]);	
	}		
		
	for (i=0; i<select_obj.length; i++){
		if (select_obj.options[i].value == cur_value){
			select_obj.options[i].selected = true;
		}
	}
			
	
}

