// JavaScript Document

<!--
function newWin(urlIn) 
{
	window.open(urlIn, 'NewWin', 'scrollbars=yes,resizable,width=680,height=420');
}
function newWinT(urlIn)
{
	window.open(urlIn, '','status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable,width=680,height=420');
}	
function popupUserLogin() 
{
	window.open('UserLogin.php','LogIn','scrollbars=yes,resizable,width=400, height=200');
}
function popupUserLogout()
{
	window.open('UserLogOut.php','LogOut','scrollbars=yes,resizable,width=400, height=200');
}
function DisplayMessage(msg,title)
{
	var x = window.open('', '', 'resizable=yes,width=300,height=200');
	if(x.opener==null){x.opener=self;}
	x.document.write('<html><head><title>' + title + '</title><' + '/' + 'head><body text="#000000" bgcolor="#ffffff"><p align="left">' + msg +'</p></body></html>');
}

scrollStep=6;
timerUp="";
timerLeft="";
timerDown="";
timerRight="";
function toTop(id)
{
	document.getElementById(id).scrollTop=0;
}
function toLeft(id)
{
	document.getElementById(id).scrollLeft=0;
}
function scrollDivDown(id)
{
	clearTimeout(timerDown); 
	document.getElementById(id).scrollTop+=scrollStep;
	timerDown=setTimeout("scrollDivDown('"+id+"')",10);
}
function scrollDivRight(id)
{
	clearTimeout(timerRight);
	document.getElementById(id).scrollLeft+=scrollStep;
	timerRight=setTimeout("scrollDivRight('"+id+"')",10);
}
function scrollDivUp(id)
{
	clearTimeout(timerUp);
	document.getElementById(id).scrollTop-=scrollStep;
	timerUp=setTimeout("scrollDivUp('"+id+"')",10);
}
function scrollDivLeft(id)
{
		clearTimeout(timerLeft);
		document.getElementById(id).scrollLeft-=scrollStep;
		timerLeft=setTimeout("scrollDivLeft('"+id+"')",10);
}
function toBottom(id)
{
	document.getElementById(id).scrollTop=document.getElementById(id).scrollHeight;
}
function toRight(id)
{
		document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth;
}
function stopMe(){
clearTimeout(timerDown) 
clearTimeout(timerUp)
clearTimeout(timerRight);
clearTimeout(timerLeft);
}
function showIt(id)
{
	var el=document.getElementById(id);
	el.scrollIntoView();
}
/**
 * DHTML textbox character counter script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
maxL=1000;
var bName = navigator.appName;
function taLimit(taObj) {
	if (taObj.value.length==maxL) return false;
	return true;
}

function taCount(taObj,Cnt) { 
	objCnt=createObject(Cnt);
	objVal=taObj.value;
	if (objVal.length>maxL) objVal=objVal.substring(0,maxL);
	if (objCnt) {
		if(bName == "Netscape"){	
			objCnt.textContent=maxL-objVal.length;}
		else{objCnt.innerText=maxL-objVal.length;}
	}
	return true;
}
function createObject(objId) {
	if (document.getElementById) return document.getElementById(objId);
	else if (document.layers) return eval("document." + objId);
	else if (document.all) return eval("document.all." + objId);
	else return eval("document." + objId);
}
// -->

