/*****************************************************************************/////				■■■ フォーム項目に関するJavaScript関数 ■■■///*****************************************************************************//** *	■関数名	attention *	■機能説明	フォーム項目の背景色を警告色に変更 *	■引数	form : 対象項目のformのname属性もしくは番号 *			name : 対象項目のname属性もしくは番号 *	■戻り値	void */function attention(formNo, elementNo){	try{		if(document.forms[formNo] && document.forms[formNo].elements[elementNo]){			document.forms[formNo].elements[elementNo].style.backgroundColor = 'PINK';		}	}catch(e){		alert("attention : " + e);	}}/** * ■関数名		setFocus * ■機能説明	対象項目にフォーカスをセットする * ■引数		name : 対象項目のname属性 */function setFocus(formNo, elementNo){	try{		if(document.forms[formNo] && document.forms[formNo].elements[elementNo]){			// 対象項目がテキスト系で、かつ値が入っている場合、選択			if((document.forms[formNo].elements[elementNo].type  == "text" ||			    document.forms[formNo].elements[elementNo].type  == "textarea") &&			    document.forms[formNo].elements[elementNo].value != ""){				document.forms[formNo].elements[elementNo].select();			}			// そうでない場合、フォーカス			else{				document.forms[formNo].elements[elementNo].focus();			}		}	} catch(e){		alert("setFocus : " + e);	}}