function confirmAction() {
	var res = confirm('Are you sure?');
	return res;
}
function scrollUp() {
	goScroll = setTimeout(function() {
		$().scrollTo("#content", 0);
	}, 50);
}
function adjustIframeHeight(height) {
	$("#content").css({'height' : height});
}
function bgCycle() {
	$("#adbanner_img").animate({opacity: "0"}, 0);
	
	arrCurr += 1;
	if (arrCurr > arrBgs.length - 1)
		arrCurr = 0;
	
	document.getElementById('adbanner_img').src = arrBgs[arrCurr];
	document.getElementById('adbanner_a').href = arrLinks[arrCurr];
	$("#adbanner_img").animate({opacity: "1"}, 800, function() {
		document.getElementById('adbanner_container').style.background = "url('" + arrBgs[arrCurr] + "') no-repeat white";
	});
	
	clearTimeout(bgCycleTimer);
	bgCycleTimer = setTimeout(function() {
		bgCycle();
	}, arrDur[arrCurr] * 1000);
}
function changePage(val) {
	document.getElementById('content').src = "http://www.tecservinc.com/" + val;
}
function litebox(open) {
	if (open) {
		$("#cover").animate({opacity: "0.7"}, 0);
		$("#cover").fadeIn(500);
		$("#litebox_container").fadeIn(500, function() {
			document.getElementById('login_username').focus();
		});
	}
	else {
		$("#cover").fadeOut(500);
		$("#litebox_container").fadeOut(500);
	}
}
function litebox2(open) {
	if (open == 1) {
		$("#litebox_container").fadeOut(500);
		$("#litebox_container2").fadeIn(500, function() {
			document.getElementById('forgot_username_email').focus();
		});
	}
	else if (open == 0) {
		$("#cover").fadeOut(500);
		$("#litebox_container2").fadeOut(500);
	}
	else if (open == 2) {
		$("#litebox_container2").fadeOut(500);
		$("#litebox_container").fadeIn(500, function() {
			document.getElementById('login_username').focus();
		});
	}
}
function litebox3(open) {
	if (open == 1) {
		$("#litebox_container").fadeOut(500);
		$("#litebox_container3").fadeIn(500, function() {
			document.getElementById('forgot_password_username').focus();
		});
	}
	else if (open == 0) {
		$("#cover").fadeOut(500);
		$("#litebox_container3").fadeOut(500);
	}
	else if (open == 2) {
		$("#litebox_container3").fadeOut(500);
		$("#litebox_container").fadeIn(500, function() {
			document.getElementById('login_username').focus();
		});
	}
}
function clearWatermark(obj, wmark) {
	currVal = obj.value;
	if (currVal == wmark)
		obj.value = '';
}
function restoreWatermark(obj, wmark) {
	currVal = obj.value;
	if (currVal == '')
		obj.value = wmark;
}
function changeTextBlock(obj, blk) {
	obj.innerHTML = blk;
}
