// JavaScript Document
var flash;
var flashlabel;
window.onload= function () {
	flash = swfobject.getObjectById("flashObject");
	flashlabel = "flashObject";
}

function displayFlashInfo(loc) {
	flash = swfobject.getObjectById("flashObject");
	if (flash) {
		flash.updateSection(loc);
	} else if (parent.flash) {
		parent.flash.updateSection(loc);
	}
}
function setSectionInJavaScript(loc) {
	displayFlashInfo(loc);
}
function setTag(str) {
	document.location.href = "#"+str;
	if (pageTracker) {
		pageTracker._trackPageview(str);
	}
}
function refreshPage() {
	document.location.reload();
}
function setTitle(name) {
	document.title =  name + " | Get out there – Department of Justice and Attorney-General";
}
function change(str) {
	displayFlashInfo("?"+str);
	updateIframe("hiddenframe.php?"+str);
}
function getLocation() {
	return window.location.toString();
}
function getSession() {
	var str = document.cookie.toString();
	var arr = str.split("; ");
	var tCookie;
	for (i = 0; i < arr.length; i++) {
		var arr2 = arr[i].split("=");
		if (arr2[0] == "triumph") {
			tCookie = arr2[1];
		}
	}
	return tCookie;
}
function updateIframe(loc) {
	if (document.getElementById('hiddenframe')) {
		var iframe = document.getElementById('hiddenframe');
		iframe.src = loc;
		iframe.reload();
	} else {
		alert('No iFrame');
	}
}
function bookmarkSite(){
	if (document.all)
		window.external.AddFavorite(document.location.href, document.title);
	else if (window.sidebar)
		window.sidebar.addPanel(document.title, document.location.href, '')
}
