<!-- Begin
function popUp(URL,h,w) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+ w +",height="+ h +",left = 0,top = 0, bgcolor=black');");
}

function popUpDirect(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+ 800 +",height="+ 580 +",left = 0,top = 0, bgcolor=black');");
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("content").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function printpage() {
window.print();  
}

//+----------------------------------------------------------------------
//  Function:       InitComponent
//  Description:    Called during the initialization of the behavior. 
//                  Caches some internal-use variables
//  Arguments:      none
//  Returns:        nothing
//-----------------------------------------------------------------------

function InitComponent()
{
    tBody = element.tBodies[0];
    bodyRowCount = tBody.rows.length-1;

    nFirstBodyIndex = tBody.rows[0].rowIndex;
    nLastBodyIndex = tBody.rows[bodyRowCount].rowIndex;
    
    SelectedIndex = -1;
}

//+----------------------------------------------------------------------
//  Function:       MoveUp 
//  Description:    Move the selected row one position up
//  Arguments:      none
//  Returns:        nothing
//-----------------------------------------------------------------------

function MoveUp()
{
    if (!eval(Selectable)) return false;
    if (oSelectRow == null) return false;

    // Determine starting and ending position
    var moveFrom = oSelectRow.rowIndex;
    var moveTo = oSelectRow.rowIndex-1;
    
    // Should not move out of <tbody> rows
    if (moveTo < nFirstBodyIndex)
       moveTo = nLastBodyIndex;

    // Move
    element.moveRow(moveFrom, moveTo);
}

//+----------------------------------------------------------------------
//  Function:       MoveDown 
//  Description:    Move the selected row one position down
//  Arguments:      none
//  Returns:        nothing
//-----------------------------------------------------------------------

function MoveDown()
{
    if (!eval(Selectable)) return false;
    if (oSelectRow == null) return false;

    // Determine starting and ending position
    var moveFrom = oSelectRow.rowIndex;
    var moveTo = oSelectRow.rowIndex+1;
    
    // Should not move out of <tbody> rows
    if (moveTo > nLastBodyIndex)
       moveTo = nFirstBodyIndex;
    
    // Move
    element.moveRow(moveFrom, moveTo);
}



// End -->