window.onload = site_onload;

function site_onload() {
	social_bookmark();
	image_preload();
}

function display_element(id,d) {
	var e = document.getElementById(id);
	if (e.style.display == 'none' || e.style.display == '') { e.style.display = d; }
	else { e.style.display = 'none'; }
}

function image_preload() {
	var arr_img_preload = new Array('/i/g/arrow-top-hover.gif');
	var arr_img = new Array();
	for(var i=0; i<arr_img_preload.length; i++) {
		arr_img[i] = new Image();
		arr_img[i].src = arr_img_preload[i];
	}
}

function social_bookmark() {
	var esbshow = document.getElementById('social_bookmarks_show');
	
	var esb;
	
	if ( document.getElementById('social_bookmarks') ) {
		esb = document.getElementById('social_bookmarks').getElementsByTagName('a');
	} else {
		esb = document.getElementById('social_bookmarks2').getElementsByTagName('a');
	}
	
	for(var i=0;i<esb.length;i++) {
		esb[i].onmouseover = function() {
			esbshow.innerHTML = this.title;
		}
		esb[i].onmouseout = function() {
			esbshow.innerHTML = '';
		}
		esb[i].onclick = function() {
			window.open(this.href);
			return false;
		}
	}
}


