// JavaScript Document
//<META http-equiv="Content-Type" content="text/html; charset=big5">
//-------------------------------------------------------------------------
//副程式，檢查使用者於輸入的資料是否合乎規定，進而取得這些資料、傳給SSI，傳入form的名稱、SSI的URL
//本程式需要common.js內的findObj函數及rsCreateIframe副程式
function register(formObj,URL){
	//alert(formObj+','+URL);
	var theForm = findObj(formObj);
	//alert(theForm);
	if(theForm.name.value== ''){
		alert('不要忘了輸入姓名喔！');
		return;
	}else if(theForm.email.value== ''){
		alert('不要忘了輸入email喔！');
		return;
	}else if(theForm.content.value== ''){
		alert('不要忘了輸入留言喔！');
		return;
	}else{
		//alert(formObj+','+URL);
		//將使用者輸入的資料以remote script的方式傳給SSI
		rsCreateIframe(addFormElm2Url(formObj,URL));
	}
}