window.defaultStatus = "Need a Place to Go Travel."



function stuff_newsletter() {
	var n = document.getElementById('newsletter_email')
	var n_txt = 'enter your email here'
	n.value = n_txt
	n.onfocus = function() {
		if ( this.value == n_txt ) this.value = ''
	}
	n.onblur = function() {
		if ( this.value == '' ) this.value = n_txt
	}
}

function calctime() {
	var currenttime = new Date();
	var hours = currenttime.getHours();
	var minutes = currenttime.getMinutes();
	var seconds = currenttime.getSeconds();
	if (hours > 11) {
		hours = hours - 12;
	}
	if (hours == 0) { hours = 12; }
	if (hours < 10) { hours = "0" + hours; }
	if (minutes < 10) { minutes = "0" + minutes; }
	if (seconds < 10) { seconds = "0" + seconds; }
	var clocklocation = document.getElementById('digitalclock');
	clocklocation.innerHTML = hours + ":" + minutes + ":" + seconds;
	setTimeout("calctime()", 1000);
}

var css = {
	set_style : function( node, rule, value ) {
		if ( typeof(node) == 'string' ) node = document.getElementById(node)
		node.style[rule] = value
	},
	get_style : function( node, rule ) {
		if ( typeof(node) == 'string' ) node = document.getElementById(node)
		if ( rule == 'width' ) return css.get_width(node)
		else if ( rule == 'height' ) return css.get_height(node)
		else {
			if ( window.getComputedStyle ) return window.getComputedStyle( node, null )[rule]
			else return node.currentStyle[rule]
		}
	},
	get_height : function( node ) {
		if ( typeof(node) == 'string' ) node = document.getElementById(node)
		return node.offsetHeight
	},
	get_width : function( node ) {
		if ( typeof(node) == 'string' ) node = document.getElementById(node)
		return node.offsetWidth
	}
}

function get_sizes() {
	var r = parseFloat(css.get_style('sidebar_right','height'));
	var c = parseFloat(css.get_style('main_content','height'));
	var l = parseFloat(css.get_style('sidebar_left','height'));
	
	if (r > c) {
		var p = parseFloat(css.get_style('main_content','paddingBottom'));
		css.set_style('main_content','height', (r-p)+'px');
		//css.set_style('main_content','paddingBottom', '0px !important');
	}
}

window.onload = function() {
	stuff_newsletter();
	calctime();
	get_sizes();
}