function setHistory(h, t) {
	hash = h;
	subtitle = t;
	unFocus.History.addHistory(h);
}

function onHistoryChange(h) {
	if (hash != h) {
		hash = h;
		try { 
			document.getElementById(so_id).updateFlash(h); 
		}
		catch (err) {
			alert(err)
		}
	}
	//document.title = siteName +" "+ subtitle;
}

function getSwf(id) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[id];
	} 
	else {
		return document[id];
	}
}    

unFocus.History.addEventListener("historyChange", onHistoryChange);
hash = unFocus.History.getCurrent();
hash = hash.toLowerCase();
onHistoryChange(hash);

function isReady() {
	return jsReady;
}
function pageInit() {
	jsReady = true;
}

function openWindow(url, winName, params) 
{
	//window.open(url, 'downloads');
	var winName = Math.round(9999*Math.random()) + new Date().getTime();
	var winNew = window.open(url, winName, params); //,"toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=800,height=700,left=200,top=100");
	//alert(url);
	if(!winNew) {
		getSwf(so_id).openWindowFromSwf(pageUrl);
	}
	else {
		winNew.focus();
	}
}


var cacheBuster="";
var cbd=new Date();
var cbm=new Date();
var cby=new Date();
cbd=cbd.getUTCDate();
cbd=cbd.toString();
cbm=cbm.getUTCMonth()+1;
cbm=cbm.toString();
cby=cby.getUTCFullYear();
cby=cby.toString();
cacheBuster=cbd+":"+cbm+":"+cby;
