function iflip(frameid, channel, tab){ // put selected file into iframe var sel = tab.id; var content = frameid+"."+channel+".html"; document.getElementById(frameid).src = content; // set tab to active, all others to inactive for (var i=1; i<"9";i++){ var id = i+'' var opt = document.getElementById(id); if(id != sel){ opt.className = "tab-inactive"; } else { opt.className = "tab-active"; } if (!document.getElementById(id)) return; } } function ShowContent(d) { document.getElementById(d).style.display = "block"; } function HideContent(d) { document.getElementById(d).style.display = "none"; } // this function changes the color of the text and background function updateColor(id,txtcolor, bgcolor) { var txt = document.forms['SetStat'].elements[id].style.color = txtcolor; var bg = document.forms['SetStat'].elements[id].style.backgroundColor = bgcolor ; return false; } function updateTxtColor(id,txtcolor) { var txt = document.forms['SetStat'].elements[id].style.color = txtcolor; if (id == "cl_name"){ document.forms['SetStat'].elements['cl_txt'].value = txtcolor; } else{ document.forms['SetStat'].elements['op_txt'].value= txtcolor; } return false; } function updateBgColor(id, bgcolor) { var bg = document.forms['SetStat'].elements[id].style.backgroundColor = bgcolor ; if (id == "cl_name"){ document.forms['SetStat'].elements['cl_bg'].value = bgcolor; } else{ document.forms['SetStat'].elements['op_bg'].value = bgcolor; } return false; } function toggleBox(szDivID, iState) // 1 visible, 0 hidden { if(document.layers) //NN4+ { document.layers[szDivID].visibility = iState ? "show" : "hide"; } else if(document.getElementById) //gecko(NN6) + IE 5+ { var obj = document.getElementById(szDivID); obj.style.visibility = iState ? "visible" : "hidden"; } else if(document.all) // IE 4 { document.all[szDivID].style.visibility = iState ? "visible" : "hidden"; } } function calcHeight(frame) { //find the height of the internal page var the_height= document.getElementById(frame).contentWindow. document.body.scrollHeight; //change the height of the iframe document.getElementById(frame).height= the_height; //alert("frame="+frame+" height="+the_height); //calcMain('main'); } /* function calcMain(frame) { alert("start calcMain"); //find the height of the internal page var main_height= parent.parent.document.getElementById('main').contentWindow. document.body.scrollHeight; //change the height of the iframe parent.parent.document.getElementById('main').height= the_height; alert("main height" = main_height); } */