/*
FILE ARCHIVED ON 4:19:30 Jul 13, 2006 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 3:13:50 Jun 21, 2011.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
// redirect pages to the main content frame
function redirect() {
var path = parent.location.search.substr(1);
var valid = /^\w[\w\/]+\.[a-z]{3,5}$/;
var old = /^photoshop(\d)\.shtml$/;
if (! path || ! valid.test(path)) {
path = 'news.html';
} else if (old.test(path)) {
path = path.replace(/(\d)/, '0$1');
}
location.replace(path);
}
// load and restore page if the root page is not valid
function breakOut() {
var framesetURL = 'http://web.archive.org/web/20060713041930/http://user.fundy.net/morris/';
//var thisFileName = document.URL.slice(document.URL.lastIndexOf('/') + 1);
//var isOutsideFrameset = false;
function loadFrameset() {
var thisFileName = document.URL.substr(document.URL.lastIndexOf('/') + 1);
if (document.body) {
document.body.style.display = 'none';
}
location.replace(framesetURL + '?' + thisFileName);
}
if (location.protocol == 'file:') {
return;
} else if (window == top) {
//isOutsideFrameset = true;
loadFrameset();
} else {
try {
void(parent.location.href);
} catch(e) {
//isOutsideFrameset = true;
loadFrameset();
}
}
/*if (isOutsideFrameset) {
if (document.body) {
document.body.style.display = 'none';
}
location.replace(framesetURL + '?' + thisFileName);
}*/
}
// function to execute when a page is loaded
function stdOnLoad() {
removeLinkBox();
preloadImages();
}
// remove link outline - removes link bounding boxes on and links in IE4+
function removeLinkBox() {
if (document.all) {
for (var i in document.links) {
document.links[i].onfocus = document.links[i].blur;
}
}
}
// cache mouseover images
function preloadImages() {
if (!parent.preloadComplete) {
newImage('images/poll/bullet1.png');
newImage('images/interface/nexto.gif');
newImage('images/interface/backo.gif');
newImage('images/interface/topo.gif');
newImage('images/tutorials/rating/rating0.png');
newImage('images/tutorials/rating/rating1.png');
newImage('images/tutorials/rating/rating2.png');
newImage('images/tutorials/rating/rating3.png');
newImage('images/tutorials/rating/rating4.png');
newImage('images/tutorials/rating/rating5.png');
parent.preloadComplete = true;
}
}
// create new images for cache
var imageCache = new Array;
function newImage(img) {
var media = new Image;
media.src = img;
imageCache[imageCache.length] = media;
}
// change an image
function changeImages(id, url) {
document.images[id].src = url;
}
// Returns number as string padded with zeros
Number.prototype.pad = function(len) {
if (this >= 0 && len > this.toString().length) {
return((this + Math.pow(10, len)).toString().substr(1));
} else {
return this.toString();
}
};
// evaluate next and back pages for news section
var npage, ppage;
function newsPage() {
var pagenumber = location.href.match(/[\/\?\\]news(\d\d)(\d\d)\./);
nextpage();
prevpage();
// next page = previous month
function nextpage() {
var year = parseInt(pagenumber[1], 10);
var month = parseInt(pagenumber[2], 10);
if (year == 0 && month == 1) return;
month--;
if (month == 0) {
month = 12;
year--;
}
npage = 'news' + year.pad(2) + month.pad(2) + '.shtml';
document.getElementById("n1").style.visibility = 'visible';
// document.getElementById("n2").style.visibility = 'visible';
}
// previous page = next month
function prevpage() {
var year = parseInt(pagenumber[1], 10);
var month = parseInt(pagenumber[2], 10);
if (year >= parent.currentYear && month >= parent.currentMonth) return;
month++;
if (month == 13) {
month = 1;
year++;
}
ppage = 'news' + year.pad(2) + month.pad(2) + '.shtml';
document.getElementById("b1").style.visibility = 'visible';
// document.getElementById("b2").style.visibility = 'visible';
}
}
// get last modified date of document
function date_lastmodified() {
var date = new Date(document.lastModified);
var d = date.getDate().pad(2);
var m = (date.getMonth() + 1).pad(2);
var y = date.getFullYear().toString().slice(2);
return d + '-' + m + '-' + y;
}
// close pop-up image windows
function closeImageWindow() {
if (ImageWindow != null && !ImageWindow.closed) ImageWindow.close();
}
// open a new, formatted image window
var ImageWindow = null;
function openImage(imageURL, imageTitle, imageWidth, imageHeight) {
// check if window is open: then close
closeImageWindow();
// create an Image Window
ImageWindow = openCenteredWindow('about:blank', 'ImageWindow' + imageWidth + '_' + imageHeight, imageWidth, imageHeight, 'no');
// write to, and format, ImageWindow
ImageWindow.document.write('