<!--
//#BEGIN聯絡我們======================================
function contact_check() {

	obj = document.getElementById('company_name');
	value = trim(obj.value);
	if(value=="") {
		alert("Please include your company name.");
		obj.focus();
		return false;
	}
/*

	//姓名
	obj = document.getElementById('contactname');
	name1 = trim(obj.value);
	if(name1=="") {
		obj.focus();
		alert("姓名不可為空白!!");
		return false;
	}
	if(name1!="") { //有缺點, 符號無法判斷
		if(name1.length<2) {
			obj.focus();
			alert("姓名最少為二個字");
			return false;
		}
	}
*/

/*
	//phone
	obj1 = document.getElementById('phone1');
	obj2 = document.getElementById('phone2');
	obj3 = document.getElementById('mobile');
	value1 = trim(obj1.value);
	value2 = trim(obj2.value);
	value3 = trim(obj3.value);

	if(value1=="" && value2=="" && value3=="") {
		obj1.focus();
		alert("請填入聯絡電話!!");
		return false;
	}
*/
/*
	//email
	obj = document.getElementById('contactemail');
	email = trim(obj.value);
	if(email_check(email)==false) {
		obj.focus();
		return false;
	}
*/

/*
	//address
	obj3 = document.getElementById('address');
	value3 = trim(obj3.value);
	if(value3=="") {
		alert("請填寫地址!!");
		obj3.focus();
		return false;
	}
*/
/*

	obj = document.getElementById('security_code');
	value = trim(obj.value);
	if(value=="") {
		alert("請輸入認證碼!!");
		obj.focus();
		return false;
	}
*/

	//message
	obj1 = document.getElementById('content');
	value1 = trim(obj1.value);
	if(value1=="") {
		obj1.focus();
		alert("Please enter your comments or questions.");
		return false;
	}

	document.getElementById('B1').disabled = '';
	return true;
}
//#END聯絡我們======================================



//#搜尋=======================
function search_check() {
	document.form1.action = "products.php?c1="+document.getElementById('c1').value;
	if(document.getElementById('search').value) {
		document.form1.action += "&search="+base64encode(document.getElementById('search').value);
	}

	location.href = document.form1.action;
}
//#搜尋=======================







//#BEGIN與朋友分享======================================
function products_share_check() {
	//email
	obj = document.getElementById('email');
	email = trim(obj.value);
	if(email_check(email)==false) {
		obj.focus();
		return false;
	}

	obj = document.getElementById('myname');
	value = obj.value;
	value = trim(value);
	if(value=="") {
		alert("Please include your name.");
		obj.focus();
		return false;
	}

	document.getElementById('B1').disabled = '';
	return true;
}
//#BEGIN與朋友分享======================================


//#BEGIN產品子類別-MORE======================================
function more_class(index) {
	document.getElementById("more_class_content_"+index).style.display = "";
	document.getElementById("href_products_class_"+index).innerHTML = "";
}
//#BEGIN產品子類別-MORE======================================


//#BEGIN產品副類別-跳到指定INDEX======================================
function change_products_class2(allindex) {
	newindex = allindex.split(",");
	location.href = "products.php?c1="+newindex[0]+"&c2="+newindex[1]+"&c3="+newindex[2];
}
//#BEGIN產品副類別-跳到指定INDEX======================================



function check_search() {
	obj = document.getElementById('search');
	value = trim(obj.value);
	if(!value) {
		obj.focus();
		alert("Please input Keyword!!");
		return false;
	}
	return true;
}
	
-->