﻿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.s_01[0].checked != true) && (got.s_01[1].checked != true)) {
	alert("您的關鍵字廣告獲得的流量(clicks)增加還是減少?");
	got.s_01[0].focus();
	return false;
}

if ((got.s_02[0].checked != true) && (got.s_02[1].checked != true)) {
	alert("您的關鍵字點閱花費(PPC)增加還是減少?");
	got.s_01[0].focus();
	return false;
}

if ((got.s_01[0].checked == true) && (got.s_02[0].checked == true)) {
	location.href = "http://tw.emarketing.yahoo.com/ysm/ysm/index3_2.html"
	return false;
}

if ((got.s_01[0].checked == true) && (got.s_02[1].checked == true)) {
	location.href = "http://tw.emarketing.yahoo.com/ysm/ysm/index3_1.html"
	return false;
}

if ((got.s_01[1].checked == true) && (got.s_02[1].checked == true)) {
	location.href = "http://tw.emarketing.yahoo.com/ysm/ysm/index3_3.html"
	return false;
}

if ((got.s_01[1].checked == true) && (got.s_02[0].checked == true)) {
	location.href = "http://tw.emarketing.yahoo.com/ysm/ysm/index3_4.html"
	return false;
}

return true;
}