// ---------> Admin Functions <---------//
function toggleHelp(div,way) {
	var hDiv = document.getElementById(div);
	hDiv.style.filter = "blendTrans(duration=1)";
	if(way) {
		if(hDiv.style.visibility != "visible") {
			hDiv.filters(0).apply();
			hDiv.style.visibility = "visible";
			hDiv.filters(0).play();
		}
		hDiv.style.top = event.clientY + 10;
		hDiv.style.left = event.clientX + 15;
	}
	else {
		hDiv.filters(0).apply();
		hDiv.style.top = event.clientY + 10;
		hDiv.style.left = event.clientX + 15;
		hDiv.style.visibility = "hidden";
		hDiv.filters(0).play();
	}
}
function hLight(td,way) {
	if(way) {
		td.style.backgroundColor = "orange";
		td.style.color = "white";
	}
	else {
		td.style.backgroundColor = "white";
		td.style.color = "black";
	}
}
function loadPage(url) {
	document.location.href = url;
}
function adminClock() {
	var dClock = document.getElementById("adminClock");
	var date = new Date();
	var minutes = date.getMinutes();
	var seconds = date.getSeconds();
	var hours = date.getHours();
	var day = date.getDate();
	var month = date.getMonth();
	var year = date.getYear();
	
	month += 1;
	
	dClock.innerHTML = addZero(hours) + ":" + addZero(minutes) + ":" + addZero(seconds) + " " + addZero(day) + "/" + addZero(month) + "/" + year;
	var sClock = setTimeout("adminClock()",1000);
}
function addZero(input) {
	if(input <= 9) {
		input = "0" + input
	}
	return(input);
}
function rLight(td,way,tdClass) {
	if(way) {
		td.className = "sitesiteTableAltRowOn";
		//td.style.color = "white";
	}
	else {
		td.className = tdClass;
		td.style.color = "black";
	}
}
function doPop(url,width,height) {
	window.open(url,"New","status=yes,toolbar=no,scrollbars=yes,left=100,top=100,width=" + width + ",height=" + height + "");
}
function checkDelete(url) {
	var check = confirm("Are you sure you want to delete this item?");
	if(check == true) {
		document.location.href = url;
	}
}
// ---------> Site Functions <---------//
function doPop(url,width,height) {
	window.open(url,"New","status=yes,toolbar=no,scrollbars=yes,left=100,top=100,width=" + width + ",height=" + height + "");
}
function toggleHelp(div,way) {
	var hDiv = document.getElementById(div);
	hDiv.style.filter = "blendTrans(duration=1)";
	if(way) {
		if(hDiv.style.visibility != "visible") {
			hDiv.filters(0).apply();
			hDiv.style.visibility = "visible";
			hDiv.filters(0).play();
		}
		hDiv.style.top = event.clientY + 10;
		hDiv.style.left = event.clientX - 500;
	}
	else {
		hDiv.filters(0).apply();
		hDiv.style.top = event.clientY + 10;
		hDiv.style.left = event.clientX - 500;
		hDiv.style.visibility = "hidden";
		hDiv.filters(0).play();
	}
}
function btn(btn,way) {
	if(way) {
		btn.style.backgroundColor = "#B99F3E"
		btn.style.color = "#FFFFFF";
	}
	else {
		btn.style.backgroundColor = "#FFFFFF"
		btn.style.color = "#000000";
	}
}

