
window.onload = initialise;

function initialise()  {
    var x = document.getElementsByTagName('a');
    for (var i=0;i<x.length;i++) {
	if (x[i].getAttribute('type') == 'popup') {
		x[i].onclick = function () {
			return pop(this.href)
		}
		x[i].title += ' (Popup)';
	}
    }
}

function pop(url) {
	newwindow=window.open(url,'name','height=500,width=500');
	if (window.focus) {newwindow.focus()}
	return false;
}
   
function areYouSure(text)
{
     return confirm(text);
}

function setActiveStyleSheet(title) {
    var i, a, main;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
        if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
            a.disabled = true;
            if(a.getAttribute("title") == title) a.disabled = false;
        }
    }
}

