
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=665,width=620');
	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;
        }
    }
}

function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}

function PopUp(ref)
{	
	var strFeatures="toolbar=no,status=no,menubar=no,location=no"
	strFeatures=strFeatures+",scrollbars=no,resizable=no,height=500,width=500,left=100,top=100"
	
	newWin = window.open(ref,"TellObj",strFeatures);
       newWin.opener = top;
}