function logOFF(){
	if(confirm('Please confirm you want to log off?')){
		location.href = 'logoff.php';
	}
}
/**
 * Sets/unsets the pointer in browse mode
 *
 * @param   object   the table row
 * @param   object   the color to use for this row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, thePointerColor){
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }
    var row_cells_cnt           = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;
    }
    return true;
} // end of the 'setPointer()' function




function setHelp(txt){
	//below code should be called after page has loaded
	document.getElementById("hlp").innerHTML =  txt;
}


/* Alert functio implementing below */
function ShowAlert(){
	toggleLayer('alertBox');
	setTimeout('alertClose()', 5000)  
}
function alertClose(){
	toggleLayer('alertBox');
}



/* Toggles a div layer visible invosible */
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}

/* Popups up centred window */
function popupCenter(url,theWidth,theHeight){
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features = 'height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+",scrollbars=yes,location=yes";
	theWin=window.open(url,'',features);
}

