// #############################################################################
// get left position of elm
function confirm_action(msg,action)
{
	if (confirm(msg))
		window.location = action;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function get_select_value(select_obj){
	var the_select = select_obj;
	var the_index = the_select.selectedIndex;
	var the_selected = the_select.options[the_index].text;
	var the_selected_value = the_select.options[the_index].value;
	return the_selected_value;
}

function select_video(){
	var select_obj = document.all('videos');
	var the_select = select_obj;
	var the_index = the_select.selectedIndex;
	var the_selected = the_select.options[the_index].text;
	var the_selected_value = the_select.options[the_index].value;		
	
	//if (document.getElementById('play_video').style.display == 'none') document.getElementById('play_video').style.display = 'block';	
	for(i=0;i<document.getElementsByTagName("input").length;i++){
		input_obj = document.getElementsByTagName("input");
		if (input_obj[i].checked) var channel = input_obj[i].value;
	}
	
	var selected_value = get_select_value(document.all('videos'));
	
	param = '';
	var channel_selector = '';	
			
	switch (the_selected_value){
		case 'Introduction':						
			//MM_openBrWindow('http://www.hedy.com.tw/wmv/Intro.wmv','','');
			//param = '<param name="autoplay" value="true"> <embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850273&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582337&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582337&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252580%252B4-1%252B%2525E5%2525AD%252597%2525E6%2525AF%25258D%2525E8%2525AA%2525B2%2525E7%2525A8%25258B&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582337&autoplay=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';			
			
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/z0YFi4QWf24"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/z0YFi4QWf24&autoplay=1&loop=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2883144&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D596222&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D596222&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E4%2525BB%25258B%2525E7%2525B4%2525B9&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=596222" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			
			break;				
		
		case 'Introduction2':			
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/BKs0L3WGSmc"> </param> <embed src="http://www.youtube.com/v/BKs0L3WGSmc&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"> </embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.7" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="false" bgcolor="#000000" flashVars="id=8665129&vid=3027857&lang=en-us&intl=us&thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/p/i/bcst/videosearch/3951/67701604.jpeg&embed=1" ></embed>';
			
			break;
		
		case 'Introduction3':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/QaFVTcRgnBs"> </param> <embed src="http://www.youtube.com/v/QaFVTcRgnBs&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"> </embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.7" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="false" bgcolor="#000000" flashVars="id=8694930&vid=3045847&lang=en-us&intl=us&thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/p/i/bcst/videosearch/3985/67814205.jpeg&embed=1" ></embed>';
			
			break;
		
		case 'Book_1_4-1':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/pImre7N74HQ"></param><embed src="http://www.youtube.com/v/pImre7N74HQ&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850273&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582337&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582337&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252580%252B4-1%252B%2525E5%2525AD%252597%2525E6%2525AF%25258D%2525E8%2525AA%2525B2%2525E7%2525A8%25258B&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582337&autoplay=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_1_4-2':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/Rx5Ud6DBBOs"></param><embed src="http://www.youtube.com/v/Rx5Ud6DBBOs&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=3015878&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D647253&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D647253&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252580%252B4-2%252B%2525E8%252581%2525BD%2525E5%25258A%25259B%2525E6%2525B8%2525AC%2525E9%2525A9%252597&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=647253" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_1_5-1':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/kNI6j6tfAI8"></param><embed src="http://www.youtube.com/v/kNI6j6tfAI8&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850357&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582375&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582375&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252580%252B5-1%252B%2525E7%252599%2525BC%2525E9%25259F%2525B3%2525E8%2525AA%2525B2%2525E7%2525A8%25258B&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582375" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_1_6-1':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/vttkWtjWs5w"></param><embed src="http://www.youtube.com/v/vttkWtjWs5w&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850565&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582493&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582493&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252580%252B6-1%252B%2525E7%252599%2525BC%2525E9%25259F%2525B3%2525E8%2525AA%2525B2%2525E7%2525A8%25258B&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582493" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_2_2-1':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/VbII3xfvfu4"></param><embed src="http://www.youtube.com/v/VbII3xfvfu4&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850652&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582534&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582534&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E5%252588%25259D%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525BA%25258C%252B2-1%252B%2525E7%252589%2525B9%2525E6%2525AE%25258A%2525E5%2525AD%252597%2525E8%2525AA%2525B2%2525E7%2525A8%25258B&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582534" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_3_1-2':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/CtdMzi2WkAI"></param><embed src="http://www.youtube.com/v/CtdMzi2WkAI&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2850672&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582543&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582543&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E4%2525B8%2525AD%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E4%2525B8%252589%252B1-2&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582543" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		case 'Book_4_1-8':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/InvkyWfl9Jw"></param><embed src="http://www.youtube.com/v/InvkyWfl9Jw&autoplay=1&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			else
				param = '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=2851505&emailUrl=http%3A%2F%2Ftw.video.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D582928&imUrl=http%25253A%25252F%25252Ftw.video.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D582928&imTitle=%2525E6%2525A5%25258A%2525E6%2525B5%2525B7%2525E8%252592%252582%2525E8%25258B%2525B1%2525E6%252596%252587%2525E5%252596%2525AE%2525E5%2525AD%252597%2525E7%2525A5%25259E%2525E5%2525A5%252587%2525E8%2525A8%252598%2525E6%252586%2525B6%2525E6%2525B3%252595%2525E9%2525AB%252598%2525E7%2525B4%25259A%2525E6%25259C%2525AC%2525E5%25259B%25259B%252B1-8&searchUrl=http://tw.video.yahoo.com/video/search?p=&profileUrl=http://tw.video.yahoo.com/video/profile?yid=&creatorValue=d3Vub190dw%3D%3D&vid=582928" type="application/x-shockwave-flash" width="425" height="350"></embed>';
			break;
		
		case 'MP4':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/KXLFHGq17uE&hl=zh_TW&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KXLFHGq17uE&hl=zh_TW&fs=1&rel=0&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=13980429&vid=5301910&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/9430/87460728.jpeg&embed=1" ></embed>';
			break;
		
		case 'Broadcasting1':
			if (channel == 'YouTube')
				param = '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ftPEnPaD5JM&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ftPEnPaD5JM&hl=zh_TW&fs=1&&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=15257290&vid=5830235&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/10781/92051588.jpeg&embed=1" ></embed>';
			break;
		
		case 'Broadcasting2':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/URuKTp2rR-Y&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/URuKTp2rR-Y&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=15257455&vid=5830293&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/10784/92052248.jpeg&embed=1" ></embed>';
			break;
			
		case 'Meeting_1':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/LmCWGWs9D04&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LmCWGWs9D04&hl=zh_TW&&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18017228&vid=6931651&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/12774/101827759.jpeg&embed=1" ></embed>';
			break;
	
		case 'Meeting_2':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/BwIMJDiQmTs&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BwIMJDiQmTs&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18017290&vid=6931663&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/12774/101827995.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_3':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/9SLX-OHLs7Q&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9SLX-OHLs7Q&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18017987&vid=6931912&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/12788/101830490.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_4':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/ReS8IhOmCfQ&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ReS8IhOmCfQ&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022392&vid=6933848&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5610/101847129.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_5':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/6MV5vG25my0&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6MV5vG25my0&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022452&vid=6933918&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5616/101847412.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_6':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/Va9SAwoTM84&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Va9SAwoTM84&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022518&vid=6933940&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/3542/101847638.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_7':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/xszH2-IXRkE&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xszH2-IXRkE&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022663&vid=6933982&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5628/101848206.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_8':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/REBELr5xy98&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/REBELr5xy98&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022705&vid=6934017&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5630/101848337.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_9':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/AN8Sw9fXAIA&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/AN8Sw9fXAIA&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022739&vid=6934046&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5632/101848477.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_10':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/3Yngrfjvlek&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3Yngrfjvlek&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022809&vid=6934062&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5636/101848733.jpeg&embed=1" ></embed>';
			break;
		
		case 'Meeting_11':
			if (channel == 'YouTube')
				param = '<param name="movie" value="http://www.youtube.com/v/kF79gTYe-0s&hl=zh_TW&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kF79gTYe-0s&hl=zh_TW&fs=1&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>';
			else
				param = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=18022853&vid=6934081&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/5638/101848880.jpeg&embed=1" ></embed>';
			break;
						
	}

	channel_selector += '<br>';			
	channel_selector += '頻道：<input onclick="select_video();" type="radio" name="channel" value="Yahoo"';
	if (channel == 'Yahoo') channel_selector += ' checked'
	channel_selector += '> Yahoo&nbsp;<input onclick="select_video();" type="radio" name="channel" value="YouTube"';
	if (channel == 'YouTube') channel_selector += ' checked'
	channel_selector += '> YouTube&nbsp;&nbsp;' + '影片：';
	channel_selector += '<select name="videos" onchange="select_video();">';
	
	channel_selector += '<option value="Meeting_1"';
	if (selected_value == 'Meeting_1') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段一</option>';
	
	channel_selector += '<option value="Meeting_2"';
	if (selected_value == 'Meeting_2') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段二</option>';
	
	channel_selector += '<option value="Meeting_3"';
	if (selected_value == 'Meeting_3') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段三</option>';
	
	channel_selector += '<option value="Meeting_4"';
	if (selected_value == 'Meeting_4') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段四</option>';
	
	channel_selector += '<option value="Meeting_5"';
	if (selected_value == 'Meeting_5') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段五</option>';
	
	channel_selector += '<option value="Meeting_6"';
	if (selected_value == 'Meeting_6') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段六</option>';
	
	channel_selector += '<option value="Meeting_7"';
	if (selected_value == 'Meeting_7') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段七</option>';
	
	channel_selector += '<option value="Meeting_8"';
	if (selected_value == 'Meeting_8') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段八</option>';
	
	channel_selector += '<option value="Meeting_9"';
	if (selected_value == 'Meeting_9') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段九</option>';
	
	channel_selector += '<option value="Meeting_10"';
	if (selected_value == 'Meeting_10') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段十</option>';
	
	channel_selector += '<option value="Meeting_11"';
	if (selected_value == 'Meeting_11') channel_selector += ' selected';
	channel_selector += '>2009 楊海蒂英語與班主任聯誼會議片段十一</option>';			
		
	
	channel_selector += '<option value="Broadcasting1"';
	if (selected_value == 'Broadcasting1') channel_selector += ' selected';
	channel_selector += '>大千電台專訪楊海蒂老師片段一</option>';		
	
	channel_selector += '<option value="Broadcasting2"';
	if (selected_value == 'Broadcasting2') channel_selector += ' selected';
	channel_selector += '>大千電台專訪楊海蒂老師片段二</option>';	
	
	channel_selector += '<option value="MP4"';
	if (selected_value == 'MP4') channel_selector += ' selected';
	channel_selector += '>MP4等著你來拿</option>';	
	
	channel_selector += '<option value="Introduction"';
	if (selected_value == 'Introduction') channel_selector += ' selected';
	channel_selector += '>神奇音標短片介紹</option>';		
	
	channel_selector += '<option value="Introduction2"';
	if (selected_value == 'Introduction2') channel_selector += ' selected';
	channel_selector += '>楊海蒂老師上課實況一</option>';
	
	channel_selector += '<option value="Introduction3"';
	if (selected_value == 'Introduction3') channel_selector += ' selected';
	channel_selector += '>楊海蒂老師上課實況二</option>';
	
	
	channel_selector += '<option value="Book_1_4-1"';
	if (selected_value == 'Book_1_4-1') channel_selector += ' selected';
	channel_selector += '>初級本一 4-1 字母課程</option>';
	
	channel_selector += '<option value="Book_1_4-2"';
	if (selected_value == 'Book_1_4-2') channel_selector += ' selected';
	channel_selector += '>初級本一 4-2 聽力測驗</option>';
	
	channel_selector += '<option value="Book_1_5-1"';
	if (selected_value == 'Book_1_5-1') channel_selector += ' selected';
	channel_selector += '>初級本一 5-1 發音課程</option>';
	channel_selector += '<option value="Book_1_6-1"';
	if (selected_value == 'Book_1_6-1') channel_selector += ' selected';
	channel_selector += '>初級本一 6-1 發音課程</option>';
	channel_selector += '<option value="Book_2_2-1"';
	if (selected_value == 'Book_2_2-1') channel_selector += ' selected';
	channel_selector += '>初級本二 2-1 特殊字課程</option>';
	channel_selector += '<option value="Book_3_1-2"';
	if (selected_value == 'Book_3_1-2') channel_selector += ' selected';
	channel_selector += '>中級本三 1-2</option>';
	channel_selector += '<option value="Book_4_1-8"';
	if (selected_value == 'Book_4_1-8') channel_selector += ' selected';
	channel_selector += '>高級本四 1-8</option>';
	channel_selector += '</select>';
	
	param = param + channel_selector;
	document.getElementById('video_td').innerHTML = param;
	document.getElementById('video_td').focus();	
}


function go_news(select_obj){
	var selected_value = get_select_value(select_obj);
	window.location = 'news01.php?page=' + selected_value;
}

function go_photos(select_obj,Cat_Id){
	var selected_value = get_select_value(select_obj);
	window.location = 'photo01.php?page=' + selected_value + '&Cat_Id=' + Cat_Id;
}

function show_photo(select_obj,Cat_Id){
	var selected_value = get_select_value(select_obj);	
	//window.location = 'photo01.php?page=' + selected_value + '&Cat_Id=' + Cat_Id;
	window.location = 'photo02.php?index=' + selected_value + '&Cat_Id=' + Cat_Id + '#C';	
}

function calculate_total(){
	//var Quantity = get_select_value(select_obj);
	//var total = Quantity * 3200;
	//document.getElementById('total').innerHTML = '訂購金額 ' + total + ' 元';
	//document.getElementById('sub_total').innerHTML = total;
	var DVD_PRICE = 3200;
	var BOOK_PRICE = 1600;
	var GRAMMAR1_PRICE = 1200;
	var GRAMMAR2_PRICE = 1200;
	var dvd_quantity = get_select_value(document.all("DVD_Quantity"));
	var book_quantity = get_select_value(document.all("Book_Quantity"));
	var grammar1_quantity = get_select_value(document.all("Grammar1_Quantity"));
	var grammar2_quantity = get_select_value(document.all("Grammar2_Quantity"));
	
	var dvd_sub_total = dvd_quantity * DVD_PRICE;
	var book_sub_total = book_quantity * BOOK_PRICE;
	var grammar1_sub_total = grammar1_quantity * GRAMMAR1_PRICE;
	var grammar2_sub_total = grammar2_quantity * GRAMMAR2_PRICE;
	
	document.getElementById('dvd_sub_total').innerHTML = dvd_sub_total;
	document.getElementById('book_sub_total').innerHTML = book_sub_total;
	document.getElementById('grammar1_sub_total').innerHTML = grammar1_sub_total;
	document.getElementById('grammar2_sub_total').innerHTML = grammar2_sub_total;
	
	
	var total = dvd_sub_total + book_sub_total + grammar1_sub_total + grammar2_sub_total;
	
	document.getElementById('total').innerHTML = '訂購金額 ' + total + ' 元';
	
}

function check(obj){
	var dvd_quantity = get_select_value(document.all("DVD_Quantity"));
	var book_quantity = get_select_value(document.all("Book_Quantity"));
	var grammar1_quantity = get_select_value(document.all("Grammar1_Quantity"));
	var grammar2_quantity = get_select_value(document.all("Grammar2_Quantity"));
	
	if (dvd_quantity == 0 && book_quantity == 0 && grammar1_quantity == 0 && grammar2_quantity == 0){
		alert('您必須選擇一樣產品！');		
		return false;
	}
	
	if (obj.Firstname.value == ''){
		alert('請輸入付款人姓名！');
		obj.Firstname.focus();
		return false;
	}
	
	if (obj.Email.value == ''){
		alert('請輸入付款人電子信箱！');
		obj.Email.focus();
		return false;
	}
	
	if (get_select_value(obj.Order_City) == '0'){
		alert('請輸入付款人居住縣市！');
		obj.Order_City.focus();
		return false;
	}
	
	if (get_select_value(obj.Order_Zip) == '0'){
		alert('請輸入付款人區域號碼！');
		obj.Order_Zip.focus();
		return false;
	}
	
	if (obj.Address.value == ''){
		alert('請輸入付款人地址！');
		obj.Address.focus();
		return false;
	}
	
	
	if (obj.Mobile.value == '' && obj.Area_Code.value == ''&& obj.Phone.value == ''){
		alert('請輸入付款人手機或付款人白天電話！');
		obj.Mobile.focus();
		return false;
	}
	
	if (obj.Mobile.value == ''){
		if (obj.Area_Code.value == ''){
			alert('請輸入付款人白天電話區域號碼！');
			obj.Area_Code.focus();
			return false;
		}
		
		if (obj.Phone.value == ''){
			alert('請輸入付款人白天電話號碼！');
			obj.Phone.focus();
			return false;
		}
		
	}
	
	if (obj.Invoice_ID_Required.value == 'true'){
		if (obj.Invoice_ID.value == ''){
			alert('請輸入發票統一編號！');
			obj.Invoice_ID.focus();
			return false;
		}
		
		if (obj.Invoice_Title.value == ''){
			alert('請輸入發票抬頭！');
			obj.Invoice_Title.focus();
			return false;
		}
		
		if (get_select_value(obj.Invoice_City) == '0'){
			alert('請輸入發票寄送縣市！');
			obj.Invoice_City.focus();
			return false;
		}
	
		if (get_select_value(obj.Invoice_Zip) == '0'){
			alert('請輸入發票寄送區域號碼！');
			obj.Invoice_Zip.focus();
			return false;
		}
		
		if (obj.Invoice_Address.value == ''){
			alert('請輸入發票寄送地址！');
			obj.Invoice_Address.focus();
			return false;
		}		
	}
	
	if (document.getElementById('the_same_address').checked == false){
		if (obj.Deliver_Firstname.value == ''){
			alert('請輸入收件人姓名！');
			obj.Deliver_Firstname.focus();
			return false;
		}
		
		
		if (get_select_value(obj.Deliver_City) == '0'){
			alert('請輸入收件人居住縣市！');
			obj.Deliver_City.focus();
			return false;
		}
		
		if (get_select_value(obj.Deliver_Zip) == '0'){
			alert('請輸入收件人區域號碼！');
			obj.Deliver_Zip.focus();
			return false;
		}
		
		if (obj.Deliver_Address.value == ''){
			alert('請輸入收件人地址！');
			obj.Deliver_Address.focus();
			return false;
		}
		
		
		if (obj.Deliver_Mobile.value == '' && obj.Deliver_Area_Code.value == ''&& obj.Deliver_Phone.value == ''){
			alert('請輸入收件人手機或收件人白天電話！');
			obj.Deliver_Mobile.focus();
			return false;
		}
		
		if (obj.Deliver_Mobile.value == ''){
			if (obj.Deliver_Area_Code.value == ''){
				alert('請輸入收件人白天電話區域號碼！');
				obj.Deliver_Area_Code.focus();
				return false;
			}
			
			if (obj.Deliver_Phone.value == ''){
				alert('請輸入收件人白天電話號碼！');
				obj.Deliver_Phone.focus();
				return false;
			}
			
		}
	}
	
	document.getElementById('submit_btn').disabled = true;
	document.getElementById('reset_btn').disabled = true;
	obj.submit();
	document.getElementById('order_indicator').style.display='block';	
}

function show_invoice(){
	document.getElementById('fp_tr1').style.display = 'block';
	document.getElementById('fp_tr2').style.display = 'block';
	document.getElementById('fp_tr3').style.display = 'block';
	document.getElementById('Invoice_Donate').checked = false;
	document.form.Invoice_ID_Required.value = 'true';
}

function hide_invoice(){
	document.getElementById('fp_tr1').style.display = 'none';
	document.getElementById('fp_tr2').style.display = 'none';
	document.getElementById('fp_tr3').style.display = 'none';
	document.form.Invoice_ID_Required.value = 'false';
}

function copy_address(obj){
	if (document.getElementById('the_same_address').checked == true){
		obj.Deliver_Firstname.value = obj.Firstname.value;
		obj.Deliver_Mobile.value = obj.Mobile.value;
		obj.Deliver_Area_Code.value = obj.Area_Code.value;
		obj.Deliver_Phone.value = obj.Phone.value;
		obj.Deliver_Extension.value = obj.Extension.value;
		obj.Deliver_Address.value = obj.Address.value;
		
		the_select = obj.Order_City;
		the_index = the_select.selectedIndex;		
		obj.Deliver_City.selectedIndex = the_index;
		
		Location_FreshZipCode(obj.Deliver_City.selectedIndex, obj.Deliver_Zip);
		the_select = obj.Order_Zip;
		the_index = the_select.selectedIndex;		
		obj.Deliver_Zip.selectedIndex = the_index;				
	}
}