if ( typeof( YM_dialog ) == "undefined" ) var YM_dialog = {};

function YM_trans( strInput )
{
	var _lang 		= ( typeof( ys_language ) == "string" ? ys_language : "nl" );
	var _strOutput 	= ( _lang == "nl" ? strInput : YM_dialog[strInput] );
	var args = [];

	if ( typeof arguments == 'object' && arguments.length > 1 )
	{
		for ( var i = 1; i < arguments.length; i++ ) {
			args.push( arguments[ i ] );
		}
	}

	if ( _strOutput == null ) {
		YM_dialog[ strInput ] = "";
		_strOutput = "";
	}
	if ( _strOutput == "" ) {
		args.unshift( strInput );
		if( _lang != "nl" )
		{
			return "_" + _lang + "||" + sprintf.apply( this, args ) + "_";
		}
	} else {
		args.unshift( _strOutput );
	}

	return sprintf.apply( this, args );
}
