/**
custom_onload() is used to call different custom function when IEDMR pages on load
!!!Need to have onLoad="custom_onload(this);" in <body onLoad="custom_onload(this);"></body> in document!!!
**/
function custom_onload(win) {
	var pagename = pageName(win.location);
	
	switch (pagename) {
		case toLCase("popup.htm") :
			general_onload("HKASC - Popup","");
			break;
		case toLCase("index.htm") :
			index_onload();
			break;
		case toLCase("news.htm") :
			general_onload("HKASC - News","newsc.htm");
			break;
		case toLCase("download.htm") :
			general_onload("HKASC - Download Area","downloadc.htm");
			break;
		case toLCase("apec.htm") :
			general_onload("HKASC - About APEC","apecc.htm");
			break;
		case toLCase("apec_structure.htm") :
			general_onload("HKASC - APEC Structure","apec_structurec.htm");
			break;	
		case toLCase("apec_objectives.htm") :
			general_onload("HKASC - APEC Objectives","apec_objectivesc.htm");
			break;
		case toLCase("apec_abac.htm") :
			general_onload("HKASC - APEC Business Advisory Council (ABAC)","apec_abacc.htm");
			break;			
		case toLCase("apec_meetings.htm") :
			general_onload("HKASC - History of APEC Meetings","apec_meetingsc.htm");
			break;
		case toLCase("meeting_summary.htm") :
			general_onload("HKASC - APEC Documents and Reports","meeting_summaryc.htm");
			break;
		case toLCase("research.htm") :
			general_onload("HKASC - Research","researchc.htm");
			break;
		case toLCase("activities.htm") :
			general_onload("HKASC - Activities","activitiesc.htm");
			break;
		case toLCase("conference.htm") :
			general_onload("HKASC - Conference","conferencec.htm");
			break;
		case toLCase("seminar.htm") :
			general_onload("HKASC - Seminar","seminarc.htm");
			break;
		case toLCase("workshop.htm") :
			general_onload("HKASC - Workshop","workshopc.htm");
			break;						
		case toLCase("publications.htm") :
			general_onload("HKASC - Publications","publicationsc.htm");	
			break;							
		case toLCase("internet.htm") :
			general_onload("HKASC - Internet Resources","internetc.htm");	
			break;						
		case toLCase("about.htm") :
			general_onload("HKASC - About Us","aboutc.htm");	
			break;						
		case toLCase("sitemap.htm") :
			general_onload("HKASC - Sitemap","sitemapc.htm");
			break;
		case toLCase("apec050105.htm") :
			general_onload("Entrepreneurship Education Workshop","apec050105.htm");
			break;
		case toLCase("apec0805wssiu.htm") :
			general_onload("Marketing Research Project","apec0805wssiu.htm");
			break;
		case toLCase("apec0805jmvl.htm") :
			general_onload("Research Project on Entrepreneurship","newsc.htm");
			break;
		case toLCase("apec110105.htm") :
			general_onload("APEC Ambassador Choi visiting HKBU","apec110105.htm");
			break;	
		case toLCase("apec04workshopshtm.htm") :
			general_onload("Workshops and Seminars on Corporate Governance","apec04workshopshtm.htm");
			break;	
	}
}	

/**
index_onload() is used to call different custom function when index.htm on load
**/
function index_onload() {
		
	popup_win(this,"popup.htm","380","250","yes","no","no","no");  // 1. this window
	                                                               // 2. source file
	                                                               // 3. window height?
	                                                               // 4. window width?
	                                                               // 5. status bar?
	                                                               // 6. tool bar?
	                                                               // 7. menu bar?
	                                                               // 8. location bar?
	
	setTitle(this,"HKASC - Welcome");                                 // set title of window
	//setStatus(this,"hello!");                                    // set status of window
}

/**
general_onload() is used to call different custom function when sitemap.htm on load
**/
function general_onload(title_name,content_page) {
	if (content_page != "") {
		set_content_src("content_frame",content_page,"653","621","auto","no");	// set the frame of content
	}
	
	if (title_name != "") {	
		setTitle(this,title_name);                                       // set title of window
	}
	
}	
