// *** WalySoft ***
// Buttons Loader

var aButtons = new Array();
var lCompatible = false;
var cFileExt = '.gif';
var D_Off = 'off';
var D_On = 'on';
var cRoot = '';

if( parseInt( navigator.appVersion ) >= 3 ) { 
	lCompatible = true; 
}
	
function AddBtn( cFileName, cComponent, nWidth, nHeight ) {
	if( lCompatible ) {
		cName = cComponent + D_Off;
		eval( 'aButtons[cName] = new Image;('+nWidth+','+nHeight+')' );
		aButtons[cName].src = cRoot + cFileName + '_' + D_Off + cFileExt;
		cName = cComponent + D_On;
		eval( 'aButtons[cName] = new Image;('+nWidth+','+nHeight+')' );
		aButtons[cName].src = cRoot + cFileName + '_' + D_On + cFileExt;
 	}
}
	
function SetPict(cComponent, lDown ) {
	if( lCompatible ) {
		if( lDown )
			document.images[cComponent].src = aButtons[cComponent+D_On].src
		else
			document.images[cComponent].src = aButtons[cComponent+D_Off].src;
	}
}

function AddImage( cFileName, cComponent, nWidth, nHeight ) {
	if( lCompatible ) {
		eval( 'aButtons[cComponent] = new Image;('+nWidth+','+nHeight+')' );
		aButtons[cComponent].src = cFileName;
 	}
}

function SetImg( cImage, cComponent ) {
	if( lCompatible ) {
		document.images[cImage].src = aButtons[cComponent].src
	}
}

