var IE = document.all ? true : false;

function clearDefault(e) {
	if (e.defaultValue==e.value){
		e.value = "";
		e.style.color = "#333333";
	}
}

function restoreDefault(e) {
	if (!e.value){
		e.value = e.defaultValue;
		e.style.color = "#b2b2b2";
	}
}

function JumpToIt(list) {
    var newPage = list.options[list.selectedIndex].value;
    if (newPage != "None") {
        location.href = newPage;
    }
}

function confirmDelete(url) {
	if (confirm("Are you sure you'd like to do this?")) {
		window.location.assign(url);
	}
}

/** help ****************************************************** **/
function help(obj, text) {
    if (typeof(text) != "undefined") {
		var helpBox = new Element("div", { "class": "help_pop" });
		obj.parentNode.insertBefore(helpBox, obj);
		helpBox.setStyle({ marginLeft: "18px", marginTop: "18px" });
		helpBox.innerHTML = text;
		helpBox.show();
	} else {
		//$(obj.parentNode.getElementsByClassName("help_pop").item(0)).remove();
		obj.parentNode.removeChild($(obj.parentNode).getElementsByClassName("help_pop")[0]);
	}
}