// This file contains all the javascript functions that are needed for the application.


maximagewidth = window.screen.width-130;


///// Menu behavior functions /////

function openWindow(page,width,height)
{

	
	if (width>0) {
		window.open("images/closeup"+page+".html", "_blank", "top="+10+",left="+10+",height="+height+",width="+width+",status=yes, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=yes" );
	} else {
		window.open("supercloseup"+page+".html", "_blank", "top="+10+",left="+10+",height="+(window.screen.height-120)+",width="+(window.screen.width-30)+",status=yes,scrollbars=yes,resizable=yes" );
		window.close();
	}
	
}
function doNothing(page,width,height)
{
		//window.open("closeup"+page+".html", "_self", "top="+10+",left="+10+",height="+(window.height)+",width="+(window.width)+",status=yes, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=yes" );
}

function closeWindow()
{
window.close();
}



function mDown(colID) {
	obj = link_table.rows[0].cells[colID];
	obj.className = "menuDown";
}

function mUp(colID) {
	obj = link_table.rows[0].cells[colID];
	obj.className = "menuUp";
}
function mOff(colID) {
	obj = link_table.rows[0].cells[colID];
	obj.className = "menuOff";
}

///// SubMenu behavior functions /////

function subDown(colID) {
	obj = sublink_table.rows[0].cells[colID];
	obj.className = "submenuDown";
}

function subUp(colID) {
	obj = sublink_table.rows[0].cells[colID];
	obj.className = "submenuUp";
}

///// Functions for scrolling ticker /////

function pause(tckrSpd) {
	moveSpeed = tckrSpd;
}

function resume(tckrSpd) {
	moveSpeed = tckrSpd;
}

function populate(tckrMsg) {
	moveSpeed = 2;
	scroller.style.left = 508 + "px";
	scroller.innerHTML = tckrMsg;
	msgWidth = msgBox.offsetWidth;
	leftTime = setInterval("scrollMessage()",20);
}

function scrollMessage() {
	if (parseInt(scroller.style.left) > -msgWidth) {
		scroller.style.left = parseInt(scroller.style.left) - moveSpeed + "px";
	} else {
		scroller.style.left = 508 + "px";
	}
}

///// Shows hidden forms in operator interface /////
