﻿function IsNumber(string,sign)
{
	var number;
	if (string==null) return false;
	if ((sign!=null) && (sign!='-') && (sign!='+'))
	{
		alert('IsNumber(string,sign)的參數出錯：\nsign為null或"-"或"+"');
		return false;
	}
		number = new Number(string);
	if (isNaN(number))
	{
		return false;
	}
	else if ((sign==null) || (sign=='-' && number<0) || (sign=='+' && number>0))
	{
		return true;
	}
	else return false;
}

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

function check(got) {

if (got.name.value=="") {
	alert("Please input your Name!!");
	got.name.focus();
	return false;
}

if (got.phone.value=="") {
	alert("Please input your Phone!!"); 
	got.phone.focus();
	return false;
}

if (got.fax.value=="") {
	alert("Please input your FAX!!"); 
	got.fax.focus();
	return false;
}


if (got.email.value=="") {
	alert("Please input your E-mail!!");
	got.email.focus();
	return false;
}

if ((!got.email.value == "" && got.email.value.indexOf('@',0) == -1) || (!got.email.value == "" && got.email.value.indexOf('.',0) == -1))
{
	alert("Please input the correct E-mail!!");
	got.email.focus();
	return false;
}

if (got.message.value=="") {
	alert("Please input your Message!!"); 
	got.message.focus();
	return false;
}



return true;
}