function validate(){
var str_mail=document.form_email.email.value
alert_str=0;
		
		if (str_mail==""){
			alert_str="You have not written down your Email address"
		}else{
			if (str_mail.indexOf("@",0)<=0 || str_mail.indexOf(".",0)<=0){
			alert_str="The Email address is not correct"
			}
		}
		
		if (document.form_email.Contact_Person.value==""){
			alert_str="You have not written down your Name"		
		}		
		
		if (document.form_email.Phone_No.value==""){
			alert_str="You have not written down your Telphone number"		
		}
				
		if (alert_str!=0){
			alert(alert_str);
			return false;
		}
	}
	
function validate_download(){
var str_mail=document.form_email.Email.value
alert_str=0;
				
		//if (document.form_email.Message.value==""){
			//alert_str="You have not written down your Message."		
		//}
		
		if (document.form_email.Country.value==""){
			alert_str="Please select your Country"		
		}		
		
		if (document.form_email.City.value==""){
			alert_str="You have not written down your City"		
		}
		
		if (document.form_email.Address.value==""){
			alert_str="You have not written down your Address"		
		}
		
		if (str_mail==""){
			alert_str="You have not written down your Email address"
		}else{
			if (str_mail.indexOf("@",0)<=0 || str_mail.indexOf(".",0)<=0){
			alert_str="The Email address is not correct"
			}
		}

		if (document.form_email.Fax_No_conuntry.value=="" || document.form_email.Fax_No_number.value==""){
			alert_str="The Fax Number is not valid"		
		}		
		
		if (document.form_email.Phone_No_conuntry.value=="" || document.form_email.Phone_No_number.value==""){
			alert_str="The Phone Number is not valid"		
		}		

		if (document.form_email.First_Name.value==""){
			alert_str="You have not written down the First_Name"		
		}		
		
		if (document.form_email.Last_Name.value==""){
			alert_str="You have not written down the Last_Name"		
		}	


		if (document.form_email.contact_ppl[0].checked==0 && document.form_email.contact_ppl[1].checked==0 && document.form_email.contact_ppl[2].checked==0 ){
			alert_str="Please Select Mr, Mrs or Miss"		
		}		

		if (document.form_email.Designer.checked==0 && document.form_email.Importer.checked==0 && document.form_email.Exporter.checked==0 && document.form_email.Manufacturer.checked==0 && document.form_email.Trading.checked==0 && document.form_email.Others.checked==0){
			alert_str="Please Select Designer, Importer, Exporter, Manufacturer, Trading or Others."		
		}		
		
		if (document.form_email.Others.checked==1 && document.form_email.other_company_type.value==""){
			alert_str="If you select[Others], please enter the details."
		}		
		
		if (document.form_email.Company_Name.value==""){
			alert_str="You have not written down the Company Name"		
		}		

		if (alert_str!=0){
			alert(alert_str);
			return false;
		}
	}	
	
function validate_download_big5(){
var str_mail=document.form_email.Email.value
alert_str=0;
	
		//if (document.form_email.Message.value==""){
			//alert_str="請填寫內容"		
		//}
		
		if (document.form_email.Country.value==""){
			alert_str="請選擇國家"		
		}			
		
		if (document.form_email.City.value==""){
			alert_str="請填寫城市"		
		}
		
		if (document.form_email.Address.value==""){
			alert_str="請填寫地址"		
		}
		
		if (str_mail==""){
			alert_str="請填寫電郵地址"
		}else{
			if (str_mail.indexOf("@",0)<=0 || str_mail.indexOf(".",0)<=0){
			alert_str="電郵地址不正確"
			}
		}
		
		if (document.form_email.Fax_No_conuntry.value=="" || document.form_email.Fax_No_number.value==""){
			alert_str="請填寫正確的傳真號碼"		
		}		
		
		if (document.form_email.Phone_No_conuntry.value=="" || document.form_email.Phone_No_number.value==""){
			alert_str="請填寫正確的電話號碼"		
		}		
		
		if (document.form_email.First_Name.value==""){
			alert_str="請填寫名字"		
		}		
		
		if (document.form_email.Last_Name.value==""){
			alert_str="請填寫姓氏"		
		}		
		
		if (document.form_email.contact_ppl[0].checked==0 && document.form_email.contact_ppl[1].checked==0 && document.form_email.contact_ppl[2].checked==0 ){
			alert_str="請選擇生先生、太太或小姐"		
		}		
		
		if (document.form_email.Designer.checked==0 && document.form_email.Importer.checked==0 && document.form_email.Exporter.checked==0 && document.form_email.Manufacturer.checked==0 && document.form_email.Trading.checked==0 && document.form_email.Others.checked==0){
			alert_str="請選擇設計師、入口商、出口商、製造商、貿易行或其他"
		}		
		
		if (document.form_email.Others.checked==1 && document.form_email.other_company_type.value==""){
			alert_str="若選擇[其他]，請填寫詳情"
		}		
		
		if (document.form_email.Company_Name.value==""){
			alert_str="請填寫公司名稱"		
		}		

		if (alert_str!=0){
			alert(alert_str);
			return false;
		}
	}		
	
function clear_check_value(){
	//document.form_email.SILICONE_RUBBER_WRIST_BANDS.checked=false;
	///document.form_email.SILICONE_RUBBER_KEYPAD_SERIES.checked=false;
	///document.form_email.CONDUCTIVE_SILICONE_INTER_CONNECTOR_SERIES.checked=false;
	//document.form_email.RUBBER_PART_SERIES.checked=false;
	//document.form_email.MOBILE_PHONE_SERIES.checked=false;
}	
	
	
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		pic = newImage("images/menu_about_en.gif");
		pic = newImage("images/menu_about_over_en.gif");
		pic = newImage("images/menu_inter_en.jpg");
		pic = newImage("images/menu_inter_over_en.jpg");
		pic = newImage("images/menu_rubber_en.jpg");
		pic = newImage("images/menu_rubber_over_en.jpg");
		pic = newImage("images/menu_mphone_en.jpg");
		pic = newImage("images/menu_mphone_over_en.jpg");
		
		pic = newImage("images/menu_trade_en.jpg");
		pic = newImage("images/menu_trade_over_en.jpg");
		
		pic = newImage("images/menu_contact_en.jpg");
		pic = newImage("images/menu_contact_over_en.jpg");
		
		pic = newImage("images/menu_bg_over_top.jpg");
		
		pic = newImage("images/menu_top_en.jpg");
		pic = newImage("images/menu_top_over_en.jpg");
		
		pic = newImage("images/menu_bg_under_top.gif");
		
		pic = newImage("images/submenu_flodable_en.gif");
		pic = newImage("images/submenu_flodable_over_en.gif");
		pic = newImage("images/submenu_keypad_en.gif");
		pic = newImage("images/submenu_keypad_over_en.gif");
		pic = newImage("images/submenu_single_over_en.gif");
		pic = newImage("images/submenu_yl_en.gif");
		pic = newImage("images/submenu_yl_over_en.gif");
		pic = newImage("images/submenu_ys_en.gif");
		pic = newImage("images/submenu_ys_over_en.gif");
		pic = newImage("images/submenu_ye_en.gif");
		pic = newImage("images/submenu_ye_over_en.gif");
		pic = newImage("images/submenu_dm_en.gif");
		pic = newImage("images/submenu_dm_over_en.gif");
		pic = newImage("images/submenu_yf_en.gif");
		pic = newImage("images/submenu_yf_over_en.gif");
		pic = newImage("images/submenu_yal_en.gif");
		pic = newImage("images/submenu_yal_over_en.gif");
		pic = newImage("images/submenu_material_en.gif");
		pic = newImage("images/submenu_photo_en.gif");
		preloadFlag = true;
	}
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function changeTable(pic_num,pic_dir) {
	if (pic_dir<0){
		pic_num=pic_num-1}
	else{
		pic_num=pic_num+1}
}

