';
}
//tree += '';
fnDrow(view_id, tree);
//document.tree_form.tree_test2.focus();
}
// Tree状態をhiddenにセット
function setTreeStatus(name) {
var tree_status = "";
for(i=0; i < arrTreeStatus.length ;i++) {
if(i != 0) tree_status += '|';
tree_status += arrTreeStatus[i];
}
document.form1[name].value = tree_status;
}
// Tree状態を削除する(閉じる状態へ)
function fnDelTreeStatus(path) {
for(i=0; i < arrTreeStatus.length ;i++) {
if(arrTreeStatus[i] == path) {
arrTreeStatus[i] = "";
}
}
}
// ツリー描画
function fnDrow(id, tree) {
// ブラウザ取得
MyBR = fnGetMyBrowser();
// ブラウザ事に処理を切り分け
switch(myBR) {
// IE4の時の表示
case 'I4':
document.all(id).innerHTML = tree;
break;
// NN4の時の表示
case 'N4':
document.layers[id].document.open();
document.layers[id].document.write("
");
document.layers[id].document.write(tree);
document.layers[id].document.write("
");
document.layers[id].document.close();
break;
default:
document.getElementById(id).innerHTML=tree;
break;
}
}
// 階層ツリーメニュー表示・非表示処理
function fnTreeMenu(tName, imgName, path) {
tMenu = document.all[tName].style;
if(tMenu.display == 'none') {
fnChgImg(IMG_MINUS, imgName);
tMenu.display = "block";
// 階層の開いた状態を保持
arrTreeStatus.push(path);
} else {
fnChgImg(IMG_PLUS, imgName);
tMenu.display = "none";
// 閉じ状態を保持
fnDelTreeStatus(path);
}
}
// フォルダオープン処理
function fnFolderOpen(path) {
// クリックしたフォルダ情報を保持
document.form1['tree_select_file'].value = path;
// treeの状態をセット
setTreeStatus('tree_status');
// submit
fnModeSubmit('move','','');
}
// 閲覧ブラウザ取得
function fnGetMyBrowser() {
myOP = window.opera; // OP
myN6 = document.getElementById; // N6
myIE = document.all; // IE
myN4 = document.layers; // N4
if (myOP) myBR="O6"; // OP6以上
else if (myIE) myBR="I4"; // IE4以上
else if (myN6) myBR="N6"; // NS6以上
else if (myN4) myBR="N4"; // NN4
else myBR=""; // その他
return myBR;
}
// imgタグの画像変更
function fnChgImg(fileName,imgName){
document.getElementById(imgName).src = fileName;
}
// ファイル選択
function fnSelectFile(id, val) {
if(old_select_id != '') document.getElementById(old_select_id).style.backgroundColor = '';
document.getElementById(id).style.backgroundColor = val;
old_select_id = id;
}
// 背景色を変える
function fnChangeBgColor(id, val) {
if (old_select_id != id) {
document.getElementById(id).style.backgroundColor = val;
}
}