rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
       rnd.seed = (rnd.seed*9301+49297) % 233280;
       return rnd.seed/(233280.0);
}

function rand(intCieling) {
       return Math.ceil(rnd()*intCieling);
}

function fix_external_links() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("rel") && anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
		}
	}
}
window.onload = fix_external_links;
