/**
 * The global array below will be used inside the "setPointer()" function
 */
var markedRow = new Array();


/**
 * Sets/unsets the pointer in browse mode
 *
 * @param   object   the table row
 * @param   object   the color to use for this row
 * @param   object   the background color
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, thePointerColor, theNormalBgColor)
{
    var theCells = null;

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null;

        currentColor = theCells[0].style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].className = newColor;
        }

    return true;
} // end of the 'setPointer()' function


function placeFocus() //start form focus
{
	if (document.forms.length > 0) {
		var field = document.forms[0];
		for (i = 0; i < field.length; i++) {
		if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
			document.forms[0].elements[i].focus();
			break;
         }
      }
   }
} //end form focus


function clearpopupannouncement(id) {document.getElementById(id).style.display = 'none';}

//Used for keeping a TR at the top of a table while scrolling






// Used to stop copy and paste

function clickIE4(){
	if (event.button==2) return false;
}

function clickNS4(e){
	if (e.which==2||e.which==3) return false;
}
function returnFalse(){
	return false;
}
function returnTrue(){
	return true;
}

function initNoClick() {
	// No Select
	document.onselectstart=returnFalse;

	// If IE	
	if (document.all){
		// No Right Click
		document.onmousedown=clickIE4;
	}
	// Otherwise (Netscape)
	else {
		// No Right Click
		document.captureEvents(Event.MOUSEDOWN);
		//document.onmousedown=clickNS4;
		// No Select
		document.onmousedown=returnFalse
		document.onclick=returnTrue
	}
	document.oncontextmenu=returnFalse

}
if(window.noCopy || window.isMenuDependant)
	initNoClick()



