if(!rarebrick) var rarebrick = new Object();

function emailSignup() {
	rarebrick.popup(rarebrick.URL_CC,'emailsignup','menubar=yes,resizable=yes,width=375,height=420');
}

function popup(page) {
	var dx=435;
	var dy=160;
	var w = window.open(page, 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=no,location=no,scrollbars=no,toolbar=no');
	w.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function indexRevealContent() {
	obj = document.getElementById('content');
	obj.style.visibility = 'visible';
	obj = document.getElementById('footer');
	obj.style.visibility = 'visible';
}

rarebrick.isTranslation = function() {
	return(location.href.indexOf('/trans/') != -1  ||  location.href.indexOf('/test/') != -1);
}
rarebrick.getLang = function() {
	var lang = '';
	try {
		var index = location.href.indexOf('/trans/') + 4;
		index = location.href.indexOf('/', index) + 1;
		var index2 = location.href.indexOf('/', index);
		lang = location.href.substring(index, index2);
	} catch(e) {}
	//alert('lang: ' + lang);
	return lang;
}

rarebrick.getPage = function() {
	var page;
	if(location.href.indexOf('/blog')==-1) {
		page = location.href.substring(location.href.lastIndexOf('/')+1, location.href.length);
	} else {
		page = location.href.substring(location.href.lastIndexOf('/blog')+1, location.href.length);
	}
	return page;
}
rarebrick.getTransPrefix = function() {
	var prefix = '';
	if(rarebrick.isTranslation()==true) prefix = prefix + 'trans/' + rarebrick.getLang() + '/';
	return prefix;
}