////////////////////////////// // // 下面的代码用来添加标题 // ///////////////////////////// if ( ( typeof(topic) != "undefined" ) && ( topic != "" ) && ( typeof( document.all.content ) != "undefined" ) ) document.all.content.insertAdjacentHTML( "afterBegin", "

"+topic+"

" ); //=================================== // 下面的代码用来添加页面底部的banner //=================================== var nav="

"; if ( ( typeof(previous) != "undefined" ) && ( previous != "end" ) ) nav+="上一章节 | "; if ( ( typeof(contents) != "undefined" ) && (contents!="") ) nav+="返回目录 | "; nav+="返回页首"; if ( ( typeof(next) != "undefined" ) && (next!="end") ) nav+=" | 下一章节 "; nav+="

"; document.write(nav); var sd=document.lastModified.toString(); sd=sd.substring(0,sd.indexOf(" ")); var bottom_banner= '
'+ '

'+ '本页最后一次更新于'+ sd+ '
'+ 'Email: Starfish.H@China.com'+ '
'+ '©2000 算法与数据结构 http://algorithm.126.com/ '+ '版权所有 转载请保留出处'+ '

'; document.write(bottom_banner); //========================= // 下面的代码用来同步定位 //========================= /* if (parent.fraToc!=null) { s=location.href; parent.fraToc.locate(s); } */ //========================== // 下面是处理cookie的代码 //========================== function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var path = (argc > 2) ? argv[2] : null; var domain = (argc > 3) ? argv[3] : null; var expires = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape (document.cookie.substring(offset, endstr)); } function GetCookie(name) { var arg = name+"="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal(j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function DeleteCookie (name) { var argv = DeleteCookie.arguments; var argc = DeleteCookie.arguments.length; var path = (argc > 1) ? argv[1] : null; var domain = (argc > 2) ? argv[2] : null; if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } //============================================== // 下面的代码将根据cookie的设定自动切换编程语言 //============================================== var Langue=new Array("pascal","c++"); // Langue是可用的编程语言 function SetLangue() { if (!navigator.cookieEnabled) //如果没有打开cookie { alert("为了使您更方便地浏览本站,请您将浏览器的cookie设置打开,谢谢!"); return; } var lang=GetCookie("langue"); if (lang==null) //如果以前没有指定编程语言 if (parent.topFrame!=null) { parent.topFrame.select_langue(); return; } else { //alert("您还没有指定您所使用的编程语言,下面系统将使用默认的编程语言pascal来显示网站的内容,您可以通过工具栏右上方的“设定编程语言”来改变此默认设置。"); SetCookie("langue","pascal","/"); lang="pascal"; } if ( typeof(document.all.content) != "undefined" ) { var col=document.all.content.all; if (col!=null) for (var i=0;i伪代码的使用


"; col[i].insertAdjacentHTML("AfterBegin",strHTML); } } } } // 设定编程语言 SetLangue(); // 放置计数器 if ( ( location.protocol != "file:" ) && ( location.hostname != "localhost" ) ) { document.write(""); }