<!--

NS4 = (document.layers) ? true : false;

// ----------------------------------------------
// TO USE :
// ----------------------------------------------
// <input type="text" onKeyPress="return checkEnter(document.testform1, event)">
// ----------------------------------------------
function checkEnter(form_name, event)
{ 	
	var code = 0;
	if (NS4)
		code = event.which;
	else
		code = event.keyCode;
	if (code==13)
	{
		form_name.submit();
		return false;
	}
	return true;
}

function confirmDelete(theLink)
{
    var is_confirmed = confirm('Are you sure ?');
    if(is_confirmed) 
    {
		location.href = theLink;
    }
}

function selectHandler(theSelect)
{
	location.href = theSelect.options[theSelect.selectedIndex].value;
}

function setUrl(theUrl)
{
	location.href = theUrl;
}

function setPointer(theRow, theColor)
{
    var theCells = null;

    if (theColor == '' || 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;
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        newColor     = theColor; 
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', newColor, 0);
        } // end for
    }
    else {
        currentColor = theCells[0].style.backgroundColor;
        newColor     = theColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].style.backgroundColor = newColor;
        }
    }

    return true;
} // end of the 'setPointer()' function

// -->
