var rtsver = "1.0.6"; var mnunum = 0; function DrawMenu() { var oldie = false; mnunum = 0; document.write(""); document.write("
\n"); // old bgcolor was whitesmoke document.write("home page\n"); document.write("

Programming:
\n"); DrawMenuItem("http://andrewd.50webs.com/flash.htm","such as this one:
","Flash games"); DrawMenuItem("http://andrewd.50webs.com/pr.htm","PR2-compatible robot running ROS
","PR Lite"); DrawMenuItem("http://andrewd.50webs.com/robomagellan.htm","AHS Robotics Club's competition entry
","RoboMagellan"); DrawMenuItem("/rts","open source RTS; latest version " + rtsver + "
","Afdarts"); DrawMenuItem("http://andrewd.50webs.com/orts.htm","my ORTS Game AI competition entry
","AI competition"); // http://cs.ubc.ca/~zephyr/pic/orts.jpg DrawMenuItem("/shootcity.htm","open source side-scrolling shooter; latest version 1.00
","ShootCity","

"); document.write("

Videos:
\n"); DrawMenuItem("http://andrewd.50webs.com/videorobots.htm","robot videos","robots"); DrawMenuItem("http://andrewd.50webs.com/videogames.htm","computer game videos","computer games"); DrawMenuItem("http://andrewd.50webs.com/videomagic.htm","at school variety shows","magic shows"); DrawMenuItem("http://andrewd.50webs.com/video.htm","videos not in the other categories","other videos","

"); /*DrawMenuItem("/vid/magic.htm","at school variety shows","magic shows"); DrawMenuItem("/vid/other.htm","as the title says","other public videos"); DrawMenuItem("/vid/unlisted.htm","videos not in search results","unlisted videos","

");*/ document.write("

Other:
\n"); DrawMenuItem("http://andrewd.50webs.com/resume.htm","for those who find it useful","resume"); DrawMenuItem("/catchp.htm","which unfortunately has some problems","catch logic problem"); DrawMenuItem("http://andrewd.50webs.com/links.htm","to websites I do not own","external links"); DrawEmai1(); document.write("

\n"); //document.write("

\n"); //DrawFirefox("/opinions.htm","/opinions.htm","/opinions.htm","web browser tips"); // remove link to silly browser opinions page /*document.write("
"); if (Math.random() >= 0.5) { // sf.net keeps track of project web views, so split between Afdarts and ShootCity DrawMenuItem("http://andrewd.50webs.com/webhosts.htm","web/software hosts information","SourceForge",""); } else { DrawMenuItem("http://andrewd.50webs.com/webhosts.htm","web/software hosts information","SourceForge",""); }*/ document.write("

"); if (navigator.appVersion.indexOf("MSIE") != -1) { if (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE") + 5)) < 8) oldie = 1; } if (!oldie && (document.location.href == "http://ad510.50webs.com/" || document.location.href == "http://ad510.50webs.com/rts/" || document.location.href == "http://ad510.50webs.com/rts/index.htm" || document.location.href == "http://ad510.50webs.com/shootcity.htm")) { document.write("
Visit my new website!

"); } window.onload = load; } function DrawMenuRTS() { DrawMenuItem("index.htm","","Afdarts home"," | "); //DrawMenuItem("https://downloads.sourceforge.net/downinga-rts/rts" + rtsver + ".exe","","download (v" + rtsver + ")"," | "); document.write("download (v" + rtsver + ") | "); DrawMenuItem("http://andrewd.50webs.com/afdartsdevelopment.htm","","development"," | "); DrawMenuItem("theory.htm","","code theory"," | "); DrawMenuItem("copymusic.htm","","custom music"," | "); DrawMenuItem("https://sourceforge.net/projects/downinga-rts","","more from SourceForge","

"); } function DrawMenuItem(urlstr,titlestr,textstr,endstr) { var regexp = new RegExp(urlstr); var match = regexp.exec(window.location.href); var dstr = ""; if (endstr == undefined) { endstr = "
"; } if (titlestr != "") { dstr += ""; } if (match != null) { dstr += ""; } dstr += ""; if (match != null) { dstr += ""; } mnunum = mnunum + 1; dstr += endstr + "\n"; document.write(dstr); } function ShowMenuTitle(idobj,dispstr) { document.getElementById(idobj).style.display = dispstr; } function ShowTitle(idobj,e,objleft) { var mousex = 0; var mousey = 0; // get mouse pos (thanks to quirksmode.org/js/events_properties.html) if (e.pageX || e.pageY) { mousex = e.pageX; mousey = e.pageY; } else if (e.clientX || e.clientY) { mousex = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; mousey = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } // show title if (objleft != undefined) { mousex = objleft; } document.getElementById(idobj).style.top = (mousey + 30) + "px"; document.getElementById(idobj).style.left = mousex + "px"; document.getElementById(idobj).style.display = "block"; } function DrawEmai1() { document.write("email me"); } function DrawFirefox(bdstr,fxstr,opstr,titlestr) { // 7is7.com/software/firefox/futf_dyn.html has more buttons if (titlestr == undefined) { titlestr = ""; } if (navigator.appName == "Netscape") { // reader doesn't need to get firefox if he/she is already using it DrawMenuItem(fxstr,titlestr,"Fire up the Fox",""); } else if (navigator.appName == "Opera") { DrawMenuItem(opstr,titlestr,"Opera Web Browser",""); } else { DrawMenuItem(bdstr,titlestr,"Get Firefox","") } } function detectBrowser(iestr,gdstr) { var dstr = ""; var tm; if (navigator.appName == "Microsoft Internet Explorer") { dstr += "

\n"; dstr += "
\n"; /*dstr += "STILL USING INTERNET EXPLODER?!
\n"; dstr += "
\n";*/ dstr += "Get Firefox
\n"; // getfx.png is the same as http://mouserunner.com/images/GetFx120x60.png dstr += "(or Opera)
\n"; dstr += iestr; document.write(dstr); tm = setTimeout("detectBrowserChg()",20000); } else { document.write(gdstr); } } function detectBrowserChg() { var tm; if (document.getElementById("fxad1").style.display == "block") { document.getElementById("fxad1").style.display = "none"; document.getElementById("fxad2").style.display = "block"; } else { document.getElementById("fxad1").style.display = "block"; document.getElementById("fxad2").style.display = "none"; } tm = setTimeout("detectBrowserChg()",25000); } // based on http://andrewd.50webs.com/script.js with a '/' before emai1.txt function load() { var a = document.getElementsByTagName("a"), req = new XMLHttpRequest(), resp for (var i = 0; i < a.length; i++) if (a[i].href.endsWith("emai1.htm")) a[i].onclick = function() { if (resp) this.href = resp.split(",").reverse().map(function(c, j) { return String.fromCharCode((Number(c) + j * 42 + 1) % 256) }).join("") } req.open("GET", "/emai1.txt") req.onreadystatechange = function() { if (req.readyState == 4 && req.status == 200) resp = req.responseText } req.send() }