function addOnLoadEvent(func) {
	var oldOnLoad = window.onload;
	if (typeof window.onload != "function") {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldOnLoad();
			func();
		}
	}
}

function insertAfter(newElement, targetElement) {
	var parent = targetElement.parentNode;

	if (parent.lastChild == targetElement)
		parent.appendChild(newElement);
	else
		parent.insertBefore(newElement, targetElement.nextSibling);
	
}


function toggle(eleObj) {
	if(typeof(eleObj) == 'string') {
		eleObj = document.getElementById(eleObj);
	}
	

	if (eleObj.style.display == 'none') {
		eleObj.style.display = 'block';
		return true;
	}	
	else
		eleObj.style.display = 'none';	
	
	return false;
}


