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

rarebrick.getWindowWidthMin = function(width) {
	var minWidth = 800;
	if(width > minWidth) return width;
	return minWidth;
}

rarebrick.getWindowHeight = function() {
	var val;
	try {
		val = document.documentElement.clientHeight;
		if(val != undefined && val != NaN) return val;
	} catch (Exception) {
		return 500;
	}
}

rarebrick.emailSignup = function() {
	var ea = '';
	var m = '1100759768235';
	var p = 'oi';
	var go = 'Go';
	var url = 'http://ui.constantcontact.com/d.jsp?ea=' + ea + '&m=' + m + '&p=' + p + '&go=' + go;
	
	rarebrick.popup(url, '', 'menubar=yes,resizable=yes,width=440,height=400')
}

innatparkside.getAspect = function() {
	var w = rarebrick.getWindowWidth() - innatparkside.padSides*2;
	return w / innatparkside.initWidth;
}

rarebrick.getWidth = function(id) {
	var elem = document.getElementById(id);
	var w = elem.style.width;
	return parseInt(w);
}

rarebrick.getWindowWidth = function() {
	var val;
	try {
		val = document.documentElement.clientWidth;
		if(val != undefined && !isNaN(val)) return rarebrick.getWindowWidthMin(val);
	} catch (Exception) {}
	try {
		val = document.body.clientWidth;
		if(val != undefined && !isNaN(val)) return rarebrick.getWindowWidthMin(val);
	} catch (Exception) {}
	try {
		val = window.innerWidth;
		if(val != undefined && !isNaN(val)) return rarebrick.getWindowWidthMin(val);
	} catch (Exception) {
		return 800;
	}
}



innatparkside.closePromo = function() {
	var elem = document.getElementById('promo');
	elem.style.display = 'none';
}

innatparkside.resetPromo = function() {
	var elem = document.getElementById('promo');
	if(elem == undefined) return;
	innatparkside.closePromo();
	setTimeout(innatparkside.showPromo, 2000);
}

innatparkside.showPromo = function() {
	var elem = document.getElementById('promo');
	elem.className = 'promoAbs';
	elem.style.display = 'block';
}

rarebrick.popup = function(theURL,winName,features) {
  window.open(theURL,winName,features);
}