var spqr = 'Press "OK", read it, then press "Back"' // DynWrite(target, text) works on controls, after page load it is a computed function // Classify browser var nCheck = 0 DocDom = (document.getElementById?true:false) // NS6 also IE5 if (DocDom) nCheck++ DocLay = (document.layers?true:false) ; if (DocLay) nCheck++ // NS4 DocAll = (document.all?true:false) ; if (DocAll) nCheck++ // IE4 function ReportDocVars() { if (nCheck==0) document.write(' None of DocAll, DocLay, DocDom is set;', ' Dynamic Write will fail.'.italics(), '

') if (DocAll) document.write(' DocAll is set. ') if (DocLay) document.write(' DocLay is set. ') if (DocDom) document.write(' DocDom is set. ') } function TableDocVars() { document.writeln('

', '
According to the displaying computer :<\/th>', '<\/tr>
', 'Your browser gives
', 'DocAll = ', DocAll, ' ; DocDom = ', DocDom, ' ; DocLay = ', DocLay, '.<\/b>
', 'Check : ', nCheck, ' browser classification(s) set.', '<\/td><\/tr><\/table>') } // Define Function DynWrite(Where, What) to suit browser : DocStr='' if(DocLay) DocStr="return document.layers['NS_'+id]" if(DocAll) DocStr="return document.all[id]" if(DocDom) DocStr="return document.getElementById(id)" GetRef=new Function("id", DocStr) // DocLay = true ; DocAll = DocDom = false // Simulate NS4.7 DynWarn = 0 if(DocStr=='') { DynWrite=new Function("return false") } else { if(DocAll || DocDom) { DynWrite=new Function("id", "S", "GetRef(id).innerHTML=S; return true") } if(DocLay) DynWrite=new Function( "if (0==DynWarn++)"+ " alert('DynWrite not supported in \".layers\" browsers');"+ "return false") } function NoDynLay() { if (DocLay) document.writeln( '

Dynamic Writing in a ".layers" browser ', 'such as yours is difficult and I cannot now test it. Therefore, ', 'I don\'t now attempt it. An alert will be given in the first use in ', 'each load/reload of a page.<\/i>') }