function IniFramePage() {
	if (!CheckTop()) {
		return;
	}
	try {
		parent.RegisterCF(window);
		parent.MMSelectItemFromFrame(MenuArgs);
		parent.ShowBannerFromFrame();
	} catch(e) {}
	HideLoadingDiv();
	var dt = null;
	try {
		dt = PlaceholderFlashData;
	} catch (e) {}
	if (dt) {
		try {
			var so = new SWFObject(dt[0], dt[1], dt[2], dt[3], "7", "#ffffff");	
			if (dt.length > 5) so.addParam("wmode", "transparent");
			so.write(dt[4]);
			if (dt.length > 5) AddFlashLink(dt);
		} catch (e) {}
	}
}
function AddFlashLink(dt) {
	var d = $get(dt[4]);
	var arr = new Array();
	arr[0] = 0;
	arr[1] = 0;
	GetAbsolutePosArr(d, arr)
	var el = document.createElement("a");
	el.style.position = "absolute";
	el.zIndex = "100";
	el.style.top = arr[1] + "px";
	el.style.left = arr[0] + "px";
	el.href = dt[5];
	var el2 = document.createElement("img");
	el.appendChild(el2);
	el2.width = dt[2];
	el2.height = dt[3];
	el2.src = WebRoot + "static/images/shim.gif";
	el2.className = "button";
	if (dt.length > 6) el.target = dt[6];
	if (dt.length > 7) {
		el.title = dt[7];
		el2.alt = dt[7];
	}
	d.appendChild(el);
	//alert(d.innerHTML);
}
function HideLoadingDiv() {
	var d1 = $get("divLoadingWait");
	var d2 = $get("divMainContent");
	if (d1) d1.style.display = "none";
	if (d2) d2.style.display = "block";
}
function hbxPT() {
	var s = document.title;
	return repJS(s);
}
function hbxCC() {
	var cc = 0;
	var s = ""
	try {
		cc = MenuArgs[1];
	} catch (e) {}
	if (cc > 0) {
		try {
			s = parent.GetMenuName(cc);
		} catch (e) {}
	}
	return repJS(s);
}
function repJS(s) {
	var re1 = /'|\\/g;
	var ss = s.replace(re1, "");
	return ss;
}
function RepString(s, arr) {
	if (!s) return "";
	if (!arr) return this[s];
	var s2 = s;
	for (var i = 0; i < arr.length; i++) {
		var re = new RegExp("\\{" + i + "\\}", "gi");
		s2 = s2.replace(re, arr[i]);
	}
	return s2;
}
function ShowSecureMessage(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	var w = window.open(WebRoot + "public/SecureServer.html", "SecureServer", "width=400,height=188,history=no,resizable=yes,status=yes,menubar=no");
	if (w) {
		w.focus();
	}
	else {
		return true;
	}
	return false;
}
function DoGoBackSubs(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	history.back();
	return false;
}
function DoCancelSubs(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	var s = "http://" + window.location.host + WebRoot + "global/homepage.aspx";
	window.location = s;
	return false;
}
function ShowTermsPopup(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	var s = WebRoot + "public/TermsPopup.html";
	var w = window.open(s, "DdMandate", "width=600,height=520,history=no,resizable=yes,status=yes,menubar=no,scrollbars=yes");
	if (w) {
		w.focus();
	}
	else {
		return true;
	}
	return false;
}
function ShowDdGuarantee(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	var s = "http://" + window.location.host + WebRoot + "public/SubscribeDdGuarantee.html"
	var w = window.open(s, "DdGuarantee", "width=550,height=300,history=no,resizable=yes,status=yes,menubar=no");
	if (w) {
		w.focus();
	}
	else {
		return true;
	}
	return false;
}
function ShowMandate(me, ev, stage) {
	CancelEvent(ev);
	DoBlur(me);
	var s = WebRoot + "public/SubscribeDdMandate.aspx";
	if (stage == 1) s += "?f=1";
	var w = window.open(s, "DdMandate", "width=600,height=700,history=no,resizable=yes,status=yes,menubar=no,scrollbars=yes");
	if (w) {
		w.focus();
	}
	else {
		return true;
	}
	return false;
}
function ShowStreamTest(me, ev) {
	CancelEvent(ev);
	DoBlur(me);
	var w = window.open(WebRoot + "public/streamtest.aspx", "StreamTest", "width=500,height=470,history=no,resizable=yes,status=yes,menubar=no");
	if (w) {
		w.focus();
	}
	else {
		return true;
	}
	return false;
}