<!--
var loginWnd;

function Get_Cookie(name) {
	var cookies = document.cookie;
	if (cookies == "") return false;
	cookies = " " + cookies;

	var start = cookies.indexOf(" " + name + "=");
	if (start == -1) return false;
	start += name.length + 2;

	var end = cookies.indexOf(";", start);
	if (end == -1) end = cookies.length;

	var val = cookies.substring(start, end);
	return unescape(val);
}

function Set_Cookie(name,value,expires,path,domain,secure) {
	document.cookie = name + "=" +escape(value) +
		( (expires) ? ";expires=" + expires.toGMTString() : "") +
		( (path) ? ";path=" + path : "") +
		( (domain) ? ";domain=" + domain : "") +
		( (secure) ? ";secure" : "");
}

function Delete_Cookie(name) {
//	if (Get_Cookie(name))
		document.cookie = name + "=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function handleClick() {
	if (!loginWnd) {
		loginWnd = window.open( 'https://www.bitpass.com/control', '_bp_CTRL_', 'toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=303,height=208,left=' + (screen.width - 303) / 2 + ',' + 'top=' + (screen.height - 208) / 2);
		loginWnd.focus();
	} else if (loginWnd.closed) {
		delete loginWnd;
		loginWnd = null;
		handleClick();
	} else {
		loginWnd.focus();
	}
}

function getStyleObject(objectId) {
	// cross-browser function to get an object's style object given its id
	if (document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
	} else if (document.all && document.all(objectId)) {
		// MSIE 4 DOM
		return document.all(objectId).style;
	} else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
	} else {
		return false;
	}
}

self._bp_loaded = 1;
//-->
